You can subscribe to this list here.
2012 |
Jan
|
Feb
(214) |
Mar
(139) |
Apr
(198) |
May
(187) |
Jun
(151) |
Jul
(210) |
Aug
(169) |
Sep
(58) |
Oct
(53) |
Nov
(54) |
Dec
(301) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2013 |
Jan
(348) |
Feb
(178) |
Mar
(219) |
Apr
(154) |
May
(117) |
Jun
(194) |
Jul
(61) |
Aug
(132) |
Sep
(121) |
Oct
(110) |
Nov
(11) |
Dec
(18) |
2014 |
Jan
(34) |
Feb
(50) |
Mar
(82) |
Apr
(98) |
May
(39) |
Jun
(111) |
Jul
(67) |
Aug
(36) |
Sep
(33) |
Oct
(26) |
Nov
(53) |
Dec
(44) |
2015 |
Jan
(29) |
Feb
(47) |
Mar
(25) |
Apr
(19) |
May
(23) |
Jun
(20) |
Jul
(49) |
Aug
(7) |
Sep
(10) |
Oct
(10) |
Nov
(4) |
Dec
(25) |
2016 |
Jan
(8) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(3) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(7) |
Dec
(5) |
2017 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(15) |
Jun
|
Jul
(18) |
Aug
(24) |
Sep
|
Oct
(14) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
(22) |
Mar
|
Apr
(11) |
May
(1) |
Jun
(17) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(6) |
Nov
(5) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <be...@us...> - 2012-08-02 22:32:14
|
Revision: 9979 http://xoops.svn.sourceforge.net/xoops/?rev=9979&view=rev Author: beckmi Date: 2012-08-02 22:32:08 +0000 (Thu, 02 Aug 2012) Log Message: ----------- Bug fixing by Zyspec Modified Paths: -------------- XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt XoopsModules/wfdownloads/trunk/wfdownloads/index.php XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php Modified: XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2012-08-02 08:28:59 UTC (rev 9978) +++ XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2012-08-02 22:32:08 UTC (rev 9979) @@ -1,6 +1,8 @@ <b><u>=> Version 3.21 Beta 1 (2012-07-30)</u></b> -Converted to XOOPS 2.5.5 Admin GUI (mamba) +- Converted to XOOPS 2.5.5 Admin GUI (mamba) +- Fixed delete issue (jcweb/zyspec) +- Fixed RSS issue (jagibu/zyspec) <b><u>=> Version 3.2 RC2 (2007-04-23)</u></b> Modified: XoopsModules/wfdownloads/trunk/wfdownloads/index.php =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2012-08-02 08:28:59 UTC (rev 9978) +++ XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2012-08-02 22:32:08 UTC (rev 9979) @@ -149,8 +149,10 @@ if($xoopsModuleConfig['enablerss'] == 1) { - $rsslink=sprintf("<a href='%s' title='%s'><img src='%s' border=0 alt='%s' title='%s'></a>",WFDOWNLOADS_URL."rss.php", _MD_WFD_LEGENDTEXTRSS, XOOPS_URL."/".$xoopsModuleConfig['mainimagedir']."/icon/rss.gif",_MD_WFD_LEGENDTEXTRSS); - $xoopsTpl->assign('full_rssfeed_link', $rsslink); + //$rsslink=sprintf("<a href='%s' title='%s'><img src='%s' border=0 alt='%s' title='%s'></a>",WFDOWNLOADS_URL."rss.php", _MD_WFD_LEGENDTEXTRSS, XOOPS_URL."/".$xoopsModuleConfig['mainimagedir']."/icon/rss.gif",_MD_WFD_LEGENDTEXTRSS); $xoopsTpl->assign('full_rssfeed_link', $rsslink); + + $rsslink=sprintf("<a href='%s' title='%s'><img src='%s' border=0 alt='%s' title='%s'></a>",WFDOWNLOADS_URL."rss.php", _MD_WFD_LEGENDTEXTRSS, XOOPS_URL."/".$xoopsModuleConfig['mainimagedir']."/icon/rss.gif",_MD_WFD_LEGENDTEXTRSS, _MD_WFD_LEGENDTEXTRSS, '' ); //changed by Zyspec + } include 'footer.php'; Modified: XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php 2012-08-02 08:28:59 UTC (rev 9978) +++ XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php 2012-08-02 22:32:08 UTC (rev 9979) @@ -256,8 +256,8 @@ if($xoopsModuleConfig['enablerss'] == 1 && $total_numrows > 0) { - $rsslink=sprintf("<a href='%s' title='%s'><img src='%s' border='0' alt='%s' title='%s'></a>",WFDOWNLOADS_URL."rss.php?cid=".intval($cid), _MD_WFD_LEGENDTEXTCATRSS, XOOPS_URL."/".$xoopsModuleConfig['mainimagedir']."/icon/rss.gif",_MD_WFD_LEGENDTEXTCATRSS); - $xoopsTpl->assign('cat_rssfeed_link', $rsslink); + //$rsslink=sprintf("<a href='%s' title='%s'><img src='%s' border='0' alt='%s' title='%s'></a>",WFDOWNLOADS_URL."rss.php?cid=".intval($cid), _MD_WFD_LEGENDTEXTCATRSS, XOOPS_URL."/".$xoopsModuleConfig['mainimagedir']."/icon/rss.gif",_MD_WFD_LEGENDTEXTCATRSS); $xoopsTpl->assign('cat_rssfeed_link', $rsslink); + $rsslink=sprintf("<a href='%s' title='%s'><img src='%s' border='0' alt='%s' title='%s'></a>",WFDOWNLOADS_URL."rss.php?cid=".intval($cid), _MD_WFD_LEGENDTEXTCATRSS, XOOPS_URL."/".$xoopsModuleConfig['mainimagedir']."/icon/rss.gif",_MD_WFD_LEGENDTEXTCATRSS, '' ); //changed by Zyspec } $xoopsTpl->assign('module_home', wfdownloads_module_home(true)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2012-08-02 08:29:08
|
Revision: 9978 http://xoops.svn.sourceforge.net/xoops/?rev=9978&view=rev Author: beckmi Date: 2012-08-02 08:28:59 +0000 (Thu, 02 Aug 2012) Log Message: ----------- fixing bug for deleting files (irmtfan/zyspec) Modified Paths: -------------- XoopsModules/wfdownloads/trunk/wfdownloads/admin/main.php Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/main.php =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/admin/main.php 2012-08-02 07:28:11 UTC (rev 9977) +++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/main.php 2012-08-02 08:28:59 UTC (rev 9978) @@ -306,7 +306,7 @@ { global $_FILES; - $down = wfd_uploading($_FILES, $xoopsModuleConfig['uploaddir'], "", "index.php", 0, 0); + $down = wfd_uploading($_FILES, $xoopsModuleConfig['uploaddir'], "", "main.php", 0, 0); $url = ($_POST["url"] != "http://") ? $_POST["url"] : ''; $size = $down['size']; $title = $_FILES['userfile']['name']; @@ -579,7 +579,7 @@ else { wfdownloads_xoops_cp_header(); - xoops_confirm(array('op' => 'delDownload', 'lid' => $lid, 'confirm' => 1, 'title' => $title), 'index.php', _AM_WFD_FILE_REALLYDELETEDTHIS . "<br /><br>" . $title, _DELETE); + xoops_confirm(array('op' => 'delDownload', 'lid' => $lid, 'confirm' => 1, 'title' => $title), 'main.php', _AM_WFD_FILE_REALLYDELETEDTHIS . "<br /><br>" . $title, _DELETE); xoops_cp_footer(); } break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ir...@us...> - 2012-08-02 07:28:25
|
Revision: 9977 http://xoops.svn.sourceforge.net/xoops/?rev=9977&view=rev Author: irmtfan Date: 2012-08-02 07:28:11 +0000 (Thu, 02 Aug 2012) Log Message: ----------- apply style.css customization apply input time localization remove many hardcodes in templates Modified Paths: -------------- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev9883.txt XoopsModules/newbb/branches/irmtfan/newbb/header.php XoopsModules/newbb/branches/irmtfan/newbb/polls.php XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_index.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_thread.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_viewall.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_viewforum.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_viewpost.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_viewtopic.html Modified: XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev9883.txt =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev9883.txt 2012-08-02 05:24:36 UTC (rev 9976) +++ XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev9883.txt 2012-08-02 07:28:11 UTC (rev 9977) @@ -1,7 +1,27 @@ Changelog from rev.9883 +date: 2012-08-01 +================================================ +1- localization: input date localized (for other date systems like hegira) by replacing strtotime by XoopsLocal::strtotime +in newbb/polls.php + +2- customization&localization: newbb style.css is fully localized and customized and is not hard-coded anymore. +in newbb/header.php +file changes: +-- deleted newbb/templates/style.css +-- added newbb/templates/images/language/english/style.css +-- added newbb/templates/images/language/persian/style.css +priorities: +if exist in themes/YOUR_THEME/modules/newbb/images/language/YOUR_LANG/style.css take it +else if exist in themes/default/modules/newbb/images/language/YOUR_LANG/style.css take it +else if exist in modules/newbb/templates/images/language/YOUR_LANG/style.css take it +else if exist in modules/newbb/templates/images/language/english/style.css take it +else if exist in modules/newbb/templates/style.css take it (for backward compatibility) + +3- many hardcodes in newbb/templates and style.css has been removed + date: 2012-07-30 ================================================ -1- bug fix: edit not record when the reason is not filled (irmtfan) +1- bug fix: edit not displayed when the reason is not filled (irmtfan) 2- bug fix: only the last edit is recorded. (irmtfan/alfred) in newbb/class/post.php 3- bug fix: 'noapprove' permission incorrectly recorded in database. (irmtfan) @@ -12,5 +32,5 @@ in newbb/xoops_version.php 6- hardcode: some style.css color hardcodes has been removed. (irmtfan) in newbb/templates/style.css -7- feature added: text links instead of buttons. (deka98/irmtfan) -in newbb/class/icon.php , newbb/include/functions.render.php , newbb/include/plugin.php +7- feature added: text links instead of buttons. (deka87/irmtfan) +in newbb/class/icon.php , newbb/include/functions.render.php , newbb/include/plugin.php \ No newline at end of file Modified: XoopsModules/newbb/branches/irmtfan/newbb/header.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/header.php 2012-08-02 05:24:36 UTC (rev 9976) +++ XoopsModules/newbb/branches/irmtfan/newbb/header.php 2012-08-02 07:28:11 UTC (rev 9977) @@ -1,116 +1,140 @@ -<?php -/** - * CBB 4.0, or newbb, the forum module for XOOPS project - * - * @copyright The XOOPS Project http://xoops.sf.net - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @author Taiwen Jiang (phppp or D.J.) <ph...@us...> - * @since 4.00 - * @version $Id$ - * @package module::newbb - */ -include_once '../../mainfile.php'; -defined('XOOPS_ROOT_PATH') or die('Restricted access'); -$xoopsLogger->startTime('newBB_Header'); - -if (!empty($xoopsModuleConfig['do_rewrite'])) { - include_once "seo_url.php"; - /* for seo */ - $toseo_url = array("index.php","viewforum.php","viewtopic.php","rss.php"); - - if(((strpos(getenv('REQUEST_URI'), '.html') === false) && !empty($xoopsModuleConfig['do_rewrite']) && (!isset($_POST) || count($_POST) <= 0))) - { - $redir = false; - if ( strpos(getenv("REQUEST_URI"),"mark_read=") == true || strpos(getenv("REQUEST_URI"),"mark=") == true) { - // Mark Forums - } else { - if ( in_array(basename(getenv('SCRIPT_NAME')),$toseo_url) ) { - //rewrite only for files - - if ( trim(getenv("SCRIPT_NAME")) != '' ) { - if ( strpos(getenv("REQUEST_URI") , "/".SEO_MODULE_NAME."/") === false ) { - $redir = true; - } else if ( getenv("QUERY_STRING") ) { - $redir = true; - } - } - } - } - - if ($redir == true) { - $s = "http://" . getenv('HTTP_HOST') . getenv("REQUEST_URI"); - $s = str_replace("/".REAL_MODULE_NAME."/","/".SEO_MODULE_NAME."/",$s); - $newurl = seo_urls('<a href="'.$s.'"></a>'); - $newurl = str_replace('<a href="','',$newurl); - $newurl = str_replace('"></a>','',$newurl); - if ( !headers_sent() ) { - header("HTTP/1.1 301 Moved Permanently"); - header("Location: $newurl"); - exit(); - } - } - } -} - -include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/include/vars.php"; - -mod_loadFunctions("user", "newbb"); -mod_loadFunctions("topic", "newbb"); - -require_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; -require_once XOOPS_ROOT_PATH."/class/module.textsanitizer.php"; -$myts = MyTextSanitizer::getInstance(); - -$menumode = 0; -$menumode_other = array(); -$menu_url = htmlSpecialChars(preg_replace("/&menumode=[^&]/", "", $_SERVER[ 'REQUEST_URI' ])); -$menu_url .= ( false === strpos($menu_url, "?") ) ? "?menumode=" : "&menumode="; -foreach ($xoopsModuleConfig["valid_menumodes"] as $key => $val) { - if ($key != $menumode) $menumode_other[] = array("title"=>$val, "link"=>$menu_url.$key); -} - - -$newbb_module_header = ''; -$newbb_module_header .= '<link rel="alternate" type="application/rss+xml" title="'.$xoopsModule->getVar("name").'" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', "n").'/rss.php" />'; -if (!empty($xoopsModuleConfig['pngforie_enabled'])) { - $newbb_module_header .= '<style type="text/css">img {behavior:url("include/pngbehavior.htc");}</style>'; -} -$newbb_module_header .= ' - <link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'/templates/style.css" /> - <script type="text/javascript">var toggle_cookie="'.$forumCookie['prefix'].'G'.'";</script> - <script src="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'/include/js/newbb_toggle.js" type="text/javascript"></script> - '; - -if ($menumode == 2) { - $newbb_module_header .= ' - <link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'templates/newbb_menu_hover.css" /> - <style type="text/css">body {behavior:url("include/newbb.htc");}</style> - '; -} - -if ($menumode == 1) { - $newbb_module_header .= ' - <link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'templates/newbb_menu_click.css" /> - <script src="include/js/newbb_menu_click.js" type="text/javascript"></script> - '; -} - -$xoops_module_header = $newbb_module_header; // for cache hack - -if (!empty($xoopsModuleConfig["welcome_forum"]) && is_object($xoopsUser) && !$xoopsUser->getVar('posts')) { - mod_loadFunctions("welcome", "newbb"); -} - -$pollmodules = NULL; -//$module_handler = &xoops_gethandler('module'); -$xoopspoll = &$module_handler->getByDirname('xoopspoll'); -if (is_object($xoopspoll) && $xoopspoll->getVar('isactive')) { - $pollmodules = 'xoopspoll'; -} else { - //Umfrage - $xoopspoll = &$module_handler->getByDirname('umfrage'); - if (is_object($xoopspoll) && $xoopspoll->getVar('isactive')) - $pollmodules = 'umfrage'; -} -$xoopsLogger->stopTime('newBB_Header'); +<?php +/** + * CBB 4.0, or newbb, the forum module for XOOPS project + * + * @copyright The XOOPS Project http://xoops.sf.net + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Taiwen Jiang (phppp or D.J.) <ph...@us...> + * @since 4.00 + * @version $Id$ + * @package module::newbb + */ +include_once '../../mainfile.php'; +defined('XOOPS_ROOT_PATH') or die('Restricted access'); +$xoopsLogger->startTime('newBB_Header'); + +if (!empty($xoopsModuleConfig['do_rewrite'])) { + include_once "seo_url.php"; + /* for seo */ + $toseo_url = array("index.php","viewforum.php","viewtopic.php","rss.php"); + + if(((strpos(getenv('REQUEST_URI'), '.html') === false) && !empty($xoopsModuleConfig['do_rewrite']) && (!isset($_POST) || count($_POST) <= 0))) + { + $redir = false; + if ( strpos(getenv("REQUEST_URI"),"mark_read=") == true || strpos(getenv("REQUEST_URI"),"mark=") == true) { + // Mark Forums + } else { + if ( in_array(basename(getenv('SCRIPT_NAME')),$toseo_url) ) { + //rewrite only for files + + if ( trim(getenv("SCRIPT_NAME")) != '' ) { + if ( strpos(getenv("REQUEST_URI") , "/".SEO_MODULE_NAME."/") === false ) { + $redir = true; + } else if ( getenv("QUERY_STRING") ) { + $redir = true; + } + } + } + } + + if ($redir == true) { + $s = "http://" . getenv('HTTP_HOST') . getenv("REQUEST_URI"); + $s = str_replace("/".REAL_MODULE_NAME."/","/".SEO_MODULE_NAME."/",$s); + $newurl = seo_urls('<a href="'.$s.'"></a>'); + $newurl = str_replace('<a href="','',$newurl); + $newurl = str_replace('"></a>','',$newurl); + if ( !headers_sent() ) { + header("HTTP/1.1 301 Moved Permanently"); + header("Location: $newurl"); + exit(); + } + } + } +} + +include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/include/vars.php"; + +mod_loadFunctions("user", "newbb"); +mod_loadFunctions("topic", "newbb"); + +require_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; +require_once XOOPS_ROOT_PATH."/class/module.textsanitizer.php"; +$myts = MyTextSanitizer::getInstance(); + +$menumode = 0; +$menumode_other = array(); +$menu_url = htmlSpecialChars(preg_replace("/&menumode=[^&]/", "", $_SERVER[ 'REQUEST_URI' ])); +$menu_url .= ( false === strpos($menu_url, "?") ) ? "?menumode=" : "&menumode="; +foreach ($xoopsModuleConfig["valid_menumodes"] as $key => $val) { + if ($key != $menumode) $menumode_other[] = array("title"=>$val, "link"=>$menu_url.$key); +} + + +$newbb_module_header = ''; +$newbb_module_header .= '<link rel="alternate" type="application/rss+xml" title="'.$xoopsModule->getVar("name").'" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', "n").'/rss.php" />'; +if (!empty($xoopsModuleConfig['pngforie_enabled'])) { + $newbb_module_header .= '<style type="text/css">img {behavior:url("include/pngbehavior.htc");}</style>'; +} +// START hacked by irmtfan to add localization/customization for newbb style.css +$dirname=$xoopsModule->getVar('dirname'); +$theme_path = "{$xoopsConfig['theme_set']}/modules/{$dirname}"; +$theme_default_path= "default/modules/{$dirname}"; +$default_path = "modules/{$dirname}/templates"; +$lang_path = "images/language/{$xoopsConfig['language']}"; + + // get from setted theme +if (is_file(XOOPS_THEME_PATH . '/'.$theme_path . '/' . $lang_path . '/style.css')) { + $rel_path=$theme_path . '/' . $lang_path; + // get from default theme +} else if (is_file(XOOPS_THEME_PATH . '/'.$theme_default_path . '/' . $lang_path . '/style.css')) { + $rel_path=$theme_default_path . '/' . $lang_path; + // get from module default path +} else if (is_file(XOOPS_ROOT_PATH. '/'.$default_path . '/' . $lang_path . '/style.css')) { + $rel_path=$default_path . '/' . $lang_path; + // if no one is found get the english from default path +} else if (is_file(XOOPS_ROOT_PATH. '/'.$default_path . '/images/language/english/style.css')) { + $rel_path=$default_path . '/images/language/english'; + // for backward compatibility - as before +} else { + $rel_path=$default_path; +} + +$newbb_module_header .= ' + <link rel="stylesheet" type="text/css" href="'.XOOPS_URL . '/' . $rel_path . '/style.css" /> + <script type="text/javascript">var toggle_cookie="'.$forumCookie['prefix'].'G'.'";</script> + <script src="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'/include/js/newbb_toggle.js" type="text/javascript"></script> + '; +// END hacked by irmtfan to add localization/customization for newbb style.css +if ($menumode == 2) { + $newbb_module_header .= ' + <link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'templates/newbb_menu_hover.css" /> + <style type="text/css">body {behavior:url("include/newbb.htc");}</style> + '; +} + +if ($menumode == 1) { + $newbb_module_header .= ' + <link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'templates/newbb_menu_click.css" /> + <script src="include/js/newbb_menu_click.js" type="text/javascript"></script> + '; +} + +$xoops_module_header = $newbb_module_header; // for cache hack + +if (!empty($xoopsModuleConfig["welcome_forum"]) && is_object($xoopsUser) && !$xoopsUser->getVar('posts')) { + mod_loadFunctions("welcome", "newbb"); +} + +$pollmodules = NULL; +//$module_handler = &xoops_gethandler('module'); +$xoopspoll = &$module_handler->getByDirname('xoopspoll'); +if (is_object($xoopspoll) && $xoopspoll->getVar('isactive')) { + $pollmodules = 'xoopspoll'; +} else { + //Umfrage + $xoopspoll = &$module_handler->getByDirname('umfrage'); + if (is_object($xoopspoll) && $xoopspoll->getVar('isactive')) + $pollmodules = 'umfrage'; +} +$xoopsLogger->stopTime('newBB_Header'); ?> \ No newline at end of file Modified: XoopsModules/newbb/branches/irmtfan/newbb/polls.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/polls.php 2012-08-02 05:24:36 UTC (rev 9976) +++ XoopsModules/newbb/branches/irmtfan/newbb/polls.php 2012-08-02 07:28:11 UTC (rev 9977) @@ -1,570 +1,580 @@ -<?php -/** - * Newbb module - * - * 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 http://www.fsf.org/copyleft/gpl.html GNU public license - * @package newbb - * @since 4.0 - * @author Taiwen Jiang <ph...@us...> - * @version $Id: polls.php 2175 2008-09-23 14:07:03Z phppp $ - */ - - -include_once dirname(__FILE__) . "/header.php"; - -include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; -include_once XOOPS_ROOT_PATH . "/class/xoopslists.php"; -include_once XOOPS_ROOT_PATH . "/class/xoopsblock.php"; - -if ( $pollmodules == 'xoopspoll') -{ - include XOOPS_ROOT_PATH . "/modules/xoopspoll/include/constants.php"; - include_once XOOPS_ROOT_PATH . "/modules/xoopspoll/class/xoopspoll.php"; - include_once XOOPS_ROOT_PATH . "/modules/xoopspoll/class/xoopspolloption.php"; - include_once XOOPS_ROOT_PATH . "/modules/xoopspoll/class/xoopspolllog.php"; - include_once XOOPS_ROOT_PATH . "/modules/xoopspoll/class/xoopspollrenderer.php"; -} -elseif ($pollmodules == 'umfrage') -{ - include XOOPS_ROOT_PATH."/modules/umfrage/include/constants.php"; - include_once XOOPS_ROOT_PATH."/modules/umfrage/class/umfrage.php"; - include_once XOOPS_ROOT_PATH."/modules/umfrage/class/umfrageoption.php"; - include_once XOOPS_ROOT_PATH."/modules/umfrage/class/umfragelog.php"; - include_once XOOPS_ROOT_PATH."/modules/umfrage/class/umfragerenderer.php"; -} -else -{ - redirect_header("javascript:history.go(-1);", 2, _MD_POLLMODULE_ERROR); - exit(); -} - -$op = "add"; -if (isset($_GET['op'])) $op = $_GET['op']; -if (isset($_POST['op'])) $op = $_POST['op']; -if (isset($_GET['poll_id'])) $poll_id = intval($_GET['poll_id']); -if (isset($_POST['poll_id'])) $poll_id = intval($_POST['poll_id']); -if (isset($_GET['topic_id'])) $topic_id = intval($_GET['topic_id']); -if (isset($_POST['topic_id'])) $topic_id = intval($_POST['topic_id']); - -if (!isset($module_handler)) $module_handler =& xoops_gethandler('module'); -$xoopspoll =& $module_handler->getByDirname($pollmodules); -if (!is_object($xoopspoll) || !$xoopspoll->getVar('isactive')) { - redirect_header("javascript:history.go(-1);", 2, _MD_POLLMODULE_ERROR); - exit(); -} - -include XOOPS_ROOT_PATH . "/header.php"; - -$topic_handler =& xoops_getmodulehandler('topic', 'newbb'); -$topic_obj =& $topic_handler->get($topic_id); -$forum = $topic_obj->getVar('forum_id'); -$forum_handler =& xoops_getmodulehandler('forum', 'newbb'); -$forum_obj =& $forum_handler->get($forum); -if (!$forum_handler->getPermission($forum_obj)) { - redirect_header("index.php", 2, _MD_NORIGHTTOACCESS); - exit(); -} -if (!$topic_handler->getPermission($forum_obj, $topic_obj->getVar('topic_status'), "view")) { - redirect_header("viewforum.php?forum=" . $forum_obj->getVar('forum_id'), 2, _MD_NORIGHTTOVIEW); - exit(); -} - -$isadmin = newbb_isAdmin($forum_obj); -$perm = false; -if ($isadmin) { - $perm = true; -} elseif ($topic_handler->getPermission($forum_obj, $topic_obj->getVar('topic_status'), "addpoll") - //&& $forum_obj->getVar('allow_polls') == 1 -) { - if ( ($op=="add" || $op=="save") && !$topic_obj->getVar("topic_haspoll") && is_object($xoopsUser) && $xoopsUser->getVar("uid") == $topic_obj->getVar("topic_poster") ) { - $perm = true; - } elseif (!empty($poll_id)) { - $poll = new XoopsPoll($poll_id); - if (is_object($xoopsUser) && $xoopsUser->getVar("uid") == $poll->getVar("user_id")) { - $perm = true; - } - } -} -if (!$perm) { - redirect_header("viewtopic.php?topic_id=" . $topic_id, 2, _NOPERM); -} - -if ( $op == "add" ) { - $poll_form = new XoopsThemeForm(_MD_POLL_CREATNEWPOLL, "poll_form", "polls.php"); - - $question_text = new XoopsFormText(_MD_POLL_POLLQUESTION, "question", 50, 255); - $poll_form->addElement($question_text, true); - - $desc_tarea = new XoopsFormTextarea(_MD_POLL_POLLDESC, "description"); - $poll_form->addElement($desc_tarea); - - $currenttime = formatTimestamp(time(), "Y-m-d H:i:s"); - $endtime = formatTimestamp(time() + 604800, "Y-m-d H:i:s"); - $expire_text = new XoopsFormText(_MD_POLL_EXPIRATION . "<br /><small>" . _MD_POLL_FORMAT . "<br />" . sprintf(_MD_POLL_CURRENTTIME, $currenttime) . "</small>", "end_time", 30, 19, $endtime); - $poll_form->addElement($expire_text); - - $weight_text = new XoopsFormText(_MD_POLL_DISPLAYORDER, "weight", 6, 5, 0); - $poll_form->addElement($weight_text); - - $multi_yn = new XoopsFormRadioYN(_MD_POLL_ALLOWMULTI, "multiple", 0); - $poll_form->addElement($multi_yn); - - $notify_yn = new XoopsFormRadioYN(_MD_POLL_NOTIFY, "notify", 1); - $poll_form->addElement($notify_yn); - - $option_tray = new XoopsFormElementTray(_MD_POLL_POLLOPTIONS, ""); - $barcolor_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/".$pollmodules."/images/colorbars/"); - for($i = 0; $i < 10; $i++) { - $current_bar = (current($barcolor_array) != "blank.gif") ? current($barcolor_array) : next($barcolor_array); - $option_text = new XoopsFormText("", "option_text[]", 50, 255); - $option_tray->addElement($option_text); - $color_select = new XoopsFormSelect("", "option_color[{$i}]", $current_bar); - $color_select->addOptionArray($barcolor_array); - $color_select->setExtra("onchange='showImgSelected(\"option_color_image[{$i}]\", \"option_color[{$i}]\", \"modules/".$pollmodules."/images/colorbars\", \"\", \"" . XOOPS_URL . "\")'"); - $color_label = new XoopsFormLabel("", "<img src='" . XOOPS_URL . "/modules/".$pollmodules."/images/colorbars/" . $current_bar . "' name='option_color_image[{$i}]' id='option_color_image[{$i}]' width='30' align='bottom' height='15' alt='' /><br />"); - $option_tray->addElement($color_select); - $option_tray->addElement($color_label); - if ( !next($barcolor_array) ) { - reset($barcolor_array); - } - unset($color_select, $color_label); - } - $poll_form->addElement($option_tray); - - $submit_button = new XoopsFormButton("", "poll_submit", _SUBMIT, "submit"); - $poll_form->addElement($submit_button); - $op_hidden = new XoopsFormHidden("op", "save"); - $poll_form->addElement($op_hidden); - $poll_topic_id_hidden = new XoopsFormHidden("topic_id", $topic_id); - $poll_form->addElement($poll_topic_id_hidden); - //include XOOPS_ROOT_PATH . "/header.php"; - echo "<h4>" . _MD_POLL_POLLCONF . "</h4>"; - $poll_form->display(); - //include XOOPS_ROOT_PATH . "/footer.php"; - //exit(); -} - -if ( $op == "save" ) { - /* - * The option check should be done before submitting - */ - $option_empty = true; - if (empty($_POST['option_text'])) { - redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); - } - $option_text = $_POST['option_text']; - foreach ( $option_text as $optxt ) { - if ( trim($optxt) != "" ) { - $option_empty = false; - break; - } - } - if ($option_empty) { - redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); - } - if ( $pollmodules == 'xoopspoll') - $poll = new XoopsPoll(); - else if ( $pollmodules == 'umfrage') - $poll = new Umfrage(); - else die("POLL-ERROR: polls.php Line 190"); - $poll->setVar("question", @$_POST['question']); - $poll->setVar("description", @$_POST['description']); - if ( !empty($_POST['end_time']) ) { - $timezone = is_object($xoopsUser) ? $xoopsUser->getVar("timezone") : null; - $poll->setVar("end_time", userTimeToServerTime(strtotime($_POST['end_time']), $timezone)); - } else { - // if expiration date is not set, set it to 10 days from now - $poll->setVar("end_time", time() + (86400 * 10)); - } - $poll->setVar("display", 0); - $poll->setVar("weight", intval(@$_POST['weight'])); - $poll->setVar("multiple", intval(@$_POST['multiple'])); - if ( !empty($_POST["notify"]) ) { - // if notify, set mail status to "not mailed" - $poll->setVar("mail_status", POLL_NOTMAILED); - } else { - // if not notify, set mail status to already "mailed" - $poll->setVar("mail_status", POLL_MAILED); - } - $uid = is_object($xoopsUser) ? $xoopsUser->getVar("uid") : 0; - $poll->setVar("user_id", $uid); - $new_poll_id = $poll->store(); - $option_color = empty($_POST['option_color']) ? NULL : $_POST['option_color']; - if ( !empty($new_poll_id) ) { - $i = 0; - foreach ( $option_text as $optxt ) { - $optxt = trim($optxt); - if ( $optxt != "" ) { - if ( $pollmodules == 'xoopspoll') - $option = new XoopsPollOption(); - else if ( $pollmodules == 'umfrage') - $option = new UmfrageOption(); - else die("POLL-ERROR: polls.php Line 223"); - $option->setVar("option_text", $optxt); - $option->setVar("option_color", $option_color[$i]); - $option->setVar("poll_id", $new_poll_id); - $option->store(); - } - $i++; - } - $sql = "UPDATE " . $xoopsDB->prefix("bb_topics") . " SET topic_haspoll = 1, poll_id = {$new_poll_id} WHERE topic_id = {$topic_id}"; - if ( !$result = $xoopsDB->query($sql) ) { - xoops_error($xoopsDB->error()); - } - include_once XOOPS_ROOT_PATH . '/class/template.php'; - xoops_template_clear_module_cache($xoopsModule->getVar('mid')); - } else { - xoops_error($poll->getHtmlErrors()); - exit(); - } - redirect_header("viewtopic.php?topic_id={$topic_id}",1,_MD_POLL_DBUPDATED); - //exit(); -} - -if ( $op == "edit" ) { - $pollid = intval($_GET['poll_id']); - if ( $pollmodules == 'xoopspoll') - $poll = new XoopsPoll($pollid); - else if ( $pollmodules == 'umfrage') - $poll = new Umfrage($pollid); - $poll_form = new XoopsThemeForm(_MD_POLL_EDITPOLL, "poll_form", "polls.php"); - $author_label = new XoopsFormLabel(_MD_POLL_AUTHOR, "<a href='" . XOOPS_URL . "/userinfo.php?uid=" . $poll->getVar("user_id") . "'>" . newbb_getUnameFromId($poll->getVar("user_id"), $xoopsModuleConfig['show_realname']) . "</a>"); - $poll_form->addElement($author_label); - $question_text = new XoopsFormText(_MD_POLL_POLLQUESTION, "question", 50, 255, $poll->getVar("question", "E")); - $poll_form->addElement($question_text); - $desc_tarea = new XoopsFormTextarea(_MD_POLL_POLLDESC, "description", $poll->getVar("description", "E")); - $poll_form->addElement($desc_tarea); - $date = formatTimestamp($poll->getVar("end_time"), "Y-m-d H:i:s"); - if ( !$poll->hasExpired() ) { - $expire_text = new XoopsFormText(_MD_POLL_EXPIRATION . "<br /><small>" . _MD_POLL_FORMAT . "<br />" . sprintf(_MD_POLL_CURRENTTIME, formatTimestamp(time(), "Y-m-d H:i:s")) . "</small>", "end_time", 20, 19, $date); - $poll_form->addElement($expire_text); - } else { - $restart_label = new XoopsFormLabel(_MD_POLL_EXPIRATION, sprintf(_MD_POLL_EXPIREDAT, $date) . "<br /><a href='polls.php?op=restart&poll_id=" . $poll->getVar("poll_id") . "'>" . _MD_POLL_RESTART . "</a>"); - $poll_form->addElement($restart_label); - } - $weight_text = new XoopsFormText(_MD_POLL_DISPLAYORDER, "weight", 6, 5, $poll->getVar("weight")); - $poll_form->addElement($weight_text); - $multi_yn = new XoopsFormRadioYN(_MD_POLL_ALLOWMULTI, "multiple", $poll->getVar("multiple")); - $poll_form->addElement($multi_yn); - if ( $pollmodules == 'xoopspoll') - $options_arr = XoopsPollOption::getAllByPollId($poll->getVar("poll_id")); - else - $options_arr =& UmfrageOption::getAllByPollId($poll->getVar("poll_id")); - $notify_value = 1; - if ( $poll->getVar("mail_status") != 0 ) { - $notify_value = 0; - } - $notify_yn = new XoopsFormRadioYN(_MD_POLL_NOTIFY, "notify", $notify_value); - $poll_form->addElement($notify_yn); - $option_tray = new XoopsFormElementTray(_MD_POLL_POLLOPTIONS, ""); - $barcolor_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/".$pollmodules."/images/colorbars/"); - $i = 0; - foreach ($options_arr as $option) { - $option_text = new XoopsFormText("", "option_text[]", 50, 255, $option->getVar("option_text")); - $option_tray->addElement($option_text); - $option_id_hidden = new XoopsFormHidden("option_id[]", $option->getVar("option_id")); - $option_tray->addElement($option_id_hidden); - $color_select = new XoopsFormSelect("", "option_color[{$i}]", $option->getVar("option_color")); - $color_select->addOptionArray($barcolor_array); - $color_select->setExtra("onchange='showImgSelected(\"option_color_image[{$i}]\", \"option_color[".$i."]\", \"modules/".$pollmodules."/images/colorbars\", \"\", \"" . XOOPS_URL . "\")'"); - $color_label = new XoopsFormLabel("", "<img src='" . XOOPS_URL . "/modules/".$pollmodules."/images/colorbars/" . $option->getVar("option_color", "E") . "' name='option_color_image[{$i}]' id='option_color_image[{$i}]' width='30' align='bottom' height='15' alt='' /><br />"); - $option_tray->addElement($color_select); - $option_tray->addElement($color_label); - unset($color_select, $color_label, $option_id_hidden, $option_text); - $i++; - } - $more_label = new XoopsFormLabel("", "<br /><a href='polls.php?op=addmore&poll_id=" . $poll->getVar("poll_id") . "&topic_id=" . $topic_id . "'>" . _MD_POLL_ADDMORE . "</a>"); - $option_tray->addElement($more_label); - $poll_form->addElement($option_tray); - $op_hidden = new XoopsFormHidden("op", "update"); - $poll_form->addElement($op_hidden); - $poll_topic_id_hidden = new XoopsFormHidden("topic_id", $topic_id); - $poll_form->addElement($poll_topic_id_hidden); - $poll_id_hidden = new XoopsFormHidden("poll_id", $poll->getVar("poll_id")); - $poll_form->addElement($poll_id_hidden); - $submit_button = new XoopsFormButton("", "poll_submit", _SUBMIT, "submit"); - $poll_form->addElement($submit_button); - //include XOOPS_ROOT_PATH . "/header.php"; - echo "<h4>" . _MD_POLL_POLLCONF . "</h4>"; - $poll_form->display(); - //include XOOPS_ROOT_PATH . "/footer.php"; - //exit(); -} - -if ( $op == "update" ) { - $option_empty = true; - if (empty($_POST['option_text'])) { - redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); - } - $option_text = $_POST['option_text']; - foreach ( $option_text as $optxt ) { - if ( trim($optxt) != "" ) { - $option_empty = false; - break; - } - } - if ($option_empty) redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); - - if ( $pollmodules == 'xoopspoll') - $poll = new XoopsPoll($poll_id); - else - $poll = new Umfrage($poll_id); - $poll->setVar("question", @$_POST['question']); - $poll->setVar("description", @$_POST['description']); - $end_time = (empty($_POST['end_time'])) ? "" : $_POST['end_time']; - if ( !empty($end_time) ) { - $timezone = is_object($xoopsUser) ? $xoopsUser->getVar("timezone") : null; - $poll->setVar("end_time", userTimeToServerTime(strtotime($end_time), $timezone)); - } - $poll->setVar("display", 0); - $poll->setVar("weight", intval(@$_POST['weight'])); - $poll->setVar("multiple", intval(@$_POST['multiple'])); - if ( !empty($_POST["notify"]) && $end_time > time() ) { - // if notify, set mail status to "not mailed" - $poll->setVar("mail_status", POLL_NOTMAILED); - } else { - // if not notify, set mail status to already "mailed" - $poll->setVar("mail_status", POLL_MAILED); - } - if ( !$poll->store() ) { - exit(); - } - $i = 0; - $option_id = (empty($_POST['option_id'])) ? NULL : $_POST['option_id']; - $option_color = (empty($_POST['option_color'])) ? NULL : $_POST['option_color']; - foreach ( $option_id as $opid ) { - if ( $pollmodules == 'xoopspoll') { - $option = new XoopsPollOption($opid); - $option_text[$i] = trim ($option_text[$i]); - if ( $option_text[$i] != "" ) { - $option->setVar("option_text", $option_text[$i]); - $option->setVar("option_color", $option_color[$i]); - $option->store(); - } else { - if ( $option->delete() != false ) { - XoopsPollLog::deleteByOptionId($option->getVar("option_id")); - } - } - } else { - $option = new UmfrageOption($opid); - $option_text[$i] = trim ($option_text[$i]); - if ( $option_text[$i] != "" ) { - $option->setVar("option_text", $option_text[$i]); - $option->setVar("option_color", $option_color[$i]); - $option->store(); - } else { - if ( $option->delete() != false ) { - UmfrageLog::deleteByOptionId($option->getVar("option_id")); - } - } - } - $i++; - } - $poll->updateCount(); - include_once XOOPS_ROOT_PATH . '/class/template.php'; - xoops_template_clear_module_cache($xoopsModule->getVar('mid')); - redirect_header("viewtopic.php?topic_id={$topic_id}", 1, _MD_POLL_DBUPDATED); - //exit(); -} - -if ( $op == "addmore" ) { - $pollid = intval($_GET['poll_id']); - if ( $pollmodules == 'xoopspoll') - $poll = new XoopsPoll($pollid); - else if ( $pollmodules == 'umfrage') - $poll = new Umfrage($pollid); - $poll_form = new XoopsThemeForm(_MD_POLL_ADDMORE, "poll_form", "polls.php"); - $question_label = new XoopsFormLabel(_MD_POLL_POLLQUESTION, $poll->getVar("question")); - $poll_form->addElement($question_label); - $option_tray = new XoopsFormElementTray(_MD_POLL_POLLOPTIONS, ""); - $barcolor_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/".$pollmodules."/images/colorbars/"); - for($i = 0; $i < 10; $i++) { - $current_bar = (current($barcolor_array) != "blank.gif") ? current($barcolor_array) : next($barcolor_array); - $option_text = new XoopsFormText("", "option_text[]", 50, 255); - $option_tray->addElement($option_text); - $color_select = new XoopsFormSelect("", "option_color[{$i}]", $current_bar); - $color_select->addOptionArray($barcolor_array); - $color_select->setExtra("onchange='showImgSelected(\"option_color_image[{$i}]\", \"option_color[{$i}]\", \"modules/".$pollmodules."/images/colorbars\", \"\", \"" . XOOPS_URL . "\")'"); - $color_label = new XoopsFormLabel("", "<img src='" . XOOPS_URL . "/modules/".$pollmodules."/images/colorbars/{$current_bar}' name='option_color_image[{$i}]' id='option_color_image[{$i}]' width='30' align='bottom' height='15' alt='' /><br />"); - $option_tray->addElement($color_select); - $option_tray->addElement($color_label); - unset($color_select, $color_label, $option_text); - if ( !next($barcolor_array) ) { - reset($barcolor_array); - } - } - $poll_form->addElement($option_tray); - $submit_button = new XoopsFormButton("", "poll_submit", _SUBMIT, "submit"); - $poll_form->addElement($submit_button); - $op_hidden = new XoopsFormHidden("op", "savemore"); - $poll_form->addElement($op_hidden); - $poll_topic_id_hidden = new XoopsFormHidden("topic_id", $topic_id); - $poll_form->addElement($poll_topic_id_hidden); - $poll_id_hidden = new XoopsFormHidden("poll_id", $poll->getVar("poll_id")); - $poll_form->addElement($poll_id_hidden); - //include XOOPS_ROOT_PATH . "/header.php"; - echo "<h4>" . _MD_POLL_POLLCONF . "</h4>"; - $poll_form->display(); - //include XOOPS_ROOT_PATH . "/footer.php"; - //exit(); -} - -if ( $op == "savemore" ) { - $option_empty = true; - if (empty($_POST['option_text'])) { - redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); - } - $option_text = $_POST['option_text']; - foreach ( $option_text as $optxt ) { - if ( trim($optxt) != "" ) { - $option_empty = false; - break; - } - } - if ($option_empty) redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); - - if ( $pollmodules == 'xoopspoll') - $poll = new XoopsPoll($poll_id); - else - $poll = new Umfrage($poll_id); - $i = 0; - $option_color = (empty($_POST['option_color'])) ? NULL : $_POST['option_color']; - foreach ( $option_text as $optxt ) { - $optxt = trim($optxt); - if ( $optxt != "" ) { - if ( $pollmodules == 'xoopspoll') $option = new XoopsPollOption(); - else $option = new UmfrageOption(); - $option->setVar("option_text", $optxt); - $option->setVar("poll_id", $poll->getVar("poll_id")); - $option->setVar("option_color", $option_color[$i]); - $option->store(); - } - $i++; - } - include_once XOOPS_ROOT_PATH . '/class/template.php'; - xoops_template_clear_module_cache($xoopsModule->getVar('mid')); - redirect_header("polls.php?op=edit&poll_id=" . $poll->getVar("poll_id") . "&topic_id=" . $topic_id, 1, _MD_POLL_DBUPDATED); - //exit(); -} - -if ( $op == "delete" ) { - //include XOOPS_ROOT_PATH . "/header.php"; - echo "<h4>" . _MD_POLL_POLLCONF . "</h4>"; - $poll = new XoopsPoll($_GET['poll_id']); - xoops_confirm(array('op' => 'delete_ok', 'topic_id' => $topic_id, 'poll_id' => $poll->getVar('poll_id')), 'polls.php', sprintf(_MD_POLL_RUSUREDEL, $poll->getVar("question"))); - //include XOOPS_ROOT_PATH . "/footer.php"; - //exit(); -} - -if ( $op == "delete_ok" ) { - if ( $pollmodules == 'xoopspoll') - $poll = new XoopsPoll($poll_id); - else - $poll = new Umfrage($poll_id); - if ( $poll->delete() != false ) { - if ( $pollmodules == 'xoopspoll') { - XoopsPollOption::deleteByPollId($poll->getVar("poll_id")); - XoopsPollLog::deleteByPollId($poll->getVar("poll_id")); - } else { - UmfrageOption::deleteByPollId($poll->getVar("poll_id")); - UmfrageLog::deleteByPollId($poll->getVar("poll_id")); - } - include_once XOOPS_ROOT_PATH . '/class/template.php'; - xoops_template_clear_module_cache($xoopsModule->getVar('mid')); - // delete comments for this poll - xoops_comment_delete($xoopsModule->getVar('mid'), $poll->getVar('poll_id')); - $sql = "UPDATE " . $xoopsDB->prefix("bb_topics") . " SET votes = 0, topic_haspoll = 0, poll_id = 0 WHERE topic_id = {$topic_id}"; - if ( !$result = $xoopsDB->query($sql) ) { - //xoops_error($xoopsDB->error()); - } - } - redirect_header("viewtopic.php?topic_id={$topic_id}", 1, _MD_POLL_DBUPDATED); - //exit(); -} - -if ( $op == "restart" ) { - $pollid = intval($_GET['poll_id']); - if ( $pollmodules == 'xoopspoll') - $poll = new XoopsPoll($pollid); - else if ( $pollmodules == 'umfrage') - $poll = new Umfrage($pollid); - $poll_form = new XoopsThemeForm(_MD_POLL_RESTARTPOLL, "poll_form", "polls.php"); - $expire_text = new XoopsFormText(_MD_POLL_EXPIRATION . "<br /><small>" . _MD_POLL_FORMAT . "<br />" . sprintf(_MD_POLL_CURRENTTIME, formatTimestamp(time(), "Y-m-d H:i:s")) . "</small>", "end_time", 20, 19, formatTimestamp(time() + 604800, "Y-m-d H:i:s")); - $poll_form->addElement($expire_text); - $notify_yn = new XoopsFormRadioYN(_MD_POLL_NOTIFY, "notify", 1); - $poll_form->addElement($notify_yn); - $reset_yn = new XoopsFormRadioYN(_MD_POLL_RESET, "reset", 0); - $poll_form->addElement($reset_yn); - $op_hidden = new XoopsFormHidden("op", "restart_ok"); - $poll_form->addElement($op_hidden); - $poll_topic_id_hidden = new XoopsFormHidden("topic_id", $topic_id); - $poll_form->addElement($poll_topic_id_hidden); - $poll_id_hidden = new XoopsFormHidden("poll_id", $poll->getVar("poll_id")); - $poll_form->addElement($poll_id_hidden); - $submit_button = new XoopsFormButton("", "poll_submit", _MD_POLL_RESTART, "submit"); - $poll_form->addElement($submit_button); - //include XOOPS_ROOT_PATH . "/header.php"; - echo "<h4>" . _MD_POLL_POLLCONF . "</h4>"; - $poll_form->display(); - //include XOOPS_ROOT_PATH . "/footer.php"; - //exit(); -} - -if ( $op == "restart_ok" ) { - if ( $pollmodules == 'xoopspoll') - $poll = new XoopsPoll($poll_id); - else - $poll = new Umfrage($poll_id); - $end_time = (empty($_POST['end_time'])) ? "" : $_POST['end_time']; - if ( !empty($end_time) ) { - $timezone = is_object($xoopsUser) ? $xoopsUser->getVar("timezone") : null; - $poll->setVar("end_time", userTimeToServerTime(strtotime($end_time), $timezone)); - } else { - $poll->setVar("end_time", time() + (86400 * 10)); - } - if ( !empty($_POST["notify"]) && $end_time > time() ) { - // if notify, set mail status to "not mailed" - $poll->setVar("mail_status", POLL_NOTMAILED); - } else { - // if not notify, set mail status to already "mailed" - $poll->setVar("mail_status", POLL_MAILED); - } - if ( !empty($_POST["reset"]) ) { - // reset all logs - if ( $pollmodules == 'xoopspoll') { - XoopsPollLog::deleteByPollId($poll->getVar("poll_id")); - XoopsPollOption::resetCountByPollId($poll->getVar("poll_id")); - } else { - UmfrageLog::deleteByPollId($poll->getVar("poll_id")); - UmfrageOption::resetCountByPollId($poll->getVar("poll_id")); - } - } - if (!$poll->store()) { - //xoops_error($poll->getHtmlErrors()); - exit(); - } - $poll->updateCount(); - include_once XOOPS_ROOT_PATH . '/class/template.php'; - xoops_template_clear_module_cache($xoopsModule->getVar('mid')); - redirect_header("viewtopic.php?topic_id={$topic_id}", 1, _MD_POLL_DBUPDATED); - //exit(); -} - -if ( $op == "log" ) { - //include XOOPS_ROOT_PATH . "/header.php"; - echo "<h4>" . _MD_POLL_POLLCONF . "</h4>"; - echo "<br />View Log<br /> Sorry, not yet. ;-)"; - //include XOOPS_ROOT_PATH . "/footer.php"; - //exit(); -} - -include XOOPS_ROOT_PATH . "/footer.php"; +<?php +/** + * Newbb module + * + * 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 http://www.fsf.org/copyleft/gpl.html GNU public license + * @package newbb + * @since 4.0 + * @author Taiwen Jiang <ph...@us...> + * @version $Id: polls.php 2175 2008-09-23 14:07:03Z phppp $ + */ + + +include_once dirname(__FILE__) . "/header.php"; + +include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; +include_once XOOPS_ROOT_PATH . "/class/xoopslists.php"; +include_once XOOPS_ROOT_PATH . "/class/xoopsblock.php"; + +if ( $pollmodules == 'xoopspoll') +{ + include XOOPS_ROOT_PATH . "/modules/xoopspoll/include/constants.php"; + include_once XOOPS_ROOT_PATH . "/modules/xoopspoll/class/xoopspoll.php"; + include_once XOOPS_ROOT_PATH . "/modules/xoopspoll/class/xoopspolloption.php"; + include_once XOOPS_ROOT_PATH . "/modules/xoopspoll/class/xoopspolllog.php"; + include_once XOOPS_ROOT_PATH . "/modules/xoopspoll/class/xoopspollrenderer.php"; +} +elseif ($pollmodules == 'umfrage') +{ + include XOOPS_ROOT_PATH."/modules/umfrage/include/constants.php"; + include_once XOOPS_ROOT_PATH."/modules/umfrage/class/umfrage.php"; + include_once XOOPS_ROOT_PATH."/modules/umfrage/class/umfrageoption.php"; + include_once XOOPS_ROOT_PATH."/modules/umfrage/class/umfragelog.php"; + include_once XOOPS_ROOT_PATH."/modules/umfrage/class/umfragerenderer.php"; +} +else +{ + redirect_header("javascript:history.go(-1);", 2, _MD_POLLMODULE_ERROR); + exit(); +} + +$op = "add"; +if (isset($_GET['op'])) $op = $_GET['op']; +if (isset($_POST['op'])) $op = $_POST['op']; +if (isset($_GET['poll_id'])) $poll_id = intval($_GET['poll_id']); +if (isset($_POST['poll_id'])) $poll_id = intval($_POST['poll_id']); +if (isset($_GET['topic_id'])) $topic_id = intval($_GET['topic_id']); +if (isset($_POST['topic_id'])) $topic_id = intval($_POST['topic_id']); + +if (!isset($module_handler)) $module_handler =& xoops_gethandler('module'); +$xoopspoll =& $module_handler->getByDirname($pollmodules); +if (!is_object($xoopspoll) || !$xoopspoll->getVar('isactive')) { + redirect_header("javascript:history.go(-1);", 2, _MD_POLLMODULE_ERROR); + exit(); +} + +include XOOPS_ROOT_PATH . "/header.php"; + +$topic_handler =& xoops_getmodulehandler('topic', 'newbb'); +$topic_obj =& $topic_handler->get($topic_id); +$forum = $topic_obj->getVar('forum_id'); +$forum_handler =& xoops_getmodulehandler('forum', 'newbb'); +$forum_obj =& $forum_handler->get($forum); +if (!$forum_handler->getPermission($forum_obj)) { + redirect_header("index.php", 2, _MD_NORIGHTTOACCESS); + exit(); +} +if (!$topic_handler->getPermission($forum_obj, $topic_obj->getVar('topic_status'), "view")) { + redirect_header("viewforum.php?forum=" . $forum_obj->getVar('forum_id'), 2, _MD_NORIGHTTOVIEW); + exit(); +} + +$isadmin = newbb_isAdmin($forum_obj); +$perm = false; +if ($isadmin) { + $perm = true; +} elseif ($topic_handler->getPermission($forum_obj, $topic_obj->getVar('topic_status'), "addpoll") + //&& $forum_obj->getVar('allow_polls') == 1 +) { + if ( ($op=="add" || $op=="save") && !$topic_obj->getVar("topic_haspoll") && is_object($xoopsUser) && $xoopsUser->getVar("uid") == $topic_obj->getVar("topic_poster") ) { + $perm = true; + } elseif (!empty($poll_id)) { + $poll = new XoopsPoll($poll_id); + if (is_object($xoopsUser) && $xoopsUser->getVar("uid") == $poll->getVar("user_id")) { + $perm = true; + } + } +} +if (!$perm) { + redirect_header("viewtopic.php?topic_id=" . $topic_id, 2, _NOPERM); +} + +if ( $op == "add" ) { + $poll_form = new XoopsThemeForm(_MD_POLL_CREATNEWPOLL, "poll_form", "polls.php"); + + $question_text = new XoopsFormText(_MD_POLL_POLLQUESTION, "question", 50, 255); + $poll_form->addElement($question_text, true); + + $desc_tarea = new XoopsFormTextarea(_MD_POLL_POLLDESC, "description"); + $poll_form->addElement($desc_tarea); + + $currenttime = formatTimestamp(time(), "Y-m-d H:i:s"); + $endtime = formatTimestamp(time() + 604800, "Y-m-d H:i:s"); + $expire_text = new XoopsFormText(_MD_POLL_EXPIRATION . "<br /><small>" . _MD_POLL_FORMAT . "<br />" . sprintf(_MD_POLL_CURRENTTIME, $currenttime) . "</small>", "end_time", 30, 19, $endtime); + $poll_form->addElement($expire_text); + + $weight_text = new XoopsFormText(_MD_POLL_DISPLAYORDER, "weight", 6, 5, 0); + $poll_form->addElement($weight_text); + + $multi_yn = new XoopsFormRadioYN(_MD_POLL_ALLOWMULTI, "multiple", 0); + $poll_form->addElement($multi_yn); + + $notify_yn = new XoopsFormRadioYN(_MD_POLL_NOTIFY, "notify", 1); + $poll_form->addElement($notify_yn); + + $option_tray = new XoopsFormElementTray(_MD_POLL_POLLOPTIONS, ""); + $barcolor_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/".$pollmodules."/images/colorbars/"); + for($i = 0; $i < 10; $i++) { + $current_bar = (current($barcolor_array) != "blank.gif") ? current($barcolor_array) : next($barcolor_array); + $option_text = new XoopsFormText("", "option_text[]", 50, 255); + $option_tray->addElement($option_text); + $color_select = new XoopsFormSelect("", "option_color[{$i}]", $current_bar); + $color_select->addOptionArray($barcolor_array); + $color_select->setExtra("onchange='showImgSelected(\"option_color_image[{$i}]\", \"option_color[{$i}]\", \"modules/".$pollmodules."/images/colorbars\", \"\", \"" . XOOPS_URL . "\")'"); + $color_label = new XoopsFormLabel("", "<img src='" . XOOPS_URL . "/modules/".$pollmodules."/images/colorbars/" . $current_bar . "' name='option_color_image[{$i}]' id='option_color_image[{$i}]' width='30' align='bottom' height='15' alt='' /><br />"); + $option_tray->addElement($color_select); + $option_tray->addElement($color_label); + if ( !next($barcolor_array) ) { + reset($barcolor_array); + } + unset($color_select, $color_label); + } + $poll_form->addElement($option_tray); + + $submit_button = new XoopsFormButton("", "poll_submit", _SUBMIT, "submit"); + $poll_form->addElement($submit_button); + $op_hidden = new XoopsFormHidden("op", "save"); + $poll_form->addElement($op_hidden); + $poll_topic_id_hidden = new XoopsFormHidden("topic_id", $topic_id); + $poll_form->addElement($poll_topic_id_hidden); + //include XOOPS_ROOT_PATH . "/header.php"; + echo "<h4>" . _MD_POLL_POLLCONF . "</h4>"; + $poll_form->display(); + //include XOOPS_ROOT_PATH . "/footer.php"; + //exit(); +} + +if ( $op == "save" ) { + /* + * The option check should be done before submitting + */ + $option_empty = true; + if (empty($_POST['option_text'])) { + redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); + } + $option_text = $_POST['option_text']; + foreach ( $option_text as $optxt ) { + if ( trim($optxt) != "" ) { + $option_empty = false; + break; + } + } + if ($option_empty) { + redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); + } + if ( $pollmodules == 'xoopspoll') + $poll = new XoopsPoll(); + else if ( $pollmodules == 'umfrage') + $poll = new Umfrage(); + else die("POLL-ERROR: polls.php Line 190"); + $poll->setVar("question", @$_POST['question']); + $poll->setVar("description", @$_POST['description']); + if ( !empty($_POST['end_time']) ) { + $timezone = is_object($xoopsUser) ? $xoopsUser->getVar("timezone") : null; +// Start user input time in hegira date - hacked by irmtfan (www.jadoogaran.org) +// $_POST['end_time']=inputTimeToGregorian($_POST['end_time']); + $poll->setVar("end_time", userTimeToServerTime(XoopsLocal::strtotime($_POST['end_time']), $timezone)); +// End user input time in hegira date - hacked by irmtfan (www.jadoogaran.org) + } else { + // if expiration date is not set, set it to 10 days from now + $poll->setVar("end_time", time() + (86400 * 10)); + } + $poll->setVar("display", 0); + $poll->setVar("weight", intval(@$_POST['weight'])); + $poll->setVar("multiple", intval(@$_POST['multiple'])); + if ( !empty($_POST["notify"]) ) { + // if notify, set mail status to "not mailed" + $poll->setVar("mail_status", POLL_NOTMAILED); + } else { + // if not notify, set mail status to already "mailed" + $poll->setVar("mail_status", POLL_MAILED); + } + $uid = is_object($xoopsUser) ? $xoopsUser->getVar("uid") : 0; + $poll->setVar("user_id", $uid); + $new_poll_id = $poll->store(); + $option_color = empty($_POST['option_color']) ? NULL : $_POST['option_color']; + if ( !empty($new_poll_id) ) { + $i = 0; + foreach ( $option_text as $optxt ) { + $optxt = trim($optxt); + if ( $optxt != "" ) { + if ( $pollmodules == 'xoopspoll') + $option = new XoopsPollOption(); + else if ( $pollmodules == 'umfrage') + $option = new UmfrageOption(); + else die("POLL-ERROR: polls.php Line 223"); + $option->setVar("option_text", $optxt); + $option->setVar("option_color", $option_color[$i]); + $option->setVar("poll_id", $new_poll_id); + $option->store(); + } + $i++; + } + $sql = "UPDATE " . $xoopsDB->prefix("bb_topics") . " SET topic_haspoll = 1, poll_id = {$new_poll_id} WHERE topic_id = {$topic_id}"; + if ( !$result = $xoopsDB->query($sql) ) { + xoops_error($xoopsDB->error()); + } + include_once XOOPS_ROOT_PATH . '/class/template.php'; + xoops_template_clear_module_cache($xoopsModule->getVar('mid')); + } else { + xoops_error($poll->getHtmlErrors()); + exit(); + } + redirect_header("viewtopic.php?topic_id={$topic_id}",1,_MD_POLL_DBUPDATED); + //exit(); +} + +if ( $op == "edit" ) { + $pollid = intval($_GET['poll_id']); + if ( $pollmodules == 'xoopspoll') + $poll = new XoopsPoll($pollid); + else if ( $pollmodules == 'umfrage') + $poll = new Umfrage($pollid); + $poll_form = new XoopsThemeForm(_MD_POLL_EDITPOLL, "poll_form", "polls.php"); + $author_label = new XoopsFormLabel(_MD_POLL_AUTHOR, "<a href='" . XOOPS_URL . "/userinfo.php?uid=" . $poll->getVar("user_id") . "'>" . newbb_getUnameFromId($poll->getVar("user_id"), $xoopsModuleConfig['show_realname']) . "</a>"); + $poll_form->addElement($author_label); + $question_text = new XoopsFormText(_MD_POLL_POLLQUESTION, "question", 50, 255, $poll->getVar("question", "E")); + $poll_form->addElement($question_text); + $desc_tarea = new XoopsFormTextarea(_MD_POLL_POLLDESC, "description", $poll->getVar("description", "E")); + $poll_form->addElement($desc_tarea); + $date = formatTimestamp($poll->getVar("end_time"), "Y-m-d H:i:s"); + if ( !$poll->hasExpired() ) { + $expire_text = new XoopsFormText(_MD_POLL_EXPIRATION . "<br /><small>" . _MD_POLL_FORMAT . "<br />" . sprintf(_MD_POLL_CURRENTTIME, formatTimestamp(time(), "Y-m-d H:i:s")) . "</small>", "end_time", 20, 19, $date); + $poll_form->addElement($expire_text); + } else { + $restart_label = new XoopsFormLabel(_MD_POLL_EXPIRATION, sprintf(_MD_POLL_EXPIREDAT, $date) . "<br /><a href='polls.php?op=restart&poll_id=" . $poll->getVar("poll_id") . "'>" . _MD_POLL_RESTART . "</a>"); + $poll_form->addElement($restart_label); + } + $weight_text = new XoopsFormText(_MD_POLL_DISPLAYORDER, "weight", 6, 5, $poll->getVar("weight")); + $poll_form->addElement($weight_text); + $multi_yn = new XoopsFormRadioYN(_MD_POLL_ALLOWMULTI, "multiple", $poll->getVar("multiple")); + $poll_form->addElement($multi_yn); + if ( $pollmodules == 'xoopspoll') + $options_arr = XoopsPollOption::getAllByPollId($poll->getVar("poll_id")); + else + $options_arr =& UmfrageOption::getAllByPollId($poll->getVar("poll_id")); + $notify_value = 1; + if ( $poll->getVar("mail_status") != 0 ) { + $notify_value = 0; + } + $notify_yn = new XoopsFormRadioYN(_MD_POLL_NOTIFY, "notify", $notify_value); + $poll_form->addElement($notify_yn); + $option_tray = new XoopsFormElementTray(_MD_POLL_POLLOPTIONS, ""); + $barcolor_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/".$pollmodules."/images/colorbars/"); + $i = 0; + foreach ($options_arr as $option) { + $option_text = new XoopsFormText("", "option_text[]", 50, 255, $option->getVar("option_text")); + $option_tray->addElement($option_text); + $option_id_hidden = new XoopsFormHidden("option_id[]", $option->getVar("option_id")); + $option_tray->addElement($option_id_hidden); + $color_select = new XoopsFormSelect("", "option_color[{$i}]", $option->getVar("option_color")); + $color_select->addOptionArray($barcolor_array); + $color_select->setExtra("onchange='showImgSelected(\"option_color_image[{$i}]\", \"option_color[".$i."]\", \"modules/".$pollmodules."/images/colorbars\", \"\", \"" . XOOPS_URL . "\")'"); + $color_label = new XoopsFormLabel("", "<img src='" . XOOPS_URL . "/modules/".$pollmodules."/images/colorbars/" . $option->getVar("option_color", "E") . "' name='option_color_image[{$i}]' id='option_color_image[{$i}]' width='30' align='bottom' height='15' alt='' /><br />"); + $option_tray->addElement($color_select); + $option_tray->addElement($color_label); + unset($color_select, $color_label, $option_id_hidden, $option_text); + $i++; + } + $more_label = new XoopsFormLabel("", "<br /><a href='polls.php?op=addmore&poll_id=" . $poll->getVar("poll_id") . "&topic_id=" . $topic_id . "'>" . _MD_POLL_ADDMORE . "</a>"); + $option_tray->addElement($more_label); + $poll_form->addElement($option_tray); + $op_hidden = new XoopsFormHidden("op", "update"); + $poll_form->addElement($op_hidden); + $poll_topic_id_hidden = new XoopsFormHidden("topic_id", $topic_id); + $poll_form->addElement($poll_topic_id_hidden); + $poll_id_hidden = new XoopsFormHidden("poll_id", $poll->getVar("poll_id")); + $poll_form->addElement($poll_id_hidden); + $submit_button = new XoopsFormButton("", "poll_submit", _SUBMIT, "submit"); + $poll_form->addElement($submit_button); + //include XOOPS_ROOT_PATH . "/header.php"; + echo "<h4>" . _MD_POLL_POLLCONF . "</h4>"; + $poll_form->display(); + //include XOOPS_ROOT_PATH . "/footer.php"; + //exit(); +} + +if ( $op == "update" ) { + $option_empty = true; + if (empty($_POST['option_text'])) { + redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); + } + $option_text = $_POST['option_text']; + foreach ( $option_text as $optxt ) { + if ( trim($optxt) != "" ) { + $option_empty = false; + break; + } + } + if ($option_empty) redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); + + if ( $pollmodules == 'xoopspoll') + $poll = new XoopsPoll($poll_id); + else + $poll = new Umfrage($poll_id); + $poll->setVar("question", @$_POST['question']); + $poll->setVar("description", @$_POST['description']); + $end_time = (empty($_POST['end_time'])) ? "" : $_POST['end_time']; + if ( !empty($end_time) ) { + $timezone = is_object($xoopsUser) ? $xoopsUser->getVar("timezone") : null; +// Start user input time in hegira date - hacked by irmtfan (www.jadoogaran.org) +// $end_time=inputTimeToGregorian($end_time); + $poll->setVar("end_time", userTimeToServerTime(XoopsLocal::strtotime($end_time), $timezone)); +// End user input time in hegira date - hacked by irmtfan (www.jadoogaran.org) + + } + $poll->setVar("display", 0); + $poll->setVar("weight", intval(@$_POST['weight'])); + $poll->setVar("multiple", intval(@$_POST['multiple'])); + if ( !empty($_POST["notify"]) && $end_time > time() ) { + // if notify, set mail status to "not mailed" + $poll->setVar("mail_status", POLL_NOTMAILED); + } else { + // if not notify, set mail status to already "mailed" + $poll->setVar("mail_status", POLL_MAILED); + } + if ( !$poll->store() ) { + exit(); + } + $i = 0; + $option_id = (empty($_POST['option_id'])) ? NULL : $_POST['option_id']; + $option_color = (empty($_POST['option_color'])) ? NULL : $_POST['option_color']; + foreach ( $option_id as $opid ) { + if ( $pollmodules == 'xoopspoll') { + $option = new XoopsPollOption($opid); + $option_text[$i] = trim ($option_text[$i]); + if ( $option_text[$i] != "" ) { + $option->setVar("option_text", $option_text[$i]); + $option->setVar("option_color", $option_color[$i]); + $option->store(); + } else { + if ( $option->delete() != false ) { + XoopsPollLog::deleteByOptionId($option->getVar("option_id")); + } + } + } else { + $option = new UmfrageOption($opid); + $option_text[$i] = trim ($option_text[$i]); + if ( $option_text[$i] != "" ) { + $option->setVar("option_text", $option_text[$i]); + $option->setVar("option_color", $option_color[$i]); + $option->store(); + } else { + if ( $option->delete() != false ) { + UmfrageLog::deleteByOptionId($option->getVar("option_id")); + } + } + } + $i++; + } + $poll->updateCount(); + include_once XOOPS_ROOT_PATH . '/class/template.php'; + xoops_template_clear_module_cache($xoopsModule->getVar('mid')); + redirect_header("viewtopic.php?topic_id={$topic_id}", 1, _MD_POLL_DBUPDATED); + //exit(); +} + +if ( $op == "addmore" ) { + $pollid = intval($_GET['poll_id']); + if ( $pollmodules == 'xoopspoll') + $poll = new XoopsPoll($pollid); + else if ( $pollmodules == 'umfrage') + $poll = new Umfrage($pollid); + $poll_form = new XoopsThemeForm(_MD_POLL_ADDMORE, "poll_form", "polls.php"); + $question_label = new XoopsFormLabel(_MD_POLL_POLLQUESTION, $poll->getVar("question")); + $poll_form->addElement($question_label); + $option_tray = new XoopsFormElementTray(_MD_POLL_POLLOPTIONS, ""); + $barcolor_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/".$pollmodules."/images/colorbars/"); + for($i = 0; $i < 10; $i++) { + $current_bar = (current($barcol... [truncated message content] |
From: <ir...@us...> - 2012-08-02 05:24:44
|
Revision: 9976 http://xoops.svn.sourceforge.net/xoops/?rev=9976&view=rev Author: irmtfan Date: 2012-08-02 05:24:36 +0000 (Thu, 02 Aug 2012) Log Message: ----------- deleted the last revision 9947. there was mistakenly updated Revision Links: -------------- http://xoops.svn.sourceforge.net/xoops/?rev=9947&view=rev Modified Paths: -------------- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev9883.txt XoopsModules/newbb/branches/irmtfan/newbb/class/user.php XoopsModules/newbb/branches/irmtfan/newbb/docs/changelog.txt XoopsModules/newbb/branches/irmtfan/newbb/header.php XoopsModules/newbb/branches/irmtfan/newbb/include/plugin.php XoopsModules/newbb/branches/irmtfan/newbb/language/persian/admin.php XoopsModules/newbb/branches/irmtfan/newbb/language/persian/main.php XoopsModules/newbb/branches/irmtfan/newbb/language/persian/modinfo.php XoopsModules/newbb/branches/irmtfan/newbb/polls.php XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_index.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_thread.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_viewall.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_viewforum.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_viewpost.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_viewtopic.html XoopsModules/newbb/branches/irmtfan/newbb/xoops_version.php Added Paths: ----------- XoopsModules/newbb/branches/irmtfan/newbb/templates/style.css Removed Paths: ------------- XoopsModules/newbb/branches/irmtfan/newbb/templates/images/language/english/style.css XoopsModules/newbb/branches/irmtfan/newbb/templates/images/language/persian/style.css Modified: XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev9883.txt =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev9883.txt 2012-08-01 22:31:12 UTC (rev 9975) +++ XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev9883.txt 2012-08-02 05:24:36 UTC (rev 9976) @@ -1,27 +1,7 @@ Changelog from rev.9883 -date: 2012-08-01 -================================================ -1- localization: input date localized (for other date systems like hegira) by replacing strtotime by XoopsLocal::strtotime -in newbb/polls.php - -2- customization&localization: newbb style.css is fully localized and customized and is not hard-coded anymore. -in newbb/header.php -file changes: --- deleted newbb/templates/style.css --- added newbb/templates/images/language/english/style.css --- added newbb/templates/images/language/persian/style.css -priorities: -if exist in themes/YOUR_THEME/modules/newbb/images/language/YOUR_LANG/style.css take it -else if exist in themes/default/modules/newbb/images/language/YOUR_LANG/style.css take it -else if exist in modules/newbb/templates/images/language/YOUR_LANG/style.css take it -else if exist in modules/newbb/templates/images/language/english/style.css take it -else if exist in modules/newbb/templates/style.css take it (for backward compatibility) - -3- many hardcodes in newbb/templates and style.css has been removed - date: 2012-07-30 ================================================ -1- bug fix: edit not displayed when the reason is not filled (irmtfan) +1- bug fix: edit not record when the reason is not filled (irmtfan) 2- bug fix: only the last edit is recorded. (irmtfan/alfred) in newbb/class/post.php 3- bug fix: 'noapprove' permission incorrectly recorded in database. (irmtfan) @@ -32,5 +12,5 @@ in newbb/xoops_version.php 6- hardcode: some style.css color hardcodes has been removed. (irmtfan) in newbb/templates/style.css -7- feature added: text links instead of buttons. (deka87/irmtfan) -in newbb/class/icon.php , newbb/include/functions.render.php , newbb/include/plugin.php \ No newline at end of file +7- feature added: text links instead of buttons. (deka98/irmtfan) +in newbb/class/icon.php , newbb/include/functions.render.php , newbb/include/plugin.php Modified: XoopsModules/newbb/branches/irmtfan/newbb/class/user.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/class/user.php 2012-08-01 22:31:12 UTC (rev 9975) +++ XoopsModules/newbb/branches/irmtfan/newbb/class/user.php 2012-08-02 05:24:36 UTC (rev 9976) @@ -1,318 +1,298 @@ -<?php -/** - * CBB 4.0, or newbb, the forum module for XOOPS project - * - * @copyright The XOOPS Project http://xoops.sf.net - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @author Taiwen Jiang (phppp or D.J.) <ph...@us...> - * @since 4.00 - * @version $Id $ - * @package module::newbb - */ - -if (!defined("XOOPS_ROOT_PATH")) { - exit(); -} - -defined("NEWBB_FUNCTIONS_INI") || include XOOPS_ROOT_PATH.'/modules/newbb/include/functions.ini.php'; - -function newbb_calculateLevel($RPG, $RPGDIFF) -{ - - //$RPG = $user->getVar('posts'); - //$RPGDIFF = $user->getVar('user_regdate'); - - $today = time(); - $diff = $today - $RPGDIFF; - $exp = round($diff / 86400,0); - if ($exp <= 0) { $exp = 1; } - $ppd= round($RPG / $exp, 0); - $level = pow (log10 ($RPG), 3); - $ep = floor (100 * ($level - floor ($level))); - $showlevel = floor ($level + 1); - $hpmulti =round ($ppd / 6, 1); - if ($hpmulti > 1.5) { $hpmulti = 1.5; } - if ($hpmulti < 1) { $hpmulti = 1; } - $maxhp = $level * 25 * $hpmulti; - $hp= $ppd / 5; - if ($hp >= 1) { - $hp= $maxhp; - } else { - $hp= floor ($hp * $maxhp); - } - $hp= floor ($hp); - $maxhp= floor ($maxhp); - if ($maxhp <= 0) { - $zhp = 1; - } else { - $zhp = $maxhp; - } - $hpf= floor (100 * ($hp / $zhp)) - 1; - $maxmp= ($exp * $level) / 5; - $mp= $RPG / 3; - if ($mp >= $maxmp) { $mp = $maxmp; } - $maxmp = floor ($maxmp); - $mp = floor ($mp); - if ($maxmp <= 0) { - $zmp = 1; - } else { - $zmp = $maxmp; - } - $mpf= floor (100 * ($mp / $zmp)) - 1; - if ( $hpf >= 98 ) { $hpf = $hpf - 2; } - if ( $ep >= 98 ) { $ep = $ep - 2; } - if ( $mpf >= 98 ) { $mpf = $mpf - 2; } - - $level = array(); - $level['level'] = $showlevel ; - $level['exp'] = $ep; - $level['exp_width'] = $ep.'%'; - $level['hp'] = $hp; - $level['hp_max'] = $maxhp; - $level['hp_width'] = $hpf.'%'; - $level['mp'] = $mp; - $level['mp_max'] = $maxmp; - $level['mp_width'] = $mpf.'%'; - - return $level; -} - -class newbbUser { - var $user = null; - - function User() - { - } - - function getUserbar() - { - global $xoopsModuleConfig, $xoopsUser, $isadmin; - - $userbar = array(); - if (empty($xoopsModuleConfig['userbar_enabled'])) return $userbar; - - $user = $this->user; - $userbar["profile"] = array("link" => XOOPS_URL . "/userinfo.php?uid=" . $user->getVar("uid"), "name" => _PROFILE); - - if (is_object($xoopsUser)) { - $userbar["pm"] = array("link" => "javascript:void openWithSelfMain('" . XOOPS_URL . "/pmlite.php?send2=1&to_userid=" . $user->getVar("uid") . "', 'pmlite', 450, 380);", "name" => _MD_PM); - } - if ($user->getVar('user_viewemail') || $isadmin) { - $userbar["email"] = array("link" => "javascript:void window.open('mailto:" . $user->getVar('email') . "', 'new');", "name" => _MD_EMAIL); - } - if ($url = $user->getVar('url')) { - $userbar["url"] = array("link" => "javascript:void window.open('" . $url . "', 'new');", "name" => _MD_WWW); - } - if ($icq = $user->getVar('user_icq')) { - $userbar["icq"] = array("link" => "javascript:void window.open('http://wwp.icq.com/scripts/search.dll?to=" . $icq."', 'new');", "name" => _MD_ICQ); - } - if ($aim = $user->getVar('user_aim')) { - $userbar["aim"]= array("link" => "javascript:void window.open('aim:goim?screenname=" . $aim . "&message=Hi+" . $aim . "+Are+you+there?" . "', 'new');", "name" => _MD_AIM); - } - if ($yim = $user->getVar('user_yim')) { - $userbar["yim"] = array("link" => "javascript:void window.open('http://edit.yahoo.com/config/send_webmesg?.target=" . $yim . "&.src=pg" . "', 'new');", "name" => _MD_YIM); - } - if ($msn = $user->getVar('user_msnm')) { - $userbar["msnm"] = array("link" => "javascript:void window.open('http://members.msn.com?mem=" . $msn . "', 'new');", "name" => _MD_MSNM); - } - - return $userbar; - } - - function getLevel() - { - global $xoopsModuleConfig, $forumUrl; - - $level = newbb_calculateLevel($this->user->getVar("posts"), $this->user->getVar("user_regdate")); - $info=''; - if ($xoopsModuleConfig['user_level'] == 2) { - static $rpg_images; - if (!isset($rpg_images)) { - $icon_handler = newbb_getIconHandler(); - $rpg_path = $icon_handler->getPath("rpg"); - foreach (array("img_left", "img_backing", "img_right", "blue", "green", "orange") as $img) { - $rpg_images[$img] = XOOPS_URL . '/' . $rpg_path . '/'.$img.'.gif'; - } - } - $table = "<table class='userlevel'><tr><td class='end'><img src='" . $rpg_images['img_left'] . "' alt='' /></td><td class='center' background='" . $rpg_images['img_backing'] . "'><img src='%s' width='%d' alt='' align='left' /></td><td><img src='" . $rpg_images['img_right'] . "' alt='' /></td></tr></table>"; - - $info = _MD_LEVEL . " " . $level['level'] . "<br />" . _MD_HP . " " . $level['hp'] . " / " . $level['hp_max'] . "<br />". - sprintf($table, $rpg_images["orange"], $level['hp_width']); - $info .= _MD_MP . " " . $level['mp'] . " / " . $level['mp_max'] . "<br />". - sprintf($table, $rpg_images["green"], $level['mp_width']); - $info .= _MD_EXP . " " . $level['exp'] . "<br />". - sprintf($table, $rpg_images["blue"], $level['exp_width']); - } else { - $info = _MD_LEVEL . " " . $level['level'] . "; ". _MD_EXP . " " . $level['exp'] . "<br />"; - $info .= _MD_HP . " " . $level['hp'] . " / " . $level['hp_max'] . "<br />"; - $info .= _MD_MP . " " . $level['mp'] . " / " . $level['mp_max']; - } - return $info; - } - - function getInfo(&$user) - { - global $xoopsModuleConfig, $myts; - static $name_anonymous; - - if ( !(is_object($user)) || !($user->isActive()) ) { - if (!isset($name_anonymous)) { - $name_anonymous = $myts->HtmlSpecialChars($GLOBALS["xoopsConfig"]['anonymous']); - } - return array("name" => $name_anonymous, "link" => $name_anonymous); - } - - $this->user = $user; - - $userinfo["uid"] = $user->getVar("uid"); - - $name = empty($xoopsModuleConfig['show_realname']) ? $user->getVar('uname') : $user->getVar('name'); - $userinfo["name"] = $name ? $name : $user->getVar('uname'); - - $userinfo["link"] = "<a href=\"".XOOPS_URL . "/userinfo.php?uid=" . $user->getVar("uid") ."\">".$userinfo["name"]."</a>"; - - $userinfo["avatar"] = $user->getVar('user_avatar'); - - $userinfo["from"] = $user->getVar('user_from'); - - mod_loadFunctions("time", "newbb"); - $userinfo["regdate"] = newbb_formatTimestamp($user->getVar('user_regdate'), 'reg'); - - $userinfo["posts"] = $user->getVar('posts'); - - if (!empty($xoopsModuleConfig['user_level'])) { - $userinfo["level"] = $this->getLevel(); - } - - if (!empty($xoopsModuleConfig['userbar_enabled'])) { - $userinfo["userbar"] = $this->getUserbar(); - } - - $userinfo["signature"] = $user->getVar('user_sig'); - return $userinfo; - } -} - -class NewbbUserHandler -{ - var $enableGroup; - var $enableOnline; - var $userlist = array(); - var $users = array(); - //var $online = array(); - - function NewbbUserHandler($enableGroup = true, $enableOnline = true) - { - $this->enableGroup = $enableGroup; - $this->enableOnline = $enableOnline; - } - - function loadUserInfo() - { - @include_once XOOPS_ROOT_PATH."/modules/".$GLOBALS["xoopsModule"]->getVar("dirname", "n")."/language/".$GLOBALS["xoopsConfig"]["language"]."/user.php"; - if (class_exists("User_language")) { - $handler = new User_language(); - } else { - $handler = new newbbUser(); - } - foreach (array_keys($this->users) as $uid) { - $this->userlist[$uid] = $handler->getInfo($this->users[$uid]); - } - } - - function loadUserOnline() - { - if (empty($this->users) || !$this->enableOnline) return; - mod_loadFunctions("render", "newbb"); - $image_online = newbb_displayImage('online', _MD_ONLINE); - $image_offline = newbb_displayImage('offline',_MD_OFFLINE); - - $online_handler =& xoops_getmodulehandler('online', 'newbb'); - $onlines = $online_handler->checkStatus(array_keys($this->users)); - - foreach (array_keys($this->users) as $uid) { - $this->userlist[$uid]["status"] = empty($onlines[$uid]) ? $image_offline : $image_online; - } - } - - function loadUserGroups() - { - GLOBAL $xoopsDB; - - if (empty($this->users) || !$this->enableGroup) return; - - $groups = array(); - $member_handler =& xoops_gethandler('member'); - $groups_obj = $member_handler->getGroups(); - $count = count($groups_obj); - for ($i = 0; $i < $count; $i++) { - $groups[$groups_obj[$i]->getVar('groupid')] = $groups_obj[$i]->getVar('name'); - } - unset($groups_obj); - - $sql = 'SELECT groupid, uid FROM ' . $xoopsDB->prefix('groups_users_link') . " WHERE uid IN( " . implode(", ", array_keys($this->users)) . ")"; - $result = $xoopsDB->query($sql); - while ($myrow = $xoopsDB->fetchArray($result)) { - $this->userlist[$myrow['uid']]["groups"][] = $groups[$myrow['groupid']]; - } - } - - function loadUserDigest() - { - GLOBAL $xoopsDB; - - if (empty($this->users)) return; - - $sql = 'SELECT user_digests, uid FROM ' . $xoopsDB->prefix('bb_user_stats') . " WHERE uid IN( " . implode(", ", array_keys($this->users)) . ")"; - $result = $xoopsDB->query($sql); - while ($myrow = $xoopsDB->fetchArray($result)) { - $this->userlist[$myrow['uid']]["digests"] = intval( $myrow['user_digests'] ); - } - } - - function loadUserRank() - { - GLOBAL $xoopsDB; - - if (empty($this->users)) return; - $myts =& MyTextSanitizer::getInstance(); - - $sql = 'SELECT * FROM ' . $xoopsDB->prefix('ranks'); - $result = $xoopsDB->query($sql); - while ($myrow = $xoopsDB->fetchArray($result)) { - $ranks[$myrow['rank_id']] = $myrow; - $ranks[$myrow['rank_id']]["rank_title"] = $myts->htmlspecialchars($ranks[$myrow['rank_id']]["rank_title"]); - if (!empty($ranks[$myrow['rank_id']]['rank_image'])) { - $ranks[$myrow['rank_id']]['rank_image'] = "<img src='" . XOOPS_UPLOAD_URL . "/ranks/" . htmlspecialchars($ranks[$myrow['rank_id']]['rank_image'], ENT_QUOTES) . "' alt='' />"; - } - } - - foreach (array_keys($this->userlist) as $uid) { - if ($rank = $this->users[$uid]->getVar("rank")) { - $this->userlist[$uid]["rank"]["title"] = $ranks[$rank]["rank_title"]; - $this->userlist[$uid]["rank"]["image"] = $ranks[$rank]["rank_image"]; - continue; - } - foreach ($ranks as $id => $rank) { - if ($rank["rank_min"] <= $this->userlist[$uid]["posts"] && $rank["rank_max"] >= $this->userlist[$uid]["posts"]) { - $this->userlist[$uid]["rank"]["title"] = $rank["rank_title"]; - $this->userlist[$uid]["rank"]["image"] = $rank["rank_image"]; - break; - } - } - } - } - - function getUsers() - { - $this->loadUserInfo(); - $this->loadUserOnline(); - $this->loadUserGroups(); - $this->loadUserRank(); - $this->loadUserDigest(); - - return $this->userlist; - } -} - +<?php +/** + * CBB 4.0, or newbb, the forum module for XOOPS project + * + * @copyright The XOOPS Project http://xoops.sf.net + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Taiwen Jiang (phppp or D.J.) <ph...@us...> + * @since 4.00 + * @version $Id $ + * @package module::newbb + */ + +if (!defined("XOOPS_ROOT_PATH")) { + exit(); +} + +defined("NEWBB_FUNCTIONS_INI") || include XOOPS_ROOT_PATH.'/modules/newbb/include/functions.ini.php'; + +function newbb_calculateLevel($RPG, $RPGDIFF) +{ + + //$RPG = $user->getVar('posts'); + //$RPGDIFF = $user->getVar('user_regdate'); + + $today = time(); + $diff = $today - $RPGDIFF; + $exp = round($diff / 86400,0); + if ($exp <= 0) { $exp = 1; } + $ppd= round($RPG / $exp, 0); + $level = pow (log10 ($RPG), 3); + $ep = floor (100 * ($level - floor ($level))); + $showlevel = floor ($level + 1); + $hpmulti =round ($ppd / 6, 1); + if ($hpmulti > 1.5) { $hpmulti = 1.5; } + if ($hpmulti < 1) { $hpmulti = 1; } + $maxhp = $level * 25 * $hpmulti; + $hp= $ppd / 5; + if ($hp >= 1) { + $hp= $maxhp; + } else { + $hp= floor ($hp * $maxhp); + } + $hp= floor ($hp); + $maxhp= floor ($maxhp); + if ($maxhp <= 0) { + $zhp = 1; + } else { + $zhp = $maxhp; + } + $hpf= floor (100 * ($hp / $zhp)) - 1; + $maxmp= ($exp * $level) / 5; + $mp= $RPG / 3; + if ($mp >= $maxmp) { $mp = $maxmp; } + $maxmp = floor ($maxmp); + $mp = floor ($mp); + if ($maxmp <= 0) { + $zmp = 1; + } else { + $zmp = $maxmp; + } + $mpf= floor (100 * ($mp / $zmp)) - 1; + if ( $hpf >= 98 ) { $hpf = $hpf - 2; } + if ( $ep >= 98 ) { $ep = $ep - 2; } + if ( $mpf >= 98 ) { $mpf = $mpf - 2; } + + $level = array(); + $level['level'] = $showlevel ; + $level['exp'] = $ep; + $level['exp_width'] = $ep.'%'; + $level['hp'] = $hp; + $level['hp_max'] = $maxhp; + $level['hp_width'] = $hpf.'%'; + $level['mp'] = $mp; + $level['mp_max'] = $maxmp; + $level['mp_width'] = $mpf.'%'; + + return $level; +} + +class newbbUser { + var $user = null; + + function User() + { + } + + function getUserbar() + { + global $xoopsModuleConfig, $xoopsUser, $isadmin; + + $userbar = array(); + if (empty($xoopsModuleConfig['userbar_enabled'])) return $userbar; + + $user = $this->user; + $userbar["profile"] = array("link" => XOOPS_URL . "/userinfo.php?uid=" . $user->getVar("uid"), "name" => _PROFILE); + + if (is_object($xoopsUser)) { + $userbar["pm"] = array("link" => "javascript:void openWithSelfMain('" . XOOPS_URL . "/pmlite.php?send2=1&to_userid=" . $user->getVar("uid") . "', 'pmlite', 450, 380);", "name" => _MD_PM); + } + if ($user->getVar('user_viewemail') || $isadmin) { + $userbar["email"] = array("link" => "javascript:void window.open('mailto:" . $user->getVar('email') . "', 'new');", "name" => _MD_EMAIL); + } + if ($url = $user->getVar('url')) { + $userbar["url"] = array("link" => "javascript:void window.open('" . $url . "', 'new');", "name" => _MD_WWW); + } + if ($icq = $user->getVar('user_icq')) { + $userbar["icq"] = array("link" => "javascript:void window.open('http://wwp.icq.com/scripts/search.dll?to=" . $icq."', 'new');", "name" => _MD_ICQ); + } + if ($aim = $user->getVar('user_aim')) { + $userbar["aim"]= array("link" => "javascript:void window.open('aim:goim?screenname=" . $aim . "&message=Hi+" . $aim . "+Are+you+there?" . "', 'new');", "name" => _MD_AIM); + } + if ($yim = $user->getVar('user_yim')) { + $userbar["yim"] = array("link" => "javascript:void window.open('http://edit.yahoo.com/config/send_webmesg?.target=" . $yim . "&.src=pg" . "', 'new');", "name" => _MD_YIM); + } + if ($msn = $user->getVar('user_msnm')) { + $userbar["msnm"] = array("link" => "javascript:void window.open('http://members.msn.com?mem=" . $msn . "', 'new');", "name" => _MD_MSNM); + } + + return $userbar; + } + + function getLevel() + { + global $xoopsModuleConfig, $forumUrl; + + $level = newbb_calculateLevel($this->user->getVar("posts"), $this->user->getVar("user_regdate")); + $info=''; + if ($xoopsModuleConfig['user_level'] == 2) { + static $rpg_images; + if (!isset($rpg_images)) { + $icon_handler = newbb_getIconHandler(); + $rpg_path = $icon_handler->getPath("rpg"); + foreach (array("img_left", "img_backing", "img_right", "blue", "green", "orange") as $img) { + $rpg_images[$img] = XOOPS_URL . '/' . $rpg_path . '/'.$img.'.gif'; + } + } + $table = "<table class='userlevel'><tr><td class='end'><img src='" . $rpg_images['img_left'] . "' alt='' /></td><td class='center' background='" . $rpg_images['img_backing'] . "'><img src='%s' width='%d' alt='' align='left' /></td><td><img src='" . $rpg_images['img_right'] . "' alt='' /></td></tr></table>"; + + $info = _MD_LEVEL . " " . $level['level'] . "<br />" . _MD_HP . " " . $level['hp'] . " / " . $level['hp_max'] . "<br />". + sprintf($table, $rpg_images["orange"], $level['hp_width']); + $info .= _MD_MP . " " . $level['mp'] . " / " . $level['mp_max'] . "<br />". + sprintf($table, $rpg_images["green"], $level['mp_width']); + $info .= _MD_EXP . " " . $level['exp'] . "<br />". + sprintf($table, $rpg_images["blue"], $level['exp_width']); + } else { + $info = _MD_LEVEL . " " . $level['level'] . "; ". _MD_EXP . " " . $level['exp'] . "<br />"; + $info .= _MD_HP . " " . $level['hp'] . " / " . $level['hp_max'] . "<br />"; + $info .= _MD_MP . " " . $level['mp'] . " / " . $level['mp_max']; + } + return $info; + } + + function getInfo(&$user) + { + global $xoopsModuleConfig, $myts; + static $name_anonymous; + + if ( !(is_object($user)) || !($user->isActive()) ) { + if (!isset($name_anonymous)) { + $name_anonymous = $myts->HtmlSpecialChars($GLOBALS["xoopsConfig"]['anonymous']); + } + return array("name" => $name_anonymous, "link" => $name_anonymous); + } + + $this->user = $user; + + $userinfo["uid"] = $user->getVar("uid"); + + $name = empty($xoopsModuleConfig['show_realname']) ? $user->getVar('uname') : $user->getVar('name'); + $userinfo["name"] = $name ? $name : $user->getVar('uname'); + + $userinfo["link"] = "<a href=\"".XOOPS_URL . "/userinfo.php?uid=" . $user->getVar("uid") ."\">".$userinfo["name"]."</a>"; + + $userinfo["avatar"] = $user->getVar('user_avatar'); +// START hacked by irmtfan - easier rank getting + $userrank = $user->rank(); + if (isset($userrank['image']) && $userrank['image']) { + $userinfo["rank_image"] = $userrank['image']; + $userinfo["rank_title"] = $userrank['title']; + } +// END hacked by irmtfan - easier rank getting + + $userinfo["from"] = $user->getVar('user_from'); + + mod_loadFunctions("time", "newbb"); + $userinfo["regdate"] = newbb_formatTimestamp($user->getVar('user_regdate'), 'reg'); + + $userinfo["posts"] = $user->getVar('posts'); + + if (!empty($xoopsModuleConfig['user_level'])) { + $userinfo["level"] = $this->getLevel(); + } + + if (!empty($xoopsModuleConfig['userbar_enabled'])) { + $userinfo["userbar"] = $this->getUserbar(); + } + + $userinfo["signature"] = $user->getVar('user_sig'); + return $userinfo; + } +} + +class NewbbUserHandler +{ + var $enableGroup; + var $enableOnline; + var $userlist = array(); + var $users = array(); + //var $online = array(); + + function NewbbUserHandler($enableGroup = true, $enableOnline = true) + { + $this->enableGroup = $enableGroup; + $this->enableOnline = $enableOnline; + } + + function loadUserInfo() + { + @include_once XOOPS_ROOT_PATH."/modules/".$GLOBALS["xoopsModule"]->getVar("dirname", "n")."/language/".$GLOBALS["xoopsConfig"]["language"]."/user.php"; + if (class_exists("User_language")) { + $handler = new User_language(); + } else { + $handler = new newbbUser(); + } + foreach (array_keys($this->users) as $uid) { + $this->userlist[$uid] = $handler->getInfo($this->users[$uid]); + } + } + + function loadUserOnline() + { + if (empty($this->users) || !$this->enableOnline) return; + mod_loadFunctions("render", "newbb"); + $image_online = newbb_displayImage('online', _MD_ONLINE); + $image_offline = newbb_displayImage('offline',_MD_OFFLINE); + + $online_handler =& xoops_getmodulehandler('online', 'newbb'); + $onlines = $online_handler->checkStatus(array_keys($this->users)); + + foreach (array_keys($this->users) as $uid) { + $this->userlist[$uid]["status"] = empty($onlines[$uid]) ? $image_offline : $image_online; + } + } + + function loadUserGroups() + { + GLOBAL $xoopsDB; + + if (empty($this->users) || !$this->enableGroup) return; + + $groups = array(); + $member_handler =& xoops_gethandler('member'); + $groups_obj = $member_handler->getGroups(); + $count = count($groups_obj); + for ($i = 0; $i < $count; $i++) { + $groups[$groups_obj[$i]->getVar('groupid')] = $groups_obj[$i]->getVar('name'); + } + unset($groups_obj); + + $sql = 'SELECT groupid, uid FROM ' . $xoopsDB->prefix('groups_users_link') . " WHERE uid IN( " . implode(", ", array_keys($this->users)) . ")"; + $result = $xoopsDB->query($sql); + while ($myrow = $xoopsDB->fetchArray($result)) { + $this->userlist[$myrow['uid']]["groups"][] = $groups[$myrow['groupid']]; + } + } + + function loadUserDigest() + { + GLOBAL $xoopsDB; + + if (empty($this->users)) return; + + $sql = 'SELECT user_digests, uid FROM ' . $xoopsDB->prefix('bb_user_stats') . " WHERE uid IN( " . implode(", ", array_keys($this->users)) . ")"; + $result = $xoopsDB->query($sql); + while ($myrow = $xoopsDB->fetchArray($result)) { + $this->userlist[$myrow['uid']]["digests"] = intval( $myrow['user_digests'] ); + } + } +// START irmtfan remove function +// function loadUserRank() +// { +// return true; +// } +// END irmtfan remove function + + function getUsers() + { + $this->loadUserInfo(); + $this->loadUserOnline(); + $this->loadUserGroups(); + // irmtfan removed $this->loadUserRank(); + $this->loadUserDigest(); + + return $this->userlist; + } +} + ?> \ No newline at end of file Modified: XoopsModules/newbb/branches/irmtfan/newbb/docs/changelog.txt =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/docs/changelog.txt 2012-08-01 22:31:12 UTC (rev 9975) +++ XoopsModules/newbb/branches/irmtfan/newbb/docs/changelog.txt 2012-08-02 05:24:36 UTC (rev 9976) @@ -20,6 +20,25 @@ 16 Fix Link to Blank.gif 17 Fix Error Upload File too large +18- bug fix: edit not displayed when the reason is not filled (irmtfan) +19- bug fix: only the last edit is recorded. (irmtfan/alfred) +in newbb/class/post.php + +20- bug fix: 'noapprove' permission incorrectly recorded in database. (irmtfan) +in newbb/class/permission.php + +21- bug fix: load user ranks has been hardcoded. it works in old/upgraded websites but not works in new installed websites. a new getting rank introduced. (black_beard/irmtfan) +in newbb/class/user.php, newbb/templates/newbb_thread.html + +22- minor bug fix: mysql 5.1 was incorrectly needed (irmtfan) +in newbb/xoops_version.php + +23- hardcode: some style.css color hardcodes has been removed. (irmtfan) +in newbb/templates/style.css + +24- feature added: text links instead of buttons. (deka87/irmtfan) +in newbb/class/icon.php , newbb/include/functions.render.php , newbb/include/plugin.php + newBB Changelog 4.2 02/08/2012 Modified: XoopsModules/newbb/branches/irmtfan/newbb/header.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/header.php 2012-08-01 22:31:12 UTC (rev 9975) +++ XoopsModules/newbb/branches/irmtfan/newbb/header.php 2012-08-02 05:24:36 UTC (rev 9976) @@ -1,140 +1,116 @@ -<?php -/** - * CBB 4.0, or newbb, the forum module for XOOPS project - * - * @copyright The XOOPS Project http://xoops.sf.net - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @author Taiwen Jiang (phppp or D.J.) <ph...@us...> - * @since 4.00 - * @version $Id$ - * @package module::newbb - */ -include_once '../../mainfile.php'; -defined('XOOPS_ROOT_PATH') or die('Restricted access'); -$xoopsLogger->startTime('newBB_Header'); - -if (!empty($xoopsModuleConfig['do_rewrite'])) { - include_once "seo_url.php"; - /* for seo */ - $toseo_url = array("index.php","viewforum.php","viewtopic.php","rss.php"); - - if(((strpos(getenv('REQUEST_URI'), '.html') === false) && !empty($xoopsModuleConfig['do_rewrite']) && (!isset($_POST) || count($_POST) <= 0))) - { - $redir = false; - if ( strpos(getenv("REQUEST_URI"),"mark_read=") == true || strpos(getenv("REQUEST_URI"),"mark=") == true) { - // Mark Forums - } else { - if ( in_array(basename(getenv('SCRIPT_NAME')),$toseo_url) ) { - //rewrite only for files - - if ( trim(getenv("SCRIPT_NAME")) != '' ) { - if ( strpos(getenv("REQUEST_URI") , "/".SEO_MODULE_NAME."/") === false ) { - $redir = true; - } else if ( getenv("QUERY_STRING") ) { - $redir = true; - } - } - } - } - - if ($redir == true) { - $s = "http://" . getenv('HTTP_HOST') . getenv("REQUEST_URI"); - $s = str_replace("/".REAL_MODULE_NAME."/","/".SEO_MODULE_NAME."/",$s); - $newurl = seo_urls('<a href="'.$s.'"></a>'); - $newurl = str_replace('<a href="','',$newurl); - $newurl = str_replace('"></a>','',$newurl); - if ( !headers_sent() ) { - header("HTTP/1.1 301 Moved Permanently"); - header("Location: $newurl"); - exit(); - } - } - } -} - -include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/include/vars.php"; - -mod_loadFunctions("user", "newbb"); -mod_loadFunctions("topic", "newbb"); - -require_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; -require_once XOOPS_ROOT_PATH."/class/module.textsanitizer.php"; -$myts = MyTextSanitizer::getInstance(); - -$menumode = 0; -$menumode_other = array(); -$menu_url = htmlSpecialChars(preg_replace("/&menumode=[^&]/", "", $_SERVER[ 'REQUEST_URI' ])); -$menu_url .= ( false === strpos($menu_url, "?") ) ? "?menumode=" : "&menumode="; -foreach ($xoopsModuleConfig["valid_menumodes"] as $key => $val) { - if ($key != $menumode) $menumode_other[] = array("title"=>$val, "link"=>$menu_url.$key); -} - - -$newbb_module_header = ''; -$newbb_module_header .= '<link rel="alternate" type="application/rss+xml" title="'.$xoopsModule->getVar("name").'" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', "n").'/rss.php" />'; -if (!empty($xoopsModuleConfig['pngforie_enabled'])) { - $newbb_module_header .= '<style type="text/css">img {behavior:url("include/pngbehavior.htc");}</style>'; -} -// START hacked by irmtfan to add localization/customization for newbb style.css -$dirname=$xoopsModule->getVar('dirname'); -$theme_path = "{$xoopsConfig['theme_set']}/modules/{$dirname}"; -$theme_default_path= "default/modules/{$dirname}"; -$default_path = "modules/{$dirname}/templates"; -$lang_path = "images/language/{$xoopsConfig['language']}"; - - // get from setted theme -if (is_file(XOOPS_THEME_PATH . '/'.$theme_path . '/' . $lang_path . '/style.css')) { - $rel_path=$theme_path . '/' . $lang_path; - // get from default theme -} else if (is_file(XOOPS_THEME_PATH . '/'.$theme_default_path . '/' . $lang_path . '/style.css')) { - $rel_path=$theme_default_path . '/' . $lang_path; - // get from module default path -} else if (is_file(XOOPS_ROOT_PATH. '/'.$default_path . '/' . $lang_path . '/style.css')) { - $rel_path=$default_path . '/' . $lang_path; - // if no one is found get the english from default path -} else if (is_file(XOOPS_ROOT_PATH. '/'.$default_path . '/images/language/english/style.css')) { - $rel_path=$default_path . '/images/language/english'; - // for backward compatibility - as before -} else { - $rel_path=$default_path; -} - -$newbb_module_header .= ' - <link rel="stylesheet" type="text/css" href="'.XOOPS_URL . '/' . $rel_path . '/style.css" /> - <script type="text/javascript">var toggle_cookie="'.$forumCookie['prefix'].'G'.'";</script> - <script src="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'/include/js/newbb_toggle.js" type="text/javascript"></script> - '; -// END hacked by irmtfan to add localization/customization for newbb style.css -if ($menumode == 2) { - $newbb_module_header .= ' - <link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'templates/newbb_menu_hover.css" /> - <style type="text/css">body {behavior:url("include/newbb.htc");}</style> - '; -} - -if ($menumode == 1) { - $newbb_module_header .= ' - <link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'templates/newbb_menu_click.css" /> - <script src="include/js/newbb_menu_click.js" type="text/javascript"></script> - '; -} - -$xoops_module_header = $newbb_module_header; // for cache hack - -if (!empty($xoopsModuleConfig["welcome_forum"]) && is_object($xoopsUser) && !$xoopsUser->getVar('posts')) { - mod_loadFunctions("welcome", "newbb"); -} - -$pollmodules = NULL; -//$module_handler = &xoops_gethandler('module'); -$xoopspoll = &$module_handler->getByDirname('xoopspoll'); -if (is_object($xoopspoll) && $xoopspoll->getVar('isactive')) { - $pollmodules = 'xoopspoll'; -} else { - //Umfrage - $xoopspoll = &$module_handler->getByDirname('umfrage'); - if (is_object($xoopspoll) && $xoopspoll->getVar('isactive')) - $pollmodules = 'umfrage'; -} -$xoopsLogger->stopTime('newBB_Header'); +<?php +/** + * CBB 4.0, or newbb, the forum module for XOOPS project + * + * @copyright The XOOPS Project http://xoops.sf.net + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Taiwen Jiang (phppp or D.J.) <ph...@us...> + * @since 4.00 + * @version $Id$ + * @package module::newbb + */ +include_once '../../mainfile.php'; +defined('XOOPS_ROOT_PATH') or die('Restricted access'); +$xoopsLogger->startTime('newBB_Header'); + +if (!empty($xoopsModuleConfig['do_rewrite'])) { + include_once "seo_url.php"; + /* for seo */ + $toseo_url = array("index.php","viewforum.php","viewtopic.php","rss.php"); + + if(((strpos(getenv('REQUEST_URI'), '.html') === false) && !empty($xoopsModuleConfig['do_rewrite']) && (!isset($_POST) || count($_POST) <= 0))) + { + $redir = false; + if ( strpos(getenv("REQUEST_URI"),"mark_read=") == true || strpos(getenv("REQUEST_URI"),"mark=") == true) { + // Mark Forums + } else { + if ( in_array(basename(getenv('SCRIPT_NAME')),$toseo_url) ) { + //rewrite only for files + + if ( trim(getenv("SCRIPT_NAME")) != '' ) { + if ( strpos(getenv("REQUEST_URI") , "/".SEO_MODULE_NAME."/") === false ) { + $redir = true; + } else if ( getenv("QUERY_STRING") ) { + $redir = true; + } + } + } + } + + if ($redir == true) { + $s = "http://" . getenv('HTTP_HOST') . getenv("REQUEST_URI"); + $s = str_replace("/".REAL_MODULE_NAME."/","/".SEO_MODULE_NAME."/",$s); + $newurl = seo_urls('<a href="'.$s.'"></a>'); + $newurl = str_replace('<a href="','',$newurl); + $newurl = str_replace('"></a>','',$newurl); + if ( !headers_sent() ) { + header("HTTP/1.1 301 Moved Permanently"); + header("Location: $newurl"); + exit(); + } + } + } +} + +include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/include/vars.php"; + +mod_loadFunctions("user", "newbb"); +mod_loadFunctions("topic", "newbb"); + +require_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; +require_once XOOPS_ROOT_PATH."/class/module.textsanitizer.php"; +$myts = MyTextSanitizer::getInstance(); + +$menumode = 0; +$menumode_other = array(); +$menu_url = htmlSpecialChars(preg_replace("/&menumode=[^&]/", "", $_SERVER[ 'REQUEST_URI' ])); +$menu_url .= ( false === strpos($menu_url, "?") ) ? "?menumode=" : "&menumode="; +foreach ($xoopsModuleConfig["valid_menumodes"] as $key => $val) { + if ($key != $menumode) $menumode_other[] = array("title"=>$val, "link"=>$menu_url.$key); +} + + +$newbb_module_header = ''; +$newbb_module_header .= '<link rel="alternate" type="application/rss+xml" title="'.$xoopsModule->getVar("name").'" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', "n").'/rss.php" />'; +if (!empty($xoopsModuleConfig['pngforie_enabled'])) { + $newbb_module_header .= '<style type="text/css">img {behavior:url("include/pngbehavior.htc");}</style>'; +} +$newbb_module_header .= ' + <link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'/templates/style.css" /> + <script type="text/javascript">var toggle_cookie="'.$forumCookie['prefix'].'G'.'";</script> + <script src="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'/include/js/newbb_toggle.js" type="text/javascript"></script> + '; + +if ($menumode == 2) { + $newbb_module_header .= ' + <link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'templates/newbb_menu_hover.css" /> + <style type="text/css">body {behavior:url("include/newbb.htc");}</style> + '; +} + +if ($menumode == 1) { + $newbb_module_header .= ' + <link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'templates/newbb_menu_click.css" /> + <script src="include/js/newbb_menu_click.js" type="text/javascript"></script> + '; +} + +$xoops_module_header = $newbb_module_header; // for cache hack + +if (!empty($xoopsModuleConfig["welcome_forum"]) && is_object($xoopsUser) && !$xoopsUser->getVar('posts')) { + mod_loadFunctions("welcome", "newbb"); +} + +$pollmodules = NULL; +//$module_handler = &xoops_gethandler('module'); +$xoopspoll = &$module_handler->getByDirname('xoopspoll'); +if (is_object($xoopspoll) && $xoopspoll->getVar('isactive')) { + $pollmodules = 'xoopspoll'; +} else { + //Umfrage + $xoopspoll = &$module_handler->getByDirname('umfrage'); + if (is_object($xoopspoll) && $xoopspoll->getVar('isactive')) + $pollmodules = 'umfrage'; +} +$xoopsLogger->stopTime('newBB_Header'); ?> \ No newline at end of file Modified: XoopsModules/newbb/branches/irmtfan/newbb/include/plugin.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/include/plugin.php 2012-08-01 22:31:12 UTC (rev 9975) +++ XoopsModules/newbb/branches/irmtfan/newbb/include/plugin.php 2012-08-02 05:24:36 UTC (rev 9976) @@ -1,87 +1,87 @@ -<?php -/** - * CBB 4.0, or newbb, the forum module for XOOPS project - * - * @copyright The XOOPS Project http://xoops.sf.net - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @author Taiwen Jiang (phppp or D.J.) <ph...@us...> - * @since 4.00 - * @version $Id $ - * @package module::newbb - */ - -if (!defined('XOOPS_ROOT_PATH')) { - exit(); -} -/* some static xoopsModuleConfig */ -$customConfig = array(); - -// specification for custom time format -// default manner will be used if not specified -$customConfig["formatTimestamp_custom"] = ""; // Could be set as "Y-m-d H:i" - -// requiring "name" field for anonymous users in edit form -$customConfig["require_name"] = true; - -// display "register or login to post" for anonymous users -$customConfig["show_reg"] = true; - -// perform forum/topic synchronization on module update -$customConfig["syncOnUpdate"] = true; - -// time for pending/deleted topics/posts, expired one will be removed automatically, in days; 0 or no cleanup -$customConfig["pending_expire"] = 0; - -// redirect to its URI of an attachment when requested -// Set to true if your attachment would be corrupted after download with normal way -$customConfig["download_direct"] = false; - -// Set allowed editors -// Should set from module preferences? -$customConfig["editor_allowed"] = array(); - -// Set the default editor -$customConfig["editor_default"] = "dhtmltextarea"; - -// Set the default editor for quick reply -$customConfig["editor_quick_default"] = "textarea"; - -// default value for editor rows, coloumns -$customConfig["editor_rows"] = 15; -$customConfig["editor_cols"] = 40; - -// default value for editor width, height (string) -$customConfig["editor_width"] = "100%"; -$customConfig["editor_height"] = "400px"; - -// storage method for reading records: 0 - none; 1 - cookie; 2 - db -$customConfig["read_mode"] = 2; - -// expire time for reading records, in days -$customConfig["read_expire"] = 30; - -// maximum records per forum for one user -$customConfig["read_items"] = 100; - -// Enable tag system -$customConfig["do_tag"] = 1; - -// Count posts counts of subfourms -$customConfig["count_subforum"] = 1; - -// Length for post title on index page: 0 for not showing post title, 255 for not truncate -$customConfig["length_title_index"] = 40; - -// MENU handler -/* You could remove anyone by commenting out in order to disable it */ -$customConfig["valid_menumodes"] = array( - 0 => _MD_MENU_SELECT, // for selectbox - //1 => _MD_MENU_CLICK, // for "click to expand" - //2 => _MD_MENU_HOVER // for "mouse hover to expand" - ); -// START hacked by irmtfan -// Display text links instead of image buttons for edit, reply, .... set true or false -$customConfig["display_text_links"] = false; -// END hacked by irmtfan -return $customConfig; +<?php +/** + * CBB 4.0, or newbb, the forum module for XOOPS project + * + * @copyright The XOOPS Project http://xoops.sf.net + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Taiwen Jiang (phppp or D.J.) <ph...@us...> + * @since 4.00 + * @version $Id $ + * @package module::newbb + */ + +if (!defined('XOOPS_ROOT_PATH')) { + exit(); +} +/* some static xoopsModuleConfig */ +$customConfig = array(); + +// specification for custom time format +// default manner will be used if not specified +$customConfig["formatTimestamp_custom"] = ""; // Could be set as "Y-m-d H:i" + +// requiring "name" field for anonymous users in edit form +$customConfig["require_name"] = true; + +// display "register or login to post" for anonymous users +$customConfig["show_reg"] = true; + +// perform forum/topic synchronization on module update +$customConfig["syncOnUpdate"] = true; + +// time for pending/deleted topics/posts, expired one will be removed automatically, in days; 0 or no cleanup +$customConfig["pending_expire"] = 0; + +// redirect to its URI of an attachment when requested +// Set to true if your attachment would be corrupted after download with normal way +$customConfig["download_direct"] = false; + +// Set allowed editors +// Should set from module preferences? +$customConfig["editor_allowed"] = array(); + +// Set the default editor +$customConfig["editor_default"] = "dhtmltextarea"; + +// Set the default editor for quick reply +$customConfig["editor_quick_default"] = "textarea"; + +// default value for editor rows, coloumns +$customConfig["editor_rows"] = 15; +$customConfig["editor_cols"] = 40; + +// default value for editor width, height (string) +$customConfig["editor_width"] = "100%"; +$customConfig["editor_height"] = "400px"; + +// storage method for reading records: 0 - none; 1 - cookie; 2 - db +$customConfig["read_mode"] = 2; + +// expire time for reading records, in days +$customConfig["read_expire"] = 30; + +// maximum records per forum for one user +$customConfig["read_items"] = 100; + +// Enable tag system +$customConfig["do_tag"] = 1; + +// Count posts counts of subfourms +$customConfig["count_subforum"] = 1; + +// Length for post title on index page: 0 for not showing post title, 255 for not truncate +$customConfig["length_title_index"] = 40; + +// MENU handler +/* You could remove anyone by commenting out in order to disable it */ +$customConfig["valid_menumodes"] = array( + 0 => _MD_MENU_SELECT, // for selectbox + //1 => _MD_MENU_CLICK, // for "click to expand" + //2 => _MD_MENU_HOVER // for "mouse hover to expand" + ); +// START hacked by irmtfan +// Display text links instead of image buttons for edit, reply, .... set true or false +$customConfig["display_text_links"] = false; +// END hacked by irmtfan +return $customConfig; ?> \ No newline at end of file Modified: XoopsModules/newbb/branches/irmtfan/newbb/language/persian/admin.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/language/persian/admin.php 2012-08-01 22:31:12 UTC (rev 9975) +++ XoopsModules/newbb/branches/irmtfan/newbb/language/persian/admin.php 2012-08-02 05:24:36 UTC (rev 9976) @@ -277,7 +277,7 @@ define("_AM_NEWBB_TYPE_LIST", "فهرست نوع ها"); define("_AM_NEWBB_TODEL_TYPE", "آیا مطمان هستید که میخواهید نوع [%s] را حذف کنید؟"); define("_AM_NEWBB_TYPE_EDITFORUM_DESC", "اطلاعات هنوز ذخیره نشده اند. باید روی دکمه ارسال بزنید تا ذخیره شوند."); -define("_AM_NEWBB_TYPE_ORDER_DESC", "برای فعال کردن یک نوع برای یک انجمن، یک عدد بالاتر از 0 را برای نوع تاپیک 'type_order' انتخاب کنید. به عبارت دیگر اگر نوع تاپیک 'type_order' را 0 انتخاب کنید، آن نوع برای آن انجمن غیر فعال خواهد شد"); +define("_AM_NEWBB_TYPE_ORDER_DESC", "برای فعال کردن یک نوع برای یک انجمن، یک عدد بالاتر از 0 را برای ترتیب نوع 'type_order' انتخاب کنید. به عبارت دیگر اگر ترتیب نوع 'type_order' را 0 انتخاب کنید، آن نوع برای آن انجمن غیر فعال خواهد شد"); // admin_synchronization.php define("_AM_NEWBB_SYNC_TYPE_FORUM", "داده های انجمن"); Modified: XoopsModules/newbb/branches/irmtfan/newbb/language/persian/main.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/language/persian/main.php 2012-08-01 22:31:12 UTC (rev 9975) +++ XoopsModules/newbb/branches/irmtfan/newbb/language/persian/main.php 2012-08-02 05:24:36 UTC (rev 9976) @@ -10,7 +10,7 @@ define('_MD_MAX_FILESIZE','حداکثر اندازه فایل'); define('_MD_ATTACHMENT','پیوست'); define('_MD_FILESIZE','اندازه'); -define('_MD_HITS','دفعات دیدن'); +define('_MD_HITS','تعداد دانلود'); define('_MD_GROUPS','گروهها:'); define('_MD_DEL_ONE','فقط این پیام را پاک کن'); define('_MD_DEL_RELATED','این پیام و تمامی پیامهای مربوط به آن را پاک کن'); @@ -431,8 +431,8 @@ define("_MD_NEWBB_SEENOTGUEST","<font color=\"red\"><b>فقط برای کاربران عضو سایت</b></font>"); define("_MD_NEWBB_REPORTSUBJECT","A contribution has been reported"); define("_MD_NEWBB_GOTOLASTPOST","رفتن به آخرین پست ارسال شده"); -define("_MD_EDITEDMSG","دلیل ویرایش پست (اختیاری):"); -define("_MD_DELEDEDMSG","دلیل ویرایش پست<br /><small>(اگر دلیلی نوشته شده فرد ارسال کننده پست با خبر خواهد شد)</small>:"); +define("_MD_EDITEDMSG","دلیل ویرایش:"); +define("_MD_DELEDEDMSG","دلیل حذف پست<br /><small>(اگر دلیلی نوشته شده فرد ارسال کننده پست با خبر خواهد شد)</small>:"); define("_MD_DELEDEDMSG_SUBJECT","پست شما حذف شد"); define("_MD_DELEDEDMSG_BODY","سلام %s, پست شما در انجمن زیر Modified: XoopsModules/newbb/branches/irmtfan/newbb/language/persian/modinfo.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/language/persian/modinfo.php 2012-08-01 22:31:12 UTC (rev 9975) +++ XoopsModules/newbb/branches/irmtfan/newbb/language/persian/modinfo.php 2012-08-02 05:24:36 UTC (rev 9976) @@ -33,7 +33,7 @@ define("_MI_NEWBB_ADMENU_REPORT","گزارش ها"); define("_MI_NEWBB_ADMENU_DIGEST","خلاصه"); define("_MI_NEWBB_ADMENU_VOTE","نظر سنجی ها"); -define("_MI_NEWBB_ADMENU_TYPE", "نوع تاپیک ها"); +define("_MI_NEWBB_ADMENU_TYPE", "نوع های تاپیک"); define("_MI_NEWBB_ADMENU_ABOUT", "درباره این ماژول"); //config options @@ -140,7 +140,7 @@ define("_MI_POST_TIMELIMIT", "ایجاد محدودیت زمانی برای زدن پست های پشت سر هم"); define("_MI_POST_TIMELIMIT_DESC", "قرار دادن محدودیت زمانی برای زدن پیام پشت سر هم. به ثانیه، 0 به معنی بدون محدودیت است"); define("_MI_RECORDEDIT_TIMELIMIT", "محدودیت زمانی برای ذخیره شدن اطلاعات مربوط به ویرایش شدن پیام"); -define("_MI_RECORDEDIT_TIMELIMIT_DESC", "قرار دادن محدودیت زمانی برای ذخیره شدن اطلاعات ویرایش پیام ها به دقیقه. 0 به معنی این است که عبارت ویرایش شد در زیر پیام ها اضافه نشود"); +define("_MI_RECORDEDIT_TIMELIMIT_DESC", "قرار دادن یک زمان به دقیقه که از آن زمان به بعد پس از ارسال پست ویرایش های آن پست ذخیره میشوند. قرار دادن 0 به این معنی است که هیچ ویرایشی ثبت نشود."); //define("_MI_SUBJECT_PREFIX_LEVEL", "سطح دسترسی برای گروه هایی که میتوانند پیشوند (Prefix) اضافه کنند"); //define("_MI_SUBJECT_PREFIX_LEVEL_DESC", "گروه های مجاز را انتخاب کنید"); //define("_MI_SPL_DISABLE", 'غیر فعال'); @@ -229,7 +229,7 @@ میتوانید ثبت نام کرده و سپس مبادرت به ارسال پیام کنید.<br /><br /> اگر هر سوالی راجع به استفاده از newbb دارید, لطفا سایت پشتیبانی را بازدید کنید <a href=\"http://www.xoops.ir/modules/newbb/\" target=\"_blank\" title=\"newbb @ persian xoops\">ماژول انجمن ها</a>. "); -define("_MI_NEWBB_ADMENU_GROUPMOD", "نظارت بر گروه ها"); +define("_MI_NEWBB_ADMENU_GROUPMOD", "انتخاب گروهی ناظران"); define("_MI_SUBJECT_PREFIX", "اضافه کردن پیشوند به ابتدای عنوان"); define("_MI_SUBJECT_PREFIX_DESC", "قرار دادن یک پیشوند مثلا [حل شده] در ابتدای نام یک عنوان.برای جدا کردن گزینه ها از ',' استفاده کنید، اگر میخواهید هیچ پیشوندی نداشته باشید فقط NONE را باقی بگذارید."); define("_MI_SUBJECT_PREFIX_DEFAULT", '<font color="#00CC00">[حل شده]</font>,<font color="#00CC00">[قطعی شده]</font>,<font color="#FF0000">[درخواست شده]</font>,<font color="#FF0000">[گزارش خطا]</font>,<font color="#FF0000">[حل نشده]</font>'); @@ -250,7 +250,7 @@ define('_MI_NEWBB_INFOBOX_HIDDEN', 'بله به صورت فشرده'); define('_MI_NEWBB_INFOBOX_SHOW', 'بله به صورت کامل'); define('_MI_SHOW_SOCIALLINKS', "نمایش لینک های شبکه های اجتماعی"); -define('_MI_SHOW_SOCIALLINKS_DESC', "دکمه های شبکه های اجتماعی از چمله فیس بوک و تویتر را نمایش میدهد"); +define('_MI_SHOW_SOCIALLINKS_DESC', "دکمه های شبکه های اجتماعی از جمله فیس بوک و تویتر را نمایش میدهد"); //4.2 define("_MI_PAGENAV_DISPLAY","نمایش مرورگر"); Modified: XoopsModules/newbb/branches/irmtfan/newbb/polls.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/polls.php 2012-08-01 22:31:12 UTC (rev 9975) +++ XoopsModules/newbb/branches/irmtfan/newbb/polls.php 2012-08-02 05:24:36 UTC (rev 9976) @@ -1,580 +1,570 @@ -<?php -/** - * Newbb module - * - * 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 http://www.fsf.org/copyleft/gpl.html GNU public license - * @package newbb - * @since 4.0 - * @author Taiwen Jiang <ph...@us...> - * @version $Id: polls.php 2175 2008-09-23 14:07:03Z phppp $ - */ - - -include_once dirname(__FILE__) . "/header.php"; - -include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; -include_once XOOPS_ROOT_PATH . "/class/xoopslists.php"; -include_once XOOPS_ROOT_PATH . "/class/xoopsblock.php"; - -if ( $pollmodules == 'xoopspoll') -{ - include XOOPS_ROOT_PATH . "/modules/xoopspoll/include/constants.php"; - include_once XOOPS_ROOT_PATH . "/modules/xoopspoll/class/xoopspoll.php"; - include_once XOOPS_ROOT_PATH . "/modules/xoopspoll/class/xoopspolloption.php"; - include_once XOOPS_ROOT_PATH . "/modules/xoopspoll/class/xoopspolllog.php"; - include_once XOOPS_ROOT_PATH . "/modules/xoopspoll/class/xoopspollrenderer.php"; -} -elseif ($pollmodules == 'umfrage') -{ - include XOOPS_ROOT_PATH."/modules/umfrage/include/constants.php"; - include_once XOOPS_ROOT_PATH."/modules/umfrage/class/umfrage.php"; - include_once XOOPS_ROOT_PATH."/modules/umfrage/class/umfrageoption.php"; - include_once XOOPS_ROOT_PATH."/modules/umfrage/class/umfragelog.php"; - include_once XOOPS_ROOT_PATH."/modules/umfrage/class/umfragerenderer.php"; -} -else -{ - redirect_header("javascript:history.go(-1);", 2, _MD_POLLMODULE_ERROR); - exit(); -} - -$op = "add"; -if (isset($_GET['op'])) $op = $_GET['op']; -if (isset($_POST['op'])) $op = $_POST['op']; -if (isset($_GET['poll_id'])) $poll_id = intval($_GET['poll_id']); -if (isset($_POST['poll_id'])) $poll_id = intval($_POST['poll_id']); -if (isset($_GET['topic_id'])) $topic_id = intval($_GET['topic_id']); -if (isset($_POST['topic_id'])) $topic_id = intval($_POST['topic_id']); - -if (!isset($module_handler)) $module_handler =& xoops_gethandler('module'); -$xoopspoll =& $module_handler->getByDirname($pollmodules); -if (!is_object($xoopspoll) || !$xoopspoll->getVar('isactive')) { - redirect_header("javascript:history.go(-1);", 2, _MD_POLLMODULE_ERROR); - exit(); -} - -include XOOPS_ROOT_PATH . "/header.php"; - -$topic_handler =& xoops_getmodulehandler('topic', 'newbb'); -$topic_obj =& $topic_handler->get($topic_id); -$forum = $topic_obj->getVar('forum_id'); -$forum_handler =& xoops_getmodulehandler('forum', 'newbb'); -$forum_obj =& $forum_handler->get($forum); -if (!$forum_handler->getPermission($forum_obj)) { - redirect_header("index.php", 2, _MD_NORIGHTTOACCESS); - exit(); -} -if (!$topic_handler->getPermission($forum_obj, $topic_obj->getVar('topic_status'), "view")) { - redirect_header("viewforum.php?forum=" . $forum_obj->getVar('forum_id'), 2, _MD_NORIGHTTOVIEW); - exit(); -} - -$isadmin = newbb_isAdmin($forum_obj); -$perm = false; -if ($isadmin) { - $perm = true; -} elseif ($topic_handler->getPermission($forum_obj, $topic_obj->getVar('topic_status'), "addpoll") - //&& $forum_obj->getVar('allow_polls') == 1 -) { - if ( ($op=="add" || $op=="save") && !$topic_obj->getVar("topic_haspoll") && is_object($xoopsUser) && $xoopsUser->getVar("uid") == $topic_obj->getVar("topic_poster") ) { - $perm = true; - } elseif (!empty($poll_id)) { - $poll = new XoopsPoll($poll_id); - if (is_object($xoopsUser) && $xoopsUser->getVar("uid") == $poll->getVar("user_id")) { - $perm = true; - } - } -} -if (!$perm) { - redirect_header("viewtopic.php?topic_id=" . $topic_id, 2, _NOPERM); -} - -if ( $op == "add" ) { - $poll_form = new XoopsThemeForm(_MD_POLL_CREATNEWPOLL, "poll_form", "polls.php"); - - $question_text = new XoopsFormText(_MD_POLL_POLLQUESTION, "question", 50, 255); - $poll_form->addElement($question_text, true); - - $desc_tarea = new XoopsFormTextarea(_MD_POLL_POLLDESC, "description"); - $poll_form->addElement($desc_tarea); - - $currenttime = formatTimestamp(time(), "Y-m-d H:i:s"); - $endtime = formatTimestamp(time() + 604800, "Y-m-d H:i:s"); - $expire_text = new XoopsFormText(_MD_POLL_EXPIRATION . "<br /><small>" . _MD_POLL_FORMAT . "<br />" . sprintf(_MD_POLL_CURRENTTIME, $currenttime) . "</small>", "end_time", 30, 19, $endtime); - $poll_form->addElement($expire_text); - - $weight_text = new XoopsFormText(_MD_POLL_DISPLAYORDER, "weight", 6, 5, 0); - $poll_form->addElement($weight_text); - - $multi_yn = new XoopsFormRadioYN(_MD_POLL_ALLOWMULTI, "multiple", 0); - $poll_form->addElement($multi_yn); - - $notify_yn = new XoopsFormRadioYN(_MD_POLL_NOTIFY, "notify", 1); - $poll_form->addElement($notify_yn); - - $option_tray = new XoopsFormElementTray(_MD_POLL_POLLOPTIONS, ""); - $barcolor_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/".$pollmodules."/images/colorbars/"); - for($i = 0; $i < 10; $i++) { - $current_bar = (current($barcolor_array) != "blank.gif") ? current($barcolor_array) : next($barcolor_array); - $option_text = new XoopsFormText("", "option_text[]", 50, 255); - $option_tray->addElement($option_text); - $color_select = new XoopsFormSelect("", "option_color[{$i}]", $current_bar); - $color_select->addOptionArray($barcolor_array); - $color_select->setExtra("onchange='showImgSelected(\"option_color_image[{$i}]\", \"option_color[{$i}]\", \"modules/".$pollmodules."/images/colorbars\", \"\", \"" . XOOPS_URL . "\")'"); - $color_label = new XoopsFormLabel("", "<img src='" . XOOPS_URL . "/modules/".$pollmodules."/images/colorbars/" . $current_bar . "' name='option_color_image[{$i}]' id='option_color_image[{$i}]' width='30' align='bottom' height='15' alt='' /><br />"); - $option_tray->addElement($color_select); - $option_tray->addElement($color_label); - if ( !next($barcolor_array) ) { - reset($barcolor_array); - } - unset($color_select, $color_label); - } - $poll_form->addElement($option_tray); - - $submit_button = new XoopsFormButton("", "poll_submit", _SUBMIT, "submit"); - $poll_form->addElement($submit_button); - $op_hidden = new XoopsFormHidden("op", "save"); - $poll_form->addElement($op_hidden); - $poll_topic_id_hidden = new XoopsFormHidden("topic_id", $topic_id); - $poll_form->addElement($poll_topic_id_hidden); - //include XOOPS_ROOT_PATH . "/header.php"; - echo "<h4>" . _MD_POLL_POLLCONF . "</h4>"; - $poll_form->display(); - //include XOOPS_ROOT_PATH . "/footer.php"; - //exit(); -} - -if ( $op == "save" ) { - /* - * The option check should be done before submitting - */ - $option_empty = true; - if (empty($_POST['option_text'])) { - redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); - } - $option_text = $_POST['option_text']; - foreach ( $option_text as $optxt ) { - if ( trim($optxt) != "" ) { - $option_empty = false; - break; - } - } - if ($option_empty) { - redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); - } - if ( $pollmodules == 'xoopspoll') - $poll = new XoopsPoll(); - else if ( $pollmodules == 'umfrage') - $poll = new Umfrage(); - else die("POLL-ERROR: polls.php Line 190"); - $poll->setVar("question", @$_POST['question']); - $poll->setVar("description", @$_POST['description']); - if ( !empty($_POST['end_time']) ) { - $timezone = is_object($xoopsUser) ? $xoopsUser->getVar("timezone") : null; -// Start user input time in hegira date - hacked by irmtfan (www.jadoogaran.org) -// $_POST['end_time']=inputTimeToGregorian($_POST['end_time']); - $poll->setVar("end_time", userTimeToServerTime(XoopsLocal::strtotime($_POST['end_time']), $timezone)); -// End user input time in hegira date - hacked by irmtfan (www.jadoogaran.org) - } else { - // if expiration date is not set, set it to 10 days from now - $poll->setVar("end_time", time() + (86400 * 10)); - } - $poll->setVar("display", 0); - $poll->setVar("weight", intval(@$_POST['weight'])); - $poll->setVar("multiple", intval(@$_POST['multiple'])); - if ( !empty($_POST["notify"]) ) { - // if notify, set mail status to "not mailed" - $poll->setVar("mail_status", POLL_NOTMAILED); - } else { - // if not notify, set mail status to already "mailed" - $poll->setVar("mail_status", POLL_MAILED); - } - $uid = is_object($xoopsUser) ? $xoopsUser->getVar("uid") : 0; - $poll->setVar("user_id", $uid); - $new_poll_id = $poll->store(); - $option_color = empty($_POST['option_color']) ? NULL : $_POST['option_color']; - if ( !empty($new_poll_id) ) { - $i = 0; - foreach ( $option_text as $optxt ) { - $optxt = trim($optxt); - if ( $optxt != "" ) { - if ( $pollmodules == 'xoopspoll') - $option = new XoopsPollOption(); - else if ( $pollmodules == 'umfrage') - $option = new UmfrageOption(); - else die("POLL-ERROR: polls.php Line 223"); - $option->setVar("option_text", $optxt); - $option->setVar("option_color", $option_color[$i]); - $option->setVar("poll_id", $new_poll_id); - $option->store(); - } - $i++; - } - $sql = "UPDATE " . $xoopsDB->prefix("bb_topics") . " SET topic_haspoll = 1, poll_id = {$new_poll_id} WHERE topic_id = {$topic_id}"; - if ( !$result = $xoopsDB->query($sql) ) { - xoops_error($xoopsDB->er... [truncated message content] |
From: <luc...@us...> - 2012-08-01 22:31:21
|
Revision: 9975 http://xoops.svn.sourceforge.net/xoops/?rev=9975&view=rev Author: luciorota Date: 2012-08-01 22:31:12 +0000 (Wed, 01 Aug 2012) Log Message: ----------- fixed bug but module is not complete ready for testing ;-) Modified Paths: -------------- XoopsModules/xaddresses/trunk/xaddresses/comment_delete.php XoopsModules/xaddresses/trunk/xaddresses/comment_edit.php XoopsModules/xaddresses/trunk/xaddresses/comment_new.php XoopsModules/xaddresses/trunk/xaddresses/comment_post.php XoopsModules/xaddresses/trunk/xaddresses/comment_reply.php XoopsModules/xaddresses/trunk/xaddresses/header.php XoopsModules/xaddresses/trunk/xaddresses/index.php XoopsModules/xaddresses/trunk/xaddresses/locationbroken.php XoopsModules/xaddresses/trunk/xaddresses/locationcategoryview.php XoopsModules/xaddresses/trunk/xaddresses/locationedit.php XoopsModules/xaddresses/trunk/xaddresses/locationmodify.php XoopsModules/xaddresses/trunk/xaddresses/locationrate.php XoopsModules/xaddresses/trunk/xaddresses/locationsearch.php XoopsModules/xaddresses/trunk/xaddresses/locationview.php XoopsModules/xaddresses/trunk/xaddresses/notification_update.php XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php Added Paths: ----------- XoopsModules/xaddresses/trunk/xaddresses/admin/about.php XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php XoopsModules/xaddresses/trunk/xaddresses/admin/field.php XoopsModules/xaddresses/trunk/xaddresses/admin/fieldcategory.php XoopsModules/xaddresses/trunk/xaddresses/admin/import.php XoopsModules/xaddresses/trunk/xaddresses/admin/index.html XoopsModules/xaddresses/trunk/xaddresses/admin/index.php XoopsModules/xaddresses/trunk/xaddresses/admin/location.php XoopsModules/xaddresses/trunk/xaddresses/admin/locationcategory.php XoopsModules/xaddresses/trunk/xaddresses/admin/menu.php XoopsModules/xaddresses/trunk/xaddresses/admin/permissions.php XoopsModules/xaddresses/trunk/xaddresses/include/comment_functions.php XoopsModules/xaddresses/trunk/xaddresses/include/config.php XoopsModules/xaddresses/trunk/xaddresses/include/forms.php XoopsModules/xaddresses/trunk/xaddresses/include/functions.php XoopsModules/xaddresses/trunk/xaddresses/include/index.html XoopsModules/xaddresses/trunk/xaddresses/include/install_function.php XoopsModules/xaddresses/trunk/xaddresses/include/notification_functions.php XoopsModules/xaddresses/trunk/xaddresses/include/search_functions.php XoopsModules/xaddresses/trunk/xaddresses/include/uninstall_function.php XoopsModules/xaddresses/trunk/xaddresses/include/update_function.php Removed Paths: ------------- XoopsModules/xaddresses/trunk/xaddresses/admin/about.old.php XoopsModules/xaddresses/trunk/xaddresses/admin/about.php XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php XoopsModules/xaddresses/trunk/xaddresses/admin/field.php XoopsModules/xaddresses/trunk/xaddresses/admin/fieldcategory.php XoopsModules/xaddresses/trunk/xaddresses/admin/import.php XoopsModules/xaddresses/trunk/xaddresses/admin/index.html XoopsModules/xaddresses/trunk/xaddresses/admin/index.php XoopsModules/xaddresses/trunk/xaddresses/admin/location.php XoopsModules/xaddresses/trunk/xaddresses/admin/locationcategory.php XoopsModules/xaddresses/trunk/xaddresses/admin/menu.php XoopsModules/xaddresses/trunk/xaddresses/admin/modified.php XoopsModules/xaddresses/trunk/xaddresses/admin/permissions.php XoopsModules/xaddresses/trunk/xaddresses/admin/user.demo.php XoopsModules/xaddresses/trunk/xaddresses/include/comment_functions.php XoopsModules/xaddresses/trunk/xaddresses/include/config.php XoopsModules/xaddresses/trunk/xaddresses/include/forms.php XoopsModules/xaddresses/trunk/xaddresses/include/functions.php XoopsModules/xaddresses/trunk/xaddresses/include/index.html XoopsModules/xaddresses/trunk/xaddresses/include/install_function.php XoopsModules/xaddresses/trunk/xaddresses/include/notification_functions.php XoopsModules/xaddresses/trunk/xaddresses/include/search_functions.php XoopsModules/xaddresses/trunk/xaddresses/include/uninstall_function.php XoopsModules/xaddresses/trunk/xaddresses/include/update_function.php Deleted: XoopsModules/xaddresses/trunk/xaddresses/admin/about.old.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/about.old.php 2012-08-01 22:03:26 UTC (rev 9974) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/about.old.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -1,106 +0,0 @@ -<?php -$currentFile = basename(__FILE__); -include 'admin_header.php'; -$versionInfo =& $module_handler->get($GLOBALS['xoopsModule']->getVar('mid')); - -// load classes - -// get/check parameters/post - -// render start here -xoops_cp_header(); - -echo " - <style type=\"text/css\"> - label,text { - display: block; - float: left; - margin-bottom: 2px; - } - label { - text-align: right; - width: 150px; - padding-right: 20px; - } - br { - clear: left; - } - </style> -"; - -echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . $GLOBALS['xoopsModule']->getVar('name'). "</legend>"; -echo "<div style='padding: 8px;'>"; -echo "<img src='" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/" . $versionInfo->getInfo('image') . "' alt='' hspace='10' vspace='0' /></a>\n"; -echo "<div style='padding: 5px;'><strong>" . $versionInfo->getInfo('name') . " version " . $versionInfo->getInfo('version') . "</strong></div>\n"; -echo "<label>" . _AM_XADDRESSES_ABOUT_RELEASEDATE . ":</label><text>" . date(_SHORTDATESTRING, strtotime($versionInfo->getInfo('release_date'))) . "</text><br />"; -echo "<label>" . _AM_XADDRESSES_ABOUT_AUTHOR . ":</label><text>" . $versionInfo->getInfo('author') . "</text><br />"; -echo "<label>" . _AM_XADDRESSES_ABOUT_CREDITS . ":</label><text>" . $versionInfo->getInfo('credits') . "</text><br />"; -echo "<label>" . _AM_XADDRESSES_ABOUT_LICENSE . ":</label><text><a href=\"".$versionInfo->getInfo('license_file')."\" target=\"_blank\" >" . $versionInfo->getInfo('license') . "</a></text>\n"; -echo "</div>"; -echo "</fieldset>"; -echo "<br clear=\"all\" />"; - -echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XADDRESSES_ABOUT_MODULEINFOS . "</legend>"; -echo "<div style='padding: 8px;'>"; -echo "<label>" . _AM_XADDRESSES_ABOUT_STATUS . ":</label><text>" . $versionInfo->getInfo('module_status') . "</text><br />"; -echo "<label>" . _AM_XADDRESSES_ABOUT_MODULEWEBSITE . ":</label><text>" . "<a href='" . $versionInfo->getInfo('support_site_url') . "' target='_blank'>" . $versionInfo->getInfo('support_site_name') . "</a>" . "</text><br />"; -echo "</div>"; -echo "</fieldset>"; -echo "<br clear=\"all\" />"; - -echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XADDRESSES_ABOUT_AUTHORINFOS . "</legend>"; -echo "<div style='padding: 8px;'>"; -echo "<label>" . _AM_XADDRESSES_ABOUT_AUTHOR . ":</label><text>" . $versionInfo->getInfo('author') . "</text><br />"; -echo "<label>" . _AM_XADDRESSES_ABOUT_AUTHORWEBSITE . ":</label><text>" . "<a href='" . $versionInfo->getInfo('author_website_url') . "' target='_blank'>" . $versionInfo->getInfo('author_website_name') . "</a>" . "</text><br />"; -echo "<label>" . _AM_XADDRESSES_ABOUT_AUTHOREMAIL . ":</label><text>" . "<a href='emailto:" . $versionInfo->getInfo('author_mail') . "' target='_blank'>" . $versionInfo->getInfo('author_mail') . "</a>" . "</text><br />"; -echo "</div>"; - -echo "<br />"; - -// DONATE PAYPAL -$donate = '<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> -<input type="hidden" name="cmd" value="_s-xclick"> -<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHVwYJKoZIhvcNAQcEoIIHSDCCB0QCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBkoWMtP1IHf29Ib6Hf1/sPXwvSVqdFP1CnCjMvV8TRMZpwXzIq9LZzGpMaowhsAaQSKz7DenW6LcoCuouWMHaek/dD1rfGMArEq8hrfHOgzGD3NttnhJyaJUUsZ9Bv2q9x9InedkXVwuOh0nUNKLxyWdt4Tt91qczYffcIlgXttzELMAkGBSsOAwIaBQAwgdQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIBCIjuHY4x36AgbCOOWIyYuCfV/8J1vX3up22RKDQcos/WNi7VC/XRFyKwmCtDfpkSyfFlC/s0NYKnWSELfu/MztQAO7cQ4CCYUaSoa6g324Dyr3Or2L0gLeB9aG8V1YO3bVgnLLaNw45j+X3HRiF1QNZARpp5MBrYrVu98IBHQX61AgJJfdnioLDYzagEBIIyQariajQ6W+MSTJHSP+z0J2bb92SYh/bR7GGGkIPuMviJqH1snU0Eik6MKCCA4cwggODMIIC7KADAgECAgEAMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTAeFw0wNDAyMTMxMDEzMTVaFw0zNTAyMTMxMDEzMTVaMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwUdO3fxEzEtcnI7ZKZL412XvZPugoni7i7D7prCe0AtaHTc97CYgm7NsAtJyxNLixmhLV8pyIEaiHXWAh8fPKW+R017+EmXrr9EaquPmsVvTywAAE1PMNOKqo2kl4Gxiz9zZqIajOm1fZGWcGS0f5JQ2kBqNbvbg2/Za+GJ/qwUCAwEAAaOB7jCB6zAdBgNVHQ4EFgQUlp98u8ZvF71ZP1LXChvsENZklGswgbsGA1UdIwSBszCBsIAUlp98u8ZvF71ZP1LXChvsENZklGuhgZSkgZEwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAgV86VpqAWuXvX6Oro4qJ1tYVIT5DgWpE692Ag422H7yRIr/9j/iKG4Thia/Oflx4TdL+IFJBAyPK9v6zZNZtBgPBynXb048hsP16l2vi0k5Q2JKiPDsEfBhGI+HnxLXEaUWAcVfCsQFvd2A1sxRr67ip5y2wwBelUecP3AjJ+YcxggGaMIIBlgIBATCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTExMDQxMzE1MDEwM1owIwYJKoZIhvcNAQkEMRYEFCWihdPs7xd/vj+wxUAsz8MvsZ4yMA0GCSqGSIb3DQEBAQUABIGAV+hTiFSTJVdOv6RKFIQqdl6QoF4a+hfKz7tY+4pu+7HEXIYDbXCrYveD8793fg/NUmQ4+js196eOTAvocFj30/LpkFRkt94P4d2uAMJwH6nUG8Rdzxmam3WogA8wQ8T8YHs2zBcPZjeGE79IUbeSSozlkdCEWUbxutDSS/ZOfjo=-----END PKCS7----- -"> -<input type="image" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online."> -<img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/it_IT/i/scr/pixel.gif" width="1" height="1"> -</form>'; -echo "<div style='padding: 8px;'>"; -echo $donate; -echo "</div>"; - -echo "</fieldset>"; -echo "<br clear=\"all\" />"; - -// get language 'description.html' file -if (file_exists(XOOPS_ROOT_PATH . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/language/" . $xoopsConfig['language'] . "/description.html")) { - $file = XOOPS_ROOT_PATH . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/language/" . $xoopsConfig['language'] . "/description.html"; -} else { - $file = XOOPS_ROOT_PATH . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/language/english/description.html"; -} -if (is_readable($file)) { - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XADDRESSES_ABOUT_DESCRIPTION . "</legend>"; - echo "<div style='padding: 8px;'>"; - echo "<div>". implode('', file($file)) . "</div>"; - echo "</div>"; - echo "</fieldset>"; - echo "<br clear=\"all\" />"; -} - -// get language 'changelog.txt' file -if (file_exists(XOOPS_ROOT_PATH . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/language/" . $xoopsConfig['language'] . "/changelog.txt")) { - $file = XOOPS_ROOT_PATH . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/language/" . $xoopsConfig['language'] . "/changelog.txt"; -} else { - $file = XOOPS_ROOT_PATH . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/language/english/changelog.txt"; -} -if (is_readable($file)) { - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XADDRESSES_ABOUT_CHANGELOG . "</legend>"; - echo "<div style='padding: 8px;'>"; - echo "<div>" . utf8_encode(implode('<br />', file($file))) . "</div>"; - echo "</div>"; - echo "</fieldset>"; - echo "<br clear=\"all\" />"; -} - -include "admin_footer.php"; -?> \ No newline at end of file Deleted: XoopsModules/xaddresses/trunk/xaddresses/admin/about.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/about.php 2012-08-01 22:03:26 UTC (rev 9974) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/about.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -1,34 +0,0 @@ -<?php -/** - * **************************************************************************** - * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) - * **************************************************************************** - * XADDRESSES - MODULE FOR XOOPS - * Copyright (c) 2007 - 2012 - * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * - * 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. See the - * GNU General Public License for more details. - * --------------------------------------------------------------------------- - * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * @license GPL see LICENSE - * @package xaddresses - * @author Rota Lucio ( luc...@gm... ) - * - * Version : 1.0 Mon 2012/07/23 14:17:52 : XOOPS Exp $ - * **************************************************************************** - */ - -include "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/xaddresses/trunk/xaddresses/admin/about.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/about.php (rev 0) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/about.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -0,0 +1,34 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XADDRESSES - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * + * 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. See the + * GNU General Public License for more details. + * --------------------------------------------------------------------------- + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html& ... public license + * @package xaddresses + * @since 1.0 + * @author luciorota <luc...@gm...> + * @version $Id$ + */ + +include "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 Deleted: XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php 2012-08-01 22:03:26 UTC (rev 9974) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -1,35 +0,0 @@ -<?php -/** - * **************************************************************************** - * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) - * **************************************************************************** - * XADDRESSES - MODULE FOR XOOPS - * Copyright (c) 2007 - 2012 - * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * - * 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. See the - * GNU General Public License for more details. - * --------------------------------------------------------------------------- - * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * @license GPL see LICENSE - * @package xaddresses - * @author Rota Lucio ( luc...@gm... ) - * - * Version : 1.0 Mon 2012/07/23 14:17:52 : XOOPS Exp $ - * **************************************************************************** - */ - -global $pathImageAdmin; -echo "<div align='center'><a href='http://www.xoops.org' target='_blank'> - <img src='".$pathImageModule."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a></div>"; -echo "<div class='center small italic pad5'> - <strong>" . $xoopsModule->getVar('name') . "</strong> "._AM_XADDRESSES_MAINTAINEDBY." - <a href='IN PROGRESS' title='Visit IN PROGRESS' class='tooltip' rel='external'>IN PROGRESS</a></div>"; -xoops_cp_footer(); Added: XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php (rev 0) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -0,0 +1,35 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XADDRESSES - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * + * 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. See the + * GNU General Public License for more details. + * --------------------------------------------------------------------------- + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html& ... public license + * @package xaddresses + * @since 1.0 + * @author luciorota <luc...@gm...> + * @version $Id$ + */ + +global $pathImageAdmin; +echo "<div align='center'><a href='http://www.xoops.org' target='_blank'> + <img src='".$pathImageModule."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a></div>"; +echo "<div class='center small italic pad5'> + <strong>" . $xoopsModule->getVar('name') . "</strong> "._AM_XADDRESSES_MAINTAINEDBY." + <a href='IN PROGRESS' title='Visit IN PROGRESS' class='tooltip' rel='external'>IN PROGRESS</a></div>"; +xoops_cp_footer(); Deleted: XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php 2012-08-01 22:03:26 UTC (rev 9974) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -1,154 +0,0 @@ -<?php -function moduleAdminTabMenu($adminmenu = array(), $currentFile = 0, $breadcrumb = " > ") -{ - if (is_int($currentFile)) { - $currentOption = $currentFile; - } else if (is_string($currentFile)) { - foreach($adminmenu as $key=>$adminitem ) { - preg_match( "/.*[\\/]([^\\/]+.php)\?*.*/", $adminitem['link'], $matches); - if ($matches[1] == $currentFile) $currentOption = $key; - } - } else { - return false; - } - - $moduleLink = XOOPS_URL . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname') . '/'; - /* Nice buttons styles */ - $adminTabCss = " - <style type='text/css'> - #buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; } - #buttonbar { float:left; width:100%; background: #e7e7e7 url('" . $moduleLink . "images/deco/bg.png') repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; } - #buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; } - #buttonbar li { display:inline; margin:0; padding:0; } - #buttonbar a { float:left; background:url('" . $moduleLink . "images/deco/left_both.png') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; } - #buttonbar a span { float:left; display:block; background:url('" . $moduleLink . "images/deco/right_both.png') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; } - /* Commented Backslash Hack hides rule from IE5-Mac \*/ - #buttonbar a span {float:none;} - /* End IE5-Mac hack */ - #buttonbar a:hover span { color:#333; } - #buttonbar .current a { background-position:0 -150px; border-width:0; } - #buttonbar .current a span { background-position:100% -150px; padding-bottom:5px; color:#333; } - #buttonbar a:hover { background-position:0% -150px; } - #buttonbar a:hover span { background-position:100% -150px; } - div.CPbigTitle{ - font-size: 12px; - color: #606060; - background: no-repeat left top; - font-weight: bold; - height: 30px; - vertical-align: middle; - padding: 10px 0 0 40px; - /*border-bottom: 3px solid #393e41;*/ - border-bottom: none; - } - </style> - "; - - global $xoopsConfig; - xoops_loadLanguage('modinfo', $GLOBALS['xoopsModule']->getVar('dirname')); - - $adminTabHtml = ''; - $adminTabHtml.= "<div id='buttontop'>"; - $adminTabHtml.= "<table style=\"width: 100%; padding: 0; \" cellspacing=\"0\"><tr>"; - $adminTabHtml.= "<td style='font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;'>"; - $adminTabHtml.= "<a class='nobutton' href='" . XOOPS_URL . "/modules/system/admin.php?fct=preferences&op=showmod&mod=" . $GLOBALS['xoopsModule']->getVar('mid') . "'>" . _PREFERENCES . "</a>"; - $adminTabHtml.= " | "; - $adminTabHtml.= "<a href='" . $moduleLink . "index.php'>" . $GLOBALS['xoopsModule']->getVar('name') . "</a>"; - $adminTabHtml.= "</td>"; - $adminTabHtml.= "<td style='font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;'><b>" . $GLOBALS['xoopsModule']->getVar('name') . $breadcrumb . $adminmenu[$currentOption]["title"] . "</b> </td>"; - $adminTabHtml.= "</tr></table>"; - $adminTabHtml.= "</div>"; - - $adminTabHtml.= "<div id='buttonbar'>"; - $adminTabHtml.= "<ul>"; - - foreach(array_keys($adminmenu) as $key ) { - $adminTabHtml.= (($currentOption == $key)? '<li class="current">':'<li>') . '<a href="' . $moduleLink . $adminmenu[$key]["link"] . '"><span>' . $adminmenu[$key]["title"] . '</span></a></li>'; - } - - $adminTabHtml.= "</ul></div>"; - $adminTabHtml.= "<br style='clear:both;' >"; - - $adminTabHtml.= '<div class="CPbigTitle" style="background-image: url(../' . $adminmenu[$currentOption]["icon"] .'); background-repeat: no-repeat; background-position: left; padding-left: 48px; height: 48px;">'; - $adminTabHtml.= '<strong>' . $adminmenu[$currentOption]["title"] . '</strong>'; - $adminTabHtml.= '</div>'; - - return $adminTabCss . $adminTabHtml; -} - - - -function moduleAdminSubmenu ($submenuItems) { - echo "<div class='xo-buttons'>"; - echo implode($submenuItems, ' | '); - echo "</div>"; -} - - - - - - - - - - -function xaddressesAdminMenu ($currentoption = 0, $breadcrumb = '') { - - /* Nice buttons styles */ - echo " - <style type='text/css'> - #buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; } - #buttonbar { float:left; width:100%; background: #e7e7e7 url('" . XOOPS_URL . "/modules/xaddresses/images/deco/bg.png') repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; } - #buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; } - #buttonbar li { display:inline; margin:0; padding:0; } - #buttonbar a { float:left; background:url('" . XOOPS_URL . "/modules/xaddresses/images/deco/left_both.png') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; } - #buttonbar a span { float:left; display:block; background:url('" . XOOPS_URL . "/modules/xaddresses/images/deco/right_both.png') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; } - /* Commented Backslash Hack hides rule from IE5-Mac \*/ - #buttonbar a span {float:none;} - /* End IE5-Mac hack */ - #buttonbar a:hover span { color:#333; } - #buttonbar #current a { background-position:0 -150px; border-width:0; } - #buttonbar #current a span { background-position:100% -150px; padding-bottom:5px; color:#333; } - #buttonbar a:hover { background-position:0% -150px; } - #buttonbar a:hover span { background-position:100% -150px; } - </style> - "; - - global $xoopsConfig; - - $tblColors = Array(); - $tblColors[0] = $tblColors[1] = $tblColors[2] = $tblColors[3] = $tblColors[4] = $tblColors[5] = $tblColors[6] = $tblColors[7] = $tblColors[8] = ''; - $tblColors[$currentoption] = 'current'; - xoops_loadLanguage('modinfo', $GLOBALS['xoopsModule']->getVar('dirname')); - - echo "<div id='buttontop'>"; - echo "<table style=\"width: 100%; padding: 0; \" cellspacing=\"0\"><tr>"; - //echo "<td style=\"width: 45%; font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;\"><a class=\"nobutton\" href=\"../../system/admin.php?fct=preferences&op=showmod&mod=" . $GLOBALS['xoopsModule']->getVar('mid') . "\">" . _AM_SF_OPTS . "</a> | <a href=\"import.php\">" . _AM_SF_IMPORT . "</a> | <a href=\"../index.php\">" . _AM_SF_GOMOD . "</a> | <a href=\"../help/index.html\" target=\"_blank\">" . _AM_SF_HELP . "</a> | <a href=\"about.php\">" . _AM_SF_ABOUT . "</a></td>"; - echo "<td style='font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;'>"; - echo "<a class='nobutton' href='" . XOOPS_URL . "/modules/system/admin.php?fct=preferences&op=showmod&mod=" . $GLOBALS['xoopsModule']->getVar('mid') . "'>" . _PREFERENCES . "</a>"; - echo " | "; - echo "<a href='" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/index.php'>" . $GLOBALS['xoopsModule']->getVar('name') . "</a>"; - echo "</td>"; - echo "<td style='font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;'><b>" . $GLOBALS['xoopsModule']->getVar('name') . " </b> </td>"; - echo "</tr></table>"; - echo "</div>"; - - echo "<div id='buttonbar'>"; - echo "<ul>"; - echo "<li id='" . $tblColors[0] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/index.php\"><span>" . _MI_XADDRESSES_ADMENU1 . "</span></a></li>"; - echo "<li id='" . $tblColors[1] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/category.php\"><span>" . _MI_XADDRESSES_ADMENU2 . "</span></a></li>"; - echo "<li id='" . $tblColors[2] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/addresses.php\"><span>" . _MI_XADDRESSES_ADMENU3 . "</span></a></li>"; - echo "<li id='" . $tblColors[3] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/champs.php\"><span>" . _MI_XADDRESSES_ADMENU6 . "</span></a></li>"; - echo "<li id='" . $tblColors[4] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/permissions.php\"><span>" . _MI_XADDRESSES_ADMENU7 . "</span></a></li>"; - echo "</ul></div> "; -} - - - -function xaddressesAdminSubmenu ($submenuItems) { - echo "<div class='head'>"; - echo implode($submenuItems, ' | '); - echo "</div>"; -} -?> \ No newline at end of file Added: XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php (rev 0) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -0,0 +1,33 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XADDRESSES - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * + * 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. See the + * GNU General Public License for more details. + * --------------------------------------------------------------------------- + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html& ... public license + * @package xaddresses + * @since 1.0 + * @author luciorota <luc...@gm...> + * @version $Id$ + */ + +function xaddressesAdminSubmenu ($submenuItems) { + echo "<div class='head'>"; + echo implode($submenuItems, ' | '); + echo "</div>"; +} Deleted: XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php 2012-08-01 22:03:26 UTC (rev 9974) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -1,102 +0,0 @@ -<?php -/** - * **************************************************************************** - * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) - * **************************************************************************** - * XADDRESSES - MODULE FOR XOOPS - * Copyright (c) 2007 - 2012 - * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * - * 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. See the - * GNU General Public License for more details. - * --------------------------------------------------------------------------- - * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * @license GPL see LICENSE - * @package xaddresses - * @author Rota Lucio ( luc...@gm... ) - * - * Version : 1.0 Mon 2012/07/23 14:17:52 : XOOPS Exp $ - * **************************************************************************** - */ - -include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; -$dirname = basename(dirname(dirname( __FILE__ ) )); - -// Include xoops admin header -include_once XOOPS_ROOT_PATH . '/include/cp_header.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/class/tree.php'; -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; -xoops_load ('XoopsUserUtility'); - -$module_handler =& xoops_gethandler('module'); -$xoopsModule = & $module_handler->getByDirname($dirname); -$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); -$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); -$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); -$pathImageModule = XOOPS_URL . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/images'; - -// Include module functions -include_once XOOPS_ROOT_PATH . "/modules/{$dirname}/include/config.php"; -include_once XOOPS_ROOT_PATH . "/modules/{$dirname}/include/functions.php"; - - - -// Check and load moduleadmin classes -$pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin'); -$globalLanguage = $GLOBALS['xoopsConfig']['language']; -if ( file_exists($pathDir . '/language/' . $globalLanguage . '/main.php')){ - include_once $pathDir . '/language/' . $globalLanguage . '/main.php'; -} else { - include_once $pathDir . '/language/english/main.php'; -} -if ( file_exists($pathDir . '/moduleadmin.php')){ - include_once $pathDir . '/moduleadmin.php'; - //return true; -} else { - xoops_cp_header(); - echo xoops_error(_AM_XADDRESSES_NOFRAMEWORKS); - xoops_cp_footer(); - //return false; -} - -$myts =& MyTextSanitizer::getInstance(); - -// Get user groups -$groupPermHandler =& xoops_gethandler('groupperm'); -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(); -} - -$xoopsTpl->assign('pathImageIcon', $pathImageIcon); -$xoopsTpl->assign('pathImageAdmin', $pathImageAdmin); -//xoops_cp_header(); - -//Load module languages -xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); -xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); -xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); - -// Include module functions -include_once XOOPS_ROOT_PATH . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/include/functions.php'; -include_once XOOPS_ROOT_PATH . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/admin/admin_functions.php'; // admin functions -include_once XOOPS_ROOT_PATH . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/include/forms.php'; Added: XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php (rev 0) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -0,0 +1,102 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XADDRESSES - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * + * 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. See the + * GNU General Public License for more details. + * --------------------------------------------------------------------------- + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html& ... public license + * @package xaddresses + * @since 1.0 + * @author luciorota <luc...@gm...> + * @version $Id$ + */ + +include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; +$dirname = basename(dirname(dirname( __FILE__ ) )); + +// Include xoops admin header +include_once XOOPS_ROOT_PATH . '/include/cp_header.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/class/tree.php'; +include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; +xoops_load ('XoopsUserUtility'); + +$module_handler =& xoops_gethandler('module'); +$xoopsModule = & $module_handler->getByDirname($dirname); +$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); +$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); +$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); +$pathImageModule = XOOPS_URL . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/images'; + +// Include module functions +include_once XOOPS_ROOT_PATH . "/modules/{$dirname}/include/config.php"; +include_once XOOPS_ROOT_PATH . "/modules/{$dirname}/include/functions.php"; + + + +// Check and load moduleadmin classes +$pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin'); +$globalLanguage = $GLOBALS['xoopsConfig']['language']; +if ( file_exists($pathDir . '/language/' . $globalLanguage . '/main.php')){ + include_once $pathDir . '/language/' . $globalLanguage . '/main.php'; +} else { + include_once $pathDir . '/language/english/main.php'; +} +if ( file_exists($pathDir . '/moduleadmin.php')){ + include_once $pathDir . '/moduleadmin.php'; + //return true; +} else { + xoops_cp_header(); + echo xoops_error(_AM_XADDRESSES_NOFRAMEWORKS); + xoops_cp_footer(); + //return false; +} + +$myts =& MyTextSanitizer::getInstance(); + +// Get user groups +$groupPermHandler =& xoops_gethandler('groupperm'); +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(); +} + +$xoopsTpl->assign('pathImageIcon', $pathImageIcon); +$xoopsTpl->assign('pathImageAdmin', $pathImageAdmin); +//xoops_cp_header(); + +//Load module languages +xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); + +// Include module functions +include_once XOOPS_ROOT_PATH . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/include/functions.php'; +include_once XOOPS_ROOT_PATH . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/admin/admin_functions.php'; // admin functions +include_once XOOPS_ROOT_PATH . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/include/forms.php'; Deleted: XoopsModules/xaddresses/trunk/xaddresses/admin/field.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/field.php 2012-08-01 22:03:26 UTC (rev 9974) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/field.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -1,383 +0,0 @@ -<?php -$currentFile = basename(__FILE__); -include 'admin_header.php'; -$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : (isset($_REQUEST['field_id']) ? 'edit_field' : 'list_fields'); - -// load classes -$fieldCategoryHandler =& xoops_getmodulehandler('fieldcategory', 'xaddresses'); -$fieldHandler =& xoops_getmodulehandler('field', 'xaddresses'); - - - -switch ($op) { -default: -case 'list_fields': - // render start here - xoops_cp_header(); - // submenu - $status_display = isset($_REQUEST['status_display']) ? $_REQUEST['status_display'] : 1; - $submenuItem[] = ($op == 'new_field' ? _AM_XADDRESSES_FIELD_NEW : '<a href="' . $currentFile . '?op=new_field">' . _AM_XADDRESSES_FIELD_NEW . '</a>'); - $submenuItem[] = ($op == 'list_fields' ? _AM_XADDRESSES_FIELD_LIST : '<a href="' . $currentFile . '?op=list_fields">' . _AM_XADDRESSES_FIELD_LIST . '</a>'); - xaddressesAdminSubmenu ($submenuItem); - - // get fields categories - $criteria = new CriteriaCompo(); - $criteria->setSort('cat_weight'); - $cats = $fieldCategoryHandler->getObjects($criteria, true); - unset($criteria); - $categories[0] = _AM_XADDRESSES_FIELD_CATEGORY_NONE; - if ( count($cats) > 0 ) { - foreach (array_keys($cats) as $i ) { - $categories[$cats[$i]->getVar('cat_id')] = $cats[$i]->getVar('cat_title'); - } - } - $GLOBALS['xoopsTpl']->assign('categories', $categories); - unset($categories); - - $valuetypes = array( - XOBJ_DTYPE_ARRAY => _AM_XADDRESSES_FIELD_ARRAY, - XOBJ_DTYPE_EMAIL => _AM_XADDRESSES_FIELD_EMAIL, - XOBJ_DTYPE_INT => _AM_XADDRESSES_FIELD_INT, - XOBJ_DTYPE_TXTAREA => _AM_XADDRESSES_FIELD_TXTAREA, - XOBJ_DTYPE_TXTBOX => _AM_XADDRESSES_FIELD_TXTBOX, - XOBJ_DTYPE_URL => _AM_XADDRESSES_FIELD_URL, - XOBJ_DTYPE_OTHER => _AM_XADDRESSES_FIELD_OTHER, - XOBJ_DTYPE_MTIME => _AM_XADDRESSES_FIELD_DATE - ); - $fieldtypes = array( - 'checkbox' => _AM_XADDRESSES_FIELD_CHECKBOX, - 'group' => _AM_XADDRESSES_FIELD_GROUP, - 'group_multi' => _AM_XADDRESSES_FIELD_GROUPMULTI, - 'language' => _AM_XADDRESSES_FIELD_LANGUAGE, - 'radio' => _AM_XADDRESSES_FIELD_RADIO, - 'select' => _AM_XADDRESSES_FIELD_SELECT, - 'select_multi' => _AM_XADDRESSES_FIELD_SELECTMULTI, - 'textarea' => _AM_XADDRESSES_FIELD_TEXTAREA, - 'dhtml' => _AM_XADDRESSES_FIELD_DHTMLTEXTAREA, - 'textbox' => _AM_XADDRESSES_FIELD_TEXTBOX, - 'timezone' => _AM_XADDRESSES_FIELD_TIMEZONE, - 'yesno' => _AM_XADDRESSES_FIELD_YESNO, - 'date' => _AM_XADDRESSES_FIELD_DATE, - 'datetime' => _AM_XADDRESSES_FIELD_DATETIME, - 'longdate' => _AM_XADDRESSES_FIELD_LONGDATE, - 'theme' => _AM_XADDRESSES_FIELD_THEME, - 'autotext' => _AM_XADDRESSES_FIELD_AUTOTEXT, - 'rank' => _AM_XADDRESSES_FIELD_RANK, - 'image' => _AM_XADDRESSES_FIELD_XOOPSIMAGE, - 'multipleimage' => _AM_XADDRESSES_FIELD_MULTIPLEXOOPSIMAGE, - 'file' => _AM_XADDRESSES_FIELD_FILE, - 'multiplefile' => _AM_XADDRESSES_FIELD_MULTIPLEFILE, - //'kmlmap' => _AM_XADDRESSES_FIELD_KMLMAP - ); - - // get fields - $numRows = $fieldHandler->getCount(); - - if ($numRows > 0) { - $fields = $fieldHandler->getObjects(null, true, false); // get an array of arrays - foreach (array_keys($fields) as $i ) { - $fields[$i]['fieldtype'] = $fieldtypes[$fields[$i]['field_type']]; - $fields[$i]['valuetype'] = $valuetypes[$fields[$i]['field_valuetype']]; - $fieldcategories[$fields[$i]['cat_id']][] = $fields[$i]; - $weights[$fields[$i]['cat_id']][] = $fields[$i]['field_weight']; - } - //sort fields order in categories - foreach (array_keys($fieldcategories) as $i ) { - array_multisort($weights[$i], SORT_ASC, array_keys($fieldcategories[$i]), SORT_ASC, $fieldcategories[$i]); - } - ksort($fields); - $GLOBALS['xoopsTpl']->assign('fieldcategories', $fieldcategories); - - $GLOBALS['xoopsTpl']->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML() ); - $GLOBALS['xoopsTpl']->display("db:xaddresses_admin_fieldlist.html"); - } else { - echo '<div class="errorMsg">' . _AM_XADDRESSES_ERROR_NO_FIELDS . '</div>'; - } - include "admin_footer.php"; - break; - - - -case 'new_field': - // render start here - xoops_cp_header(); - // submenu - $status_display = isset($_REQUEST['status_display']) ? $_REQUEST['status_display'] : 1; - $submenuItem[] = ($op == 'new_field' ? _AM_XADDRESSES_FIELD_NEW : '<a href="' . $currentFile . '?op=new_field">' . _AM_XADDRESSES_FIELD_NEW . '</a>'); - $submenuItem[] = ($op == 'list_fields' ? _AM_XADDRESSES_FIELD_LIST : '<a href="' . $currentFile . '?op=list_fields">' . _AM_XADDRESSES_FIELD_LIST . '</a>'); - xaddressesAdminSubmenu ($submenuItem); - - include_once('../include/forms.php'); - $field =& $fieldHandler->create(); - $form = xaddresses_getFieldForm($field); - $form->display(); - - include "admin_footer.php"; - break; - - - -case 'edit_field': - $field =& $fieldHandler->get($_REQUEST['field_id']); - if ( !$field->getVar('field_config') && !$field->getVar('field_show') && !$field->getVar('field_edit') ) { //If no configs exist - redirect_header($currentFile, 2, _AM_XADDRESSES_FIELDNOTCONFIGURABLE); - } - // render start here - xoops_cp_header(); - // submenu - $status_display = isset($_REQUEST['status_display']) ? $_REQUEST['status_display'] : 1; - $submenuItem[] = ($op == 'new_field' ? _AM_XADDRESSES_FIELD_NEW : '<a href="' . $currentFile . '?op=new_field">' . _AM_XADDRESSES_FIELD_NEW . '</a>'); - $submenuItem[] = ($op == 'list_fields' ? _AM_XADDRESSES_FIELD_LIST : '<a href="' . $currentFile . '?op=list_fields">' . _AM_XADDRESSES_FIELD_LIST . '</a>'); - xaddressesAdminSubmenu ($submenuItem); - - include_once('../include/forms.php'); - $form = xaddresses_getFieldForm($field); - $form->display(); - - include "admin_footer.php"; - break; - - - -case 'reorder_fields': - if (!$GLOBALS['xoopsSecurity']->check()) { - redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors() )); - } - if (isset($_POST['field_ids']) && count($_POST['field_ids']) > 0) { - $oldweight = $_POST['oldweight']; - $oldcat = $_POST['oldcat']; - $category = $_POST['category']; - $weight = $_POST['weight']; - $ids = array(); - foreach ($_POST['field_ids'] as $field_id) { - if ( $oldweight[$field_id] != $weight[$field_id] || $oldcat[$field_id] != $category[$field_id] ) { - //if field has changed - $ids[] = intval($field_id); - } - } - if ( count($ids) > 0 ) { - $errors = array(); - //if there are changed fields, fetch the fieldcategory objects - $fields = $fieldHandler->getObjects(new Criteria('field_id', "(" . implode(',', $ids) . ")", "IN"), true); - foreach ($ids as $i ) { - $fields[$i]->setVar('field_weight', intval($weight[$i])); - $fields[$i]->setVar('cat_id', intval($category[$i])); - if (!$fieldHandler->insert($fields[$i])) { - $errors = array_merge($errors, $fields[$i]->getErrors()); - } - } - if ( count($errors) == 0 ) { - //no errors - redirect_header($currentFile, 2, sprintf(_AM_XADDRESSES_SAVEDSUCCESS, _AM_XADDRESSES_FIELDS) ); - } else { - redirect_header($currentFile, 3, implode('<br />', $errors) ); - } - } - } - break; - - - -case 'save_field': - if (!$GLOBALS['xoopsSecurity']->check()) { - redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); - } - - $redirectToEdit = false; // true if field editing is not complete - if (isset($_REQUEST['field_id'])) { - $field =& $fieldHandler->get($_REQUEST['field_id']); - // if no configs exist - if (!$field->getVar('field_config') && !$field->getVar('field_show') && !$field->getVar('field_edit')) { - redirect_header('admin.php', 2, _AM_XADDRESSES_FIELDNOTCONFIGURABLE); - } - } else { - // if is a new field - $field =& $fieldHandler->create(); - $field->setVar('field_name', $_REQUEST['field_name']); - $field->setVar('field_show', true); - $field->setVar('field_edit', true); - $field->setVar('field_config', true); - $redirectToEdit = true; - } - if ($_REQUEST['field_type'] != $field->getVar('field_type')) { - $field->setVar('field_options', array()); - $field->setVar('field_default', ''); - $redirectToEdit = true; - } - - $field->setVar('field_title', $_REQUEST['field_title']); - $field->setVar('field_description', $_REQUEST['field_description']); - - if ($field->getVar('field_config')) { - $field->setVar('field_type', $_REQUEST['field_type']); - if (isset($_REQUEST['field_valuetype'])) { - $field->setVar('field_valuetype', $_REQUEST['field_valuetype']); - } - - // field_options - $fieldTypesWithOptions = array('select', 'select-multi', 'radio', 'checkbox'); - if (in_array($field->getVar('field_type'), $fieldTypesWithOptions)) { - $options = $field->getVar('field_options'); - // if options are removed - if (isset($_REQUEST['removeOptions']) && is_array($_REQUEST['removeOptions'])) { - foreach ($_REQUEST['removeOptions'] as $optionKey) { - unset($options[$optionKey]); - } - $redirectToEdit = true; - } - // if options are added - if (!empty($_REQUEST['addOption'])) { - foreach ($_REQUEST['addOption'] as $option) { - if ( empty($option['value'])) continue; - $options[$option['key']] = $option['value']; - $redirectToEdit = true; - } - } - $field->setVar('field_options', $options); - if (count($options) < 1) { - $redirectToEdit = true; - // SHOW WARNING: PLEASE ENTHER 1 OPTION AT LEAST - } - } else { - $field->setVar('field_options', array()); - } - } - - if ($field->getVar('field_edit')) { - // field_notnull - //$notnull = isset($_REQUEST['field_notnull']) ? $_REQUEST['field_notnull'] : false; - //$field->setVar('field_notnull', $notnull); //0 = no, 1 = yes - // field_required - $required = isset($_REQUEST['field_required']) ? $_REQUEST['field_required'] : false; - $field->setVar('field_required', $required); //0 = no, 1 = yes - - // field_maxlength - if (isset($_REQUEST['field_maxlength'])) { - $field->setVar('field_maxlength', $_REQUEST['field_maxlength']); - } - - // field_default - if (isset($_REQUEST['field_default'])) { - $field_default = $field->getValueForSave($_REQUEST['field_default']); - //Check for multiple selections - if (is_array($field_default)) { - $field->setVar('field_default', serialize($field_default)); - } else { - $field->setVar('field_default', $field_default); - } - } - - // field_extras - if (!empty($_REQUEST['field_extras'])) { - $field->setVar('field_extras', $_REQUEST['field_extras']); - } else { - $field->setVar('field_extras', array()); - } - } - - if ($field->getVar('field_show')) { - $field->setVar('field_weight', $_REQUEST['field_weight']); - $field->setVar('cat_id', $_REQUEST['field_category']); - } - - if ($fieldHandler->insert($field)) { - $groupPermHandler =& xoops_gethandler('groupperm'); - - $permArray = array(); - if ($field->getVar('field_show')) { - $permArray[] = 'field_view'; - //$permArray[] = 'field_visible'; - } - if ($field->getVar('field_edit')) { - $permArray[] = 'field_edit'; - } - if ($field->getVar('field_edit') || $field->getVar('field_show')) { - $permArray[] = 'field_search'; - } - if (count($permArray) > 0) { - foreach ($permArray as $perm) { - $criteria = new CriteriaCompo(new Criteria('gperm_name', $perm)); - $criteria->add(new Criteria('gperm_itemid', (int)$field->getVar('field_id'))); - $criteria->add(new Criteria('gperm_modid', (int)$GLOBALS['xoopsModule']->getVar('mid'))); - if ( isset($_REQUEST[$perm]) && is_array($_REQUEST[$perm])) { - $perms = $groupPermHandler->getObjects($criteria); - if ( count($perms) > 0 ) { - foreach (array_keys($perms) as $i) { - $groups[$perms[$i]->getVar('gperm_groupid')] =& $perms[$i]; - } - } else { - $groups = array(); - } - foreach ($_REQUEST[$perm] as $groupId) { - $groupId = (int)$groupId; - if ( !isset($groups[$groupId])) { - $permObj =& $groupPermHandler->create(); - $permObj->setVar('gperm_name', $perm); - $permObj->setVar('gperm_itemid', (int)$field->getVar('field_id')); - $permObj->setVar('gperm_modid', $GLOBALS['xoopsModule']->getVar('mid')); - $permObj->setVar('gperm_groupid', $groupId); - $groupPermHandler->insert($permObj); - unset($permObj); - } - } - $removedGroups = array_diff(array_keys($groups), $_REQUEST[$perm]); - if ( count($removedGroups) > 0 ) { - $criteria->add(new Criteria('gperm_groupid', "(".implode(',', $removedGroups).")", "IN")); - $groupPermHandler->deleteAll($criteria); - } - unset($groups); - - } else { - $groupPermHandler->deleteAll($criteria); - } - unset($criteria); - } - } - if ($redirectToEdit) { - redirect_header($currentFile . '?op=edit_field&field_id=' . $field->getVar('field_id'), 3, _AM_XADDRESSES_FIELD_NEXT_STEP); - } else { - redirect_header($currentFile, 3, sprintf(_AM_XADDRESSES_SAVEDSUCCESS, _AM_XADDRESSES_FIELD)); - } - } - - // render start here - xoops_cp_header(); - // submenu - $status_display = isset($_REQUEST['status_display']) ? $_REQUEST['status_display'] : 1; - $submenuItem[] = ($op == 'new_field' ? _AM_XADDRESSES_FIELD_NEW : '<a href="' . $currentFile . '?op=new_field">' . _AM_XADDRESSES_FIELD_NEW . '</a>'); - $submenuItem[] = ($op == 'list_fields' ? _AM_XADDRESSES_FIELD_LIST : '<a href="' . $currentFile . '?op=list_fields">' . _AM_XADDRESSES_FIELD_LIST . '</a>'); - xaddressesAdminSubmenu ($submenuItem); - include_once('../include/forms.php'); - - echo $field->getHtmlErrors(); - - $form = xaddresses_getFieldForm($field); - $form->display(); - include "admin_footer.php"; - break; - - - -case 'delete_field': - $field =& $fieldHandler->get($_REQUEST['field_id']); - if ( !$field->getVar('field_config') ) { - redirect_header('index.php', 2, _AM_XADDRESSES_FIELDNOTCONFIGURABLE); - } - if ( isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1 ) { - if ( !$GLOBALS['xoopsSecurity']->check() ) { - redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors() )); - } - if ( $fieldHandler->delete($field) ) { - redirect_header($currentFile, 3, sprintf(_AM_XADDRESSES_DELETEDSUCCESS, _AM_XADDRESSES_FIELD) ); - } else { - echo $field->getHtmlErrors(); - } - } else { - // render start here - xoops_cp_header(); - xoops_confirm(array('ok' => 1, 'field_id' => $_REQUEST['field_id'], 'op' => 'delete_field'), $_SERVER['REQUEST_URI'], sprintf(_AM_XADDRESSES_RUSUREDEL, $field->getVar('field_title') )); - xoops_cp_footer(); - } - break; -} -?> \ No newline at end of file Added: XoopsModules/xaddresses/trunk/xaddresses/admin/field.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/field.php (rev 0) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/field.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -0,0 +1,409 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XADDRESSES - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * + * 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. See the + * GNU General Public License for more details. + * --------------------------------------------------------------------------- + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html& ... public license + * @package xaddresses + * @since ... [truncated message content] |
From: <luc...@us...> - 2012-08-01 22:03:36
|
Revision: 9974 http://xoops.svn.sourceforge.net/xoops/?rev=9974&view=rev Author: luciorota Date: 2012-08-01 22:03:26 +0000 (Wed, 01 Aug 2012) Log Message: ----------- some bug fixes now module is ready to test ;-) Modified Paths: -------------- XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/class/formajaxfilemanager.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/class/formmultipleajaxfilemanager.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/class/formmultiplexoopsimage.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/class/formxoopsimage.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/class/formxoopsimageold.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/class/menu.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/class/sampleform.inc.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/image.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/install/textsanitizer.extensions/ajaxfilemanager/ajaxfilemanager.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/install/textsanitizer.extensions/gmap/gmap.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/install/textsanitizer.extensions/video/video.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/language/english/admin.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/language/english/modinfo.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/xoops_version.php Added Paths: ----------- XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/about.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_footer.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_header.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/extensions.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/filemanager.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/index.html XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/index.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/menu.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/permissions.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/include/functions.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/include/index.html XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/include/install_function.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/include/uninstall_function.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/include/update_function.php Removed Paths: ------------- XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/about.old.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/about.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_footer.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_functions.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_header.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/extensions.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/filemanager.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/help.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/index.html XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/index.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/menu.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/permissions.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/include/functions.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/include/index.html XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/include/install_function.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/include/uninstall_function.php XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/include/update_function.php Deleted: XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/about.old.php =================================================================== --- XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/about.old.php 2012-08-01 18:58:48 UTC (rev 9973) +++ XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/about.old.php 2012-08-01 22:03:26 UTC (rev 9974) @@ -1,124 +0,0 @@ -<?php -/** - * Ajax File Manager - * - * 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 http://www.fsf.org/copyleft/gpl.html& ... public license - * @package ajaxfilemanager - * @since 0.1 - * @author luciorota <luc...@gm...> - * @version $Id$ - */ - -include 'admin_header.php'; -$currentFile = basename(__FILE__); -$versionInfo =& $module_handler->get($xoopsModule->getVar('mid')); - -// load classes - -// get/check parameters/post - -// render start here -xoops_cp_header(); - -echo " - <style type=\"text/css\"> - label,text { - display: block; - float: left; - margin-bottom: 2px; - } - label { - text-align: right; - width: 150px; - padding-right: 20px; - } - br { - clear: left; - } - </style> -"; - -echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . $xoopsModule->getVar('name'). "</legend>"; -echo "<div style='padding: 8px;'>"; -echo "<img src='" . XOOPS_URL . "/modules/" . $xoopsModule->getVar('dirname') . "/" . $versionInfo->getInfo('image') . "' alt='' hspace='10' vspace='0' /></a>\n"; -echo "<div style='padding: 5px;'><strong>" . $versionInfo->getInfo('name') . " version " . $versionInfo->getInfo('version') . "</strong></div>\n"; -echo "<label>" . _AM_AJAXFM_ABOUT_RELEASEDATE . ":</label><text>" . date(_SHORTDATESTRING, $versionInfo->getInfo('release')) . "</text><br />"; -echo "<label>" . _AM_AJAXFM_ABOUT_AUTHOR . ":</label><text>" . $versionInfo->getInfo('author') . "</text><br />"; -echo "<label>" . _AM_AJAXFM_ABOUT_CREDITS . ":</label><text>" . $versionInfo->getInfo('credits') . "</text><br />"; -echo "<label>" . _AM_AJAXFM_ABOUT_LICENSE . ":</label><text><a href=\"".$versionInfo->getInfo('license_file')."\" target=\"_blank\" >" . $versionInfo->getInfo('license') . "</a></text>\n"; -echo "</div>"; -echo "</fieldset>"; -echo "<br clear=\"all\" />"; - -echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_AJAXFM_ABOUT_MODULEINFOS . "</legend>"; -echo "<div style='padding: 8px;'>"; -echo "<label>" . _AM_AJAXFM_ABOUT_STATUS . ":</label><text>" . $versionInfo->getInfo('module_status') . "</text><br />"; -echo "<label>" . _AM_AJAXFM_ABOUT_MODULEWEBSITE . ":</label><text>" . "<a href='" . $versionInfo->getInfo('support_site_url') . "' target='_blank'>" . $versionInfo->getInfo('support_site_name') . "</a>" . "</text><br />"; -echo "</div>"; -echo "</fieldset>"; -echo "<br clear=\"all\" />"; - -echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_AJAXFM_ABOUT_AUTHORINFOS . "</legend>"; -echo "<div style='padding: 8px;'>"; -echo "<label>" . _AM_AJAXFM_ABOUT_AUTHOR . ":</label><text>" . $versionInfo->getInfo('author') . "</text><br />"; -echo "<label>" . _AM_AJAXFM_ABOUT_AUTHORWEBSITE . ":</label><text>" . "<a href='" . $versionInfo->getInfo('author_website_url') . "' target='_blank'>" . $versionInfo->getInfo('author_website_name') . "</a>" . "</text><br />"; -echo "<label>" . _AM_AJAXFM_ABOUT_AUTHOREMAIL . ":</label><text>" . "<a href='emailto:" . $versionInfo->getInfo('author_mail') . "' target='_blank'>" . $versionInfo->getInfo('author_mail') . "</a>" . "</text><br />"; -echo "</div>"; - -echo "<br />"; - -// DONATE PAYPAL -$donate = '<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> -<input type="hidden" name="cmd" value="_s-xclick"> -<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHVwYJKoZIhvcNAQcEoIIHSDCCB0QCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBkoWMtP1IHf29Ib6Hf1/sPXwvSVqdFP1CnCjMvV8TRMZpwXzIq9LZzGpMaowhsAaQSKz7DenW6LcoCuouWMHaek/dD1rfGMArEq8hrfHOgzGD3NttnhJyaJUUsZ9Bv2q9x9InedkXVwuOh0nUNKLxyWdt4Tt91qczYffcIlgXttzELMAkGBSsOAwIaBQAwgdQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIBCIjuHY4x36AgbCOOWIyYuCfV/8J1vX3up22RKDQcos/WNi7VC/XRFyKwmCtDfpkSyfFlC/s0NYKnWSELfu/MztQAO7cQ4CCYUaSoa6g324Dyr3Or2L0gLeB9aG8V1YO3bVgnLLaNw45j+X3HRiF1QNZARpp5MBrYrVu98IBHQX61AgJJfdnioLDYzagEBIIyQariajQ6W+MSTJHSP+z0J2bb92SYh/bR7GGGkIPuMviJqH1snU0Eik6MKCCA4cwggODMIIC7KADAgECAgEAMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTAeFw0wNDAyMTMxMDEzMTVaFw0zNTAyMTMxMDEzMTVaMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwUdO3fxEzEtcnI7ZKZL412XvZPugoni7i7D7prCe0AtaHTc97CYgm7NsAtJyxNLixmhLV8pyIEaiHXWAh8fPKW+R017+EmXrr9EaquPmsVvTywAAE1PMNOKqo2kl4Gxiz9zZqIajOm1fZGWcGS0f5JQ2kBqNbvbg2/Za+GJ/qwUCAwEAAaOB7jCB6zAdBgNVHQ4EFgQUlp98u8ZvF71ZP1LXChvsENZklGswgbsGA1UdIwSBszCBsIAUlp98u8ZvF71ZP1LXChvsENZklGuhgZSkgZEwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAgV86VpqAWuXvX6Oro4qJ1tYVIT5DgWpE692Ag422H7yRIr/9j/iKG4Thia/Oflx4TdL+IFJBAyPK9v6zZNZtBgPBynXb048hsP16l2vi0k5Q2JKiPDsEfBhGI+HnxLXEaUWAcVfCsQFvd2A1sxRr67ip5y2wwBelUecP3AjJ+YcxggGaMIIBlgIBATCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTExMDQxMzE1MDEwM1owIwYJKoZIhvcNAQkEMRYEFCWihdPs7xd/vj+wxUAsz8MvsZ4yMA0GCSqGSIb3DQEBAQUABIGAV+hTiFSTJVdOv6RKFIQqdl6QoF4a+hfKz7tY+4pu+7HEXIYDbXCrYveD8793fg/NUmQ4+js196eOTAvocFj30/LpkFRkt94P4d2uAMJwH6nUG8Rdzxmam3WogA8wQ8T8YHs2zBcPZjeGE79IUbeSSozlkdCEWUbxutDSS/ZOfjo=-----END PKCS7----- -"> -<input type="image" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online."> -<img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/it_IT/i/scr/pixel.gif" width="1" height="1"> -</form>'; -echo "<div style='padding: 8px;'>"; -echo $donate; -echo "</div>"; - -echo "</fieldset>"; -echo "<br clear=\"all\" />"; - -// get language 'description.html' file -if (file_exists(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar('dirname') . "/language/" . $xoopsConfig['language'] . "/description.html")) { - $file = XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar('dirname') . "/language/" . $xoopsConfig['language'] . "/description.html"; -} else { - $file = XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar('dirname') . "/language/english/description.html"; -} -if (is_readable($file)) { - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_AJAXFM_ABOUT_DESCRIPTION . "</legend>"; - echo "<div style='padding: 8px;'>"; - echo "<div>". implode('', file($file)) . "</div>"; - echo "</div>"; - echo "</fieldset>"; - echo "<br clear=\"all\" />"; -} - -// get language 'changelog.txt' file -if (file_exists(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar('dirname') . "/language/" . $xoopsConfig['language'] . "/changelog.txt")) { - $file = XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar('dirname') . "/language/" . $xoopsConfig['language'] . "/changelog.txt"; -} else { - $file = XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar('dirname') . "/language/english/changelog.txt"; -} -if (is_readable($file)) { - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_AJAXFM_ABOUT_CHANGELOG . "</legend>"; - echo "<div style='padding: 8px;'>"; - echo "<div>" . utf8_encode(implode('<br />', file($file))) . "</div>"; - echo "</div>"; - echo "</fieldset>"; - echo "<br clear=\"all\" />"; -} - -xoops_cp_footer(); -?> \ No newline at end of file Deleted: XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/about.php =================================================================== --- XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/about.php 2012-08-01 18:58:48 UTC (rev 9973) +++ XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/about.php 2012-08-01 22:03:26 UTC (rev 9974) @@ -1,34 +0,0 @@ -<?php -/** - * **************************************************************************** - * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) - * **************************************************************************** - * XADDRESSES - MODULE FOR XOOPS - * Copyright (c) 2007 - 2012 - * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * - * 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. See the - * GNU General Public License for more details. - * --------------------------------------------------------------------------- - * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * @license GPL see LICENSE - * @package xaddresses - * @author Rota Lucio ( luc...@gm... ) - * - * Version : 1.0 Mon 2012/07/23 14:17:52 : XOOPS Exp $ - * **************************************************************************** - */ - -include "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/ajaxfilemanager/trunk/ajaxfilemanager/admin/about.php =================================================================== --- XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/about.php (rev 0) +++ XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/about.php 2012-08-01 22:03:26 UTC (rev 9974) @@ -0,0 +1,34 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * AJAXFILEMANAGER - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * + * 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. See the + * GNU General Public License for more details. + * --------------------------------------------------------------------------- + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html& ... public license + * @package ajaxfilemanager + * @since 1.0 + * @author luciorota <luc...@gm...> + * @version $Id$ + */ + +include "admin_header.php"; +xoops_cp_header(); +$aboutAdmin = new ModuleAdmin(); +echo $aboutAdmin->addNavigation("about.php"); +echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); +include "admin_footer.php"; Deleted: XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_footer.php =================================================================== --- XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_footer.php 2012-08-01 18:58:48 UTC (rev 9973) +++ XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_footer.php 2012-08-01 22:03:26 UTC (rev 9974) @@ -1,35 +0,0 @@ -<?php -/** - * **************************************************************************** - * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) - * **************************************************************************** - * AJAXFILEMANAGER - MODULE FOR XOOPS - * Copyright (c) 2007 - 2012 - * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * - * 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. See the - * GNU General Public License for more details. - * --------------------------------------------------------------------------- - * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * @license GPL see LICENSE - * @package ajaxfilemanager - * @author Rota Lucio ( luc...@gm... ) - * - * Version : 1.0 Mon 2012/07/23 14:17:52 : XOOPS Exp $ - * **************************************************************************** - */ - -global $pathImageAdmin; -echo "<div align='center'><a href='http://www.xoops.org' target='_blank'> - <img src='".$pathImageModule."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a></div>"; -echo "<div class='center small italic pad5'> - <strong>" . $xoopsModule->getVar('name') . "</strong> " . _AM_AJAXFM_MAINTAINEDBY." - <a href='IN PROGRESS' title='Visit IN PROGRESS' class='tooltip' rel='external'>IN PROGRESS</a></div>"; -xoops_cp_footer(); Added: XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_footer.php =================================================================== --- XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_footer.php (rev 0) +++ XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_footer.php 2012-08-01 22:03:26 UTC (rev 9974) @@ -0,0 +1,35 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * AJAXFILEMANAGER - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * + * 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. See the + * GNU General Public License for more details. + * --------------------------------------------------------------------------- + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html& ... public license + * @package ajaxfilemanager + * @since 1.0 + * @author luciorota <luc...@gm...> + * @version $Id$ + */ + +global $pathImageAdmin; +echo "<div align='center'><a href='http://www.xoops.org' target='_blank'> + <img src='".$pathImageModule."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a></div>"; +echo "<div class='center small italic pad5'> + <strong>" . $xoopsModule->getVar('name') . "</strong> " . _AM_AJAXFM_MAINTAINEDBY." + <a href='IN PROGRESS' title='Visit IN PROGRESS' class='tooltip' rel='external'>IN PROGRESS</a></div>"; +xoops_cp_footer(); Deleted: XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_functions.php =================================================================== --- XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_functions.php 2012-08-01 18:58:48 UTC (rev 9973) +++ XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_functions.php 2012-08-01 22:03:26 UTC (rev 9974) @@ -1,104 +0,0 @@ -<?php -/** - * Ajax File Manager - * - * 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 http://www.fsf.org/copyleft/gpl.html& ... public license - * @package ajaxfilemanager - * @since 0.1 - * @author luciorota <luc...@gm...> - * @version $Id$ - */ - -function moduleAdminTabMenu($adminmenu = array(), $currentFile = 0, $breadcrumb = " > ") -{ - if (is_int($currentFile)) { - $currentOption = $currentFile; - } else if (is_string($currentFile)) { - foreach($adminmenu as $key=>$adminitem ) { - preg_match( "/.*[\\/]([^\\/]+.php)\?*.*/", $adminitem['link'], $matches); - if ($matches[1] == $currentFile) $currentOption = $key; - } - } else { - return false; - } - - $moduleLink = XOOPS_URL . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname') . '/'; - /* Nice buttons styles */ - $adminTabCss = " - <style type='text/css'> - #buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; } - #buttonbar { float:left; width:100%; background: #e7e7e7 url('" . $moduleLink . "images/deco/bg.png') repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; } - #buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; } - #buttonbar li { display:inline; margin:0; padding:0; } - #buttonbar a { float:left; background:url('" . $moduleLink . "images/deco/left_both.png') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; } - #buttonbar a span { float:left; display:block; background:url('" . $moduleLink . "images/deco/right_both.png') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; } - /* Commented Backslash Hack hides rule from IE5-Mac \*/ - #buttonbar a span {float:none;} - /* End IE5-Mac hack */ - #buttonbar a:hover span { color:#333; } - #buttonbar .current a { background-position:0 -150px; border-width:0; } - #buttonbar .current a span { background-position:100% -150px; padding-bottom:5px; color:#333; } - #buttonbar a:hover { background-position:0% -150px; } - #buttonbar a:hover span { background-position:100% -150px; } - div.CPbigTitle{ - font-size: 12px; - color: #606060; - background: no-repeat left top; - font-weight: bold; - height: 30px; - vertical-align: middle; - padding: 10px 0 0 40px; - /*border-bottom: 3px solid #393e41;*/ - border-bottom: none; - } - </style> - "; - - global $xoopsConfig; - xoops_loadLanguage('modinfo', $GLOBALS['xoopsModule']->getVar('dirname')); - - $adminTabHtml = ''; - $adminTabHtml.= "<div id='buttontop'>"; - $adminTabHtml.= "<table style=\"width: 100%; padding: 0; \" cellspacing=\"0\"><tr>"; - $adminTabHtml.= "<td style='font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;'>"; - $adminTabHtml.= "<a class='nobutton' href='" . XOOPS_URL . "/modules/system/admin.php?fct=preferences&op=showmod&mod=" . $GLOBALS['xoopsModule']->getVar('mid') . "'>" . _PREFERENCES . "</a>"; - $adminTabHtml.= " | "; - $adminTabHtml.= "<a href='" . $moduleLink . "index.php'>" . $GLOBALS['xoopsModule']->getVar('name') . "</a>"; - $adminTabHtml.= "</td>"; - $adminTabHtml.= "<td style='font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;'><b>" . $GLOBALS['xoopsModule']->getVar('name') . $breadcrumb . $adminmenu[$currentOption]["title"] . "</b> </td>"; - $adminTabHtml.= "</tr></table>"; - $adminTabHtml.= "</div>"; - - $adminTabHtml.= "<div id='buttonbar'>"; - $adminTabHtml.= "<ul>"; - - foreach(array_keys($adminmenu) as $key ) { - $adminTabHtml.= (($currentOption == $key)? '<li class="current">':'<li>') . '<a href="' . $moduleLink . $adminmenu[$key]["link"] . '"><span>' . $adminmenu[$key]["title"] . '</span></a></li>'; - } - - $adminTabHtml.= "</ul></div>"; - $adminTabHtml.= "<br style='clear:both;' >"; - - $adminTabHtml.= '<div class="CPbigTitle" style="background-image: url(../' . $adminmenu[$currentOption]["icon"] .'); background-repeat: no-repeat; background-position: left; padding-left: 48px; height: 48px;">'; - $adminTabHtml.= '<strong>' . $adminmenu[$currentOption]["title"] . '</strong>'; - $adminTabHtml.= '</div>'; - - return $adminTabCss . $adminTabHtml; -} - - - -function moduleAdminSubmenu ($submenuItems) { - echo "<div class='head'>"; - echo implode($submenuItems, ' | '); - echo "</div>"; -} -?> \ No newline at end of file Deleted: XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_header.php =================================================================== --- XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_header.php 2012-08-01 18:58:48 UTC (rev 9973) +++ XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_header.php 2012-08-01 22:03:26 UTC (rev 9974) @@ -1,89 +0,0 @@ -<?php -/** - * Ajax File Manager - * - * 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 http://www.fsf.org/copyleft/gpl.html& ... public license - * @package ajaxfilemanager - * @since 0.1 - * @author luciorota <luc...@gm...> - * @version $Id$ - */ - -// Include xoops admin header -include "../../../include/cp_header.php"; - -include_once(XOOPS_ROOT_PATH."/kernel/module.php"); -include_once XOOPS_ROOT_PATH."/class/xoopstree.php"; -include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; -include_once XOOPS_ROOT_PATH."/class/tree.php"; -include_once XOOPS_ROOT_PATH."/class/xoopslists.php"; -include_once XOOPS_ROOT_PATH."/class/pagenav.php"; -include_once XOOPS_ROOT_PATH."/class/xoopsform/grouppermform.php"; - -// Include module functions -include_once("../include/functions.php"); - - - -$pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin'); -$globalLanguage = $GLOBALS['xoopsConfig']['language']; - -if ( file_exists($pathDir . '/language/' . $globalLanguage . '/main.php')){ - include_once $pathDir . '/language/' . $globalLanguage . '/main.php'; -} else { - include_once $pathDir . '/language/english/main.php'; -} - -if ( file_exists($pathDir . '/moduleadmin.php')){ - include_once $pathDir . '/moduleadmin.php'; - //return true; -} else { - xoops_cp_header(); - echo xoops_error(_AM_AJAXFM_NOFRAMEWORKS); - xoops_cp_footer(); - //return false; -} - -$dirname = basename(dirname(dirname( __FILE__ ) )); -$module_handler =& xoops_gethandler('module'); -$xoopsModule = & $module_handler->getByDirname($dirname); -$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); -$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); -$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); -$pathImageModule = XOOPS_URL . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/images'; - - - -$myts =& MyTextSanitizer::getInstance(); - -if ( $xoopsUser ) { - $xoopsModule = XoopsModule::getByDirname('ajaxfilemanager'); - if ( !$xoopsUser->isAdmin($GLOBALS['xoopsModule']->mid()) ) { - redirect_header(XOOPS_URL . '/', 3, _NOPERM); - exit(); - } -} else { - redirect_header(XOOPS_URL."/",3,_NOPERM); - exit(); -} - -if ( !isset($GLOBALS['xoopsTpl']) || !is_object($GLOBALS['xoopsTpl']) ) { - include_once $GLOBALS['xoops']->path( "/class/template.php" ); - $GLOBALS['xoopsTpl'] = new XoopsTpl(); -} - -// Include language file -xoops_loadLanguage('admin', 'system'); -xoops_loadLanguage('admin', $GLOBALS['xoopsModule']->getVar('dirname')); -xoops_loadLanguage('modinfo', $GLOBALS['xoopsModule']->getVar('dirname')); - -include_once 'admin_functions.php'; // admin functions -?> \ No newline at end of file Added: XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_header.php =================================================================== --- XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_header.php (rev 0) +++ XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/admin_header.php 2012-08-01 22:03:26 UTC (rev 9974) @@ -0,0 +1,95 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * AJAXFILEMANAGER - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * + * 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. See the + * GNU General Public License for more details. + * --------------------------------------------------------------------------- + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html& ... public license + * @package ajaxfilemanager + * @since 1.0 + * @author luciorota <luc...@gm...> + * @version $Id$ + */ + +// Include xoops admin header +include "../../../include/cp_header.php"; + +include_once(XOOPS_ROOT_PATH."/kernel/module.php"); +include_once XOOPS_ROOT_PATH."/class/xoopstree.php"; +include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; +include_once XOOPS_ROOT_PATH."/class/tree.php"; +include_once XOOPS_ROOT_PATH."/class/xoopslists.php"; +include_once XOOPS_ROOT_PATH."/class/pagenav.php"; +include_once XOOPS_ROOT_PATH."/class/xoopsform/grouppermform.php"; + +// Include module functions +include_once("../include/functions.php"); + + + +$pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin'); +$globalLanguage = $GLOBALS['xoopsConfig']['language']; + +if ( file_exists($pathDir . '/language/' . $globalLanguage . '/main.php')){ + include_once $pathDir . '/language/' . $globalLanguage . '/main.php'; +} else { + include_once $pathDir . '/language/english/main.php'; +} + +if ( file_exists($pathDir . '/moduleadmin.php')){ + include_once $pathDir . '/moduleadmin.php'; + //return true; +} else { + xoops_cp_header(); + echo xoops_error(_AM_AJAXFM_NOFRAMEWORKS); + xoops_cp_footer(); + //return false; +} + +$dirname = basename(dirname(dirname( __FILE__ ) )); +$module_handler =& xoops_gethandler('module'); +$xoopsModule = & $module_handler->getByDirname($dirname); +$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); +$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); +$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); +$pathImageModule = XOOPS_URL . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/images'; + + + +$myts =& MyTextSanitizer::getInstance(); + +if ( $xoopsUser ) { + $xoopsModule = XoopsModule::getByDirname('ajaxfilemanager'); + if ( !$xoopsUser->isAdmin($GLOBALS['xoopsModule']->mid()) ) { + redirect_header(XOOPS_URL . '/', 3, _NOPERM); + exit(); + } +} else { + redirect_header(XOOPS_URL."/",3,_NOPERM); + exit(); +} + +if ( !isset($GLOBALS['xoopsTpl']) || !is_object($GLOBALS['xoopsTpl']) ) { + include_once $GLOBALS['xoops']->path( "/class/template.php" ); + $GLOBALS['xoopsTpl'] = new XoopsTpl(); +} + +// Include language file +xoops_loadLanguage('admin', 'system'); +xoops_loadLanguage('admin', $GLOBALS['xoopsModule']->getVar('dirname')); +xoops_loadLanguage('modinfo', $GLOBALS['xoopsModule']->getVar('dirname')); Deleted: XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/extensions.php =================================================================== --- XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/extensions.php 2012-08-01 18:58:48 UTC (rev 9973) +++ XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/extensions.php 2012-08-01 22:03:26 UTC (rev 9974) @@ -1,345 +0,0 @@ -<?php -/** - * Ajax File Manager - * - * 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 http://www.fsf.org/copyleft/gpl.html& ... public license - * @package ajaxfilemanager - * @since 0.1 - * @author luciorota <luc...@gm...> - * @version $Id$ - */ - -include 'admin_header.php'; -$currentFile = basename(__FILE__); - -// load classes -xoops_load('xoopsformloader'); -$errors = array(); -$output = ''; - -// Get user groups array -$groups = (is_object($xoopsUser)) ? $xoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS); -// $admin is true if user is an admin -$admin = (is_object($xoopsUser) && $xoopsUser->isAdmin($GLOBALS['xoopsModule']->mid())) ? true : false; - -// get/check parameters/post -if(isset($_POST['op'])) { - $op = $_POST['op']; -} else { - $op = 'default'; -} - - -if(isset($_POST['extension'])) { - $extension = $_POST['extension']; -} - - -switch( $op ) { -case 'dump_images_cache': - if (ajaxfilemanager_delDir(XOOPS_ROOT_PATH . '/uploads/ajaxfilemanager/imagecache', true)) { - if (ajaxfilemanager_makeDir(XOOPS_ROOT_PATH . '/uploads/ajaxfilemanager/imagecache')) { - redirect_header($currentFile, 3, _AM_AJAXFM_DUMP_IMAGES_CACHE_OK); - } else { - redirect_header($currentFile, 3, _AM_AJAXFM_DUMP_IMAGES_CACHE_NOT_OK); - } - } else { - redirect_header($currentFile, 3, _AM_AJAXFM_DUMP_IMAGES_CACHE_NOT_OK); - } - break; -case 'install_tinymce': - ajaxfilemanager_installCustomTinymceSettings(); - redirect_header($currentFile, 3, _AM_AJAXFM_EDITORPLUGIN_INSTALLED_OK); - break; -case 'uninstall_tinymce': - ajaxfilemanager_uninstallCustomTinymceSettings(); - redirect_header($currentFile, 3, _AM_AJAXFM_EDITORPLUGIN_UNINSTALLED_OK); - break; -case 'activate_extension': - ajaxfilemanager_activateExtension($extension); - redirect_header($currentFile, 3, _AM_AJAXFM_EXTENSION_ACTIVATED); - break; -case 'desactivate_extension': - ajaxfilemanager_desactivateExtension($extension); - redirect_header($currentFile, 3, _AM_AJAXFM_EXTENSION_DISABLED); - break; -case 'install_extension': - $source = XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname') . '/install/textsanitizer.extensions' . '/' . $extension; - $destination = XOOPS_ROOT_PATH . '/class/textsanitizer/' . $extension; - if(!file_exists($source)) { - redirect_header($currentFile, 3, _AM_AJAXFM_EXT_FILE_DONT_EXIST_SHORT); - break; - } - // Copy extension - if (!ajaxfilemanager_copyDir($source, $destination)) { - redirect_header($currentFile, 3, _AM_AJAXFM_EXT_FILE_NOT_INSTALLABLE); - } - // Activate extension - ajaxfilemanager_activateExtension($extension); - redirect_header($currentFile, 3, _AM_AJAXFM_EXTENSION_INSTALLED . '<br />' . $extension . ' ' . _AM_AJAXFM_EXTENSION_ACTIVATED); - break; -default: -case 'default': - // render start here - xoops_cp_header(); - - // check if estansions path is writable - $extensionsPath = XOOPS_ROOT_PATH . '/class/textsanitizer'; - if (!is_writable($extensionsPath) or !is_writable($extensionsPath . '/config.php')) { - echo '<p>' . sprintf(_AM_AJAXFM_EXTENSION_WARNING1, $extensionsPath, $extensionsPath) . '</p>'; - echo '<p>' . sprintf(_AM_AJAXFM_EXTENSION_WARNING2, $extensionsPath, $extensionsPath) . '</p>'; - } - - echo "<h3>" . _AM_AJAXFM_EXTENSIONS_MANAGER . "</h3>"; - - // Ajax File Manager extensions - echo "<fieldset>"; - echo "<legend style='font-weight:bold; color:#990000;'>" . _AM_AJAXFM_EXTRA_EXTENSION_INFO . '</legend>'; - $source = XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname') . '/install/textsanitizer.extensions'; - $extraExtensions = ajaxfilemanager_listExtensions($source); - - echo _AM_AJAXFM_EXTRA_EXTENSION_INFO_DESC; - echo "<table class='' style='width:50%;float:left;'>"; - echo "<tbody>"; - echo "<tr>"; - echo "<th>" . _AM_AJAXFM_EXTENSION . "</th>"; - echo "<th>" . _AM_AJAXFM_EXTENSION_STATUS . "</th>"; - echo "<th>" . _AM_AJAXFM_EXTENSION_ACTION . "</th>"; - echo "</tr>"; - $class = 0; - - foreach ($extraExtensions as $extension) { - $class++; - echo "<tr class='" . (($class&1)?'odd':'even') . "'>"; - echo "<td><h3>" . $extension . "</h3></td>"; - if(!ajaxfilemanager_extensionInstalled($extension)) { - echo "<td>"; - echo " <span style='color:red;'>" . _AM_AJAXFM_EXTENSION_NOT_INSTALLED . "</span>"; - echo "</td>"; - echo "<td>"; - echo " <form action='" . $currentFile . "' method='post'>"; - echo " <input type='hidden' name='op' value='install_extension' />"; - echo " <input type='hidden' name='extension' value='" . $extension . "' />"; - echo " <input class='formButton' value='" . _AM_AJAXFM_INSTALL_EXTENSION . "'' type='submit' />"; - echo " </form>"; - echo "</td>"; - } else { - if(!extensionActivated($extension)) { - echo "<td>"; - echo " <span style='color:green;'>" . _AM_AJAXFM_EXTENSION_INSTALLED_OK . "</span>"; - echo " <br />"; - echo " <span style='color:red;'>" . _AM_AJAXFM_EXTENSION_NOT_ACTIVATED . "</span>"; - echo "</td>"; - echo "<td>"; - echo " <form action='" . $currentFile . "' method='post'>"; - echo " <input type='hidden' name='op' value='activate_extension' />"; - echo " <input type='hidden' name='extension' value='" . $extension . "' />"; - echo " <input class='formButton' value='" . _AM_AJAXFM_ACTIVATE_EXTENSION . "'' type='submit' />"; - echo " </form>"; - echo "</td>"; - } else { - echo "<td>"; - echo " <span style='color:green;'>" . _AM_AJAXFM_EXTENSION_INSTALLED_OK . "</span>"; - echo " <br />"; - echo " <span style='color:green;'>" . _AM_AJAXFM_EXTENSION_ACTIVATED_OK . "</span>"; - echo "</td>"; - echo "<td>"; - echo " <form action='" . $currentFile . "' method='post'>"; - echo " <input type='hidden' name='op' value='desactivate_extension' />"; - echo " <input type='hidden' name='extension' value='" . $extension . "' />"; - echo " <input class='formButton' value='" . _AM_AJAXFM_DISABLE_EXTENSION . "' type='submit' />"; - echo "</form>"; - echo "</td>"; - } - } - echo "</tr>"; - } - echo "</tbody>"; - echo "</table>"; - echo "<div style='width:50%;float:left;'>"; - // Test dhtmltextarea - $editor_configs = array(); - $editor_configs['name'] = 'test_dhtmltextarea_extra'; - $editor_configs['value'] = _AM_AJAXFM_EDITORPLUGIN_TEST_DHTMLTEXTAREA; - $editor_configs['rows'] = 20; - $editor_configs['cols'] = 160; - $editor_configs['width'] = '100%'; - $editor_configs['height'] = '400px'; - $editor_configs['editor'] = 'dhtmltextarea'; - $dhtmltextarea = new XoopsFormEditor(_AM_AJAXFM_EDITORPLUGIN_TEST_DHTMLTEXTAREA, 'test_dhtmltextarea_extra', $editor_configs); - echo $dhtmltextarea->render(); - echo "</div>"; - echo "<div style='clear:both'></div>"; - echo "</fieldset>"; - - echo "<br />"; - - // Standard or extra Xoops extensions - echo "<fieldset>"; - echo "<legend style='font-weight:bold; color:#990000;'>" . _AM_AJAXFM_EXTENSION_INFO . "</legend>"; - $extensionsPath = XOOPS_ROOT_PATH . '/class/textsanitizer'; - $extensions = ajaxfilemanager_listExtensions($extensionsPath); - $extensions = array_diff($extensions, $extraExtensions); - - echo "<table class='' style='width:50%;float:left;'>"; - echo "<tbody>"; - echo "<tr>"; - echo "<th>" . _AM_AJAXFM_EXTENSION . "</th>"; - echo "<th>" . _AM_AJAXFM_EXTENSION_STATUS . "</th>"; - echo "<th>" . _AM_AJAXFM_EXTENSION_ACTION . "</th>"; - echo "</tr>"; - $class = 0; - foreach ($extensions as $extension) { - $class++; - echo "<tr class='" . (($class&1)?'odd':'even') . "'>"; - echo "<td><h3>" . $extension . "</h3></td>"; - if(!extensionActivated($extension)) { - echo "<td>"; - echo " <span style='color:green;'>" . _AM_AJAXFM_EXTENSION_INSTALLED_OK . "</span>"; - echo " <br />"; - echo " <span style='color:red;'>" . _AM_AJAXFM_EXTENSION_NOT_ACTIVATED . "</span>"; - echo "</td>"; - echo "<td>"; - echo " <form action='" . $currentFile . "' method='post'>"; - echo " <input type='hidden' name='op' value='activate_extension' />"; - echo " <input type='hidden' name='extension' value='" . $extension . "' />"; - echo " <input class='formButton' value='" . _AM_AJAXFM_ACTIVATE_EXTENSION . "'' type='submit' />"; - echo " </form>"; - echo "</td>"; - } else { - echo "<td>"; - echo " <span style='color:green;'>" . _AM_AJAXFM_EXTENSION_INSTALLED_OK . "</span>"; - echo " <br />"; - echo " <span style='color:green;'>" . _AM_AJAXFM_EXTENSION_ACTIVATED_OK . "</span>"; - echo "</td>"; - echo "<td>"; - echo " <form action='" . $currentFile . "' method='post'>"; - echo " <input type='hidden' name='op' value='desactivate_extension' />"; - echo " <input type='hidden' name='extension' value='" . $extension . "' />"; - echo " <input class='formButton' value='" . _AM_AJAXFM_DISABLE_EXTENSION . "' type='submit' />"; - echo "</form>"; - echo "</td>"; - } - echo "</tr>"; - } - echo "</tbody>"; - echo "</table>"; - echo "<div style='width:50%;float:left;'>"; - // Test dhtmltextarea - $editor_configs = array(); - $editor_configs['name'] = 'test_dhtmltextarea_standard'; - $editor_configs['value'] = _AM_AJAXFM_EDITORPLUGIN_TEST_DHTMLTEXTAREA; - $editor_configs['rows'] = 20; - $editor_configs['cols'] = 160; - $editor_configs['width'] = '100%'; - $editor_configs['height'] = '400px'; - $editor_configs['editor'] = 'dhtmltextarea'; - $dhtmltextarea = new XoopsFormEditor(_AM_AJAXFM_EDITORPLUGIN_TEST_DHTMLTEXTAREA, 'test_dhtmltextarea_standard', $editor_configs); - echo $dhtmltextarea->render(); - echo "</div>"; - echo "<div style='clear:both'></div>"; - echo "</fieldset>"; - - echo "<br />"; - - echo "<h3>" . _AM_AJAXFM_PLUGINS_MANAGER . "</h3>"; - - // Ajax File Manager editors plugins - echo "<fieldset>"; - echo "<legend style='font-weight:bold; color:#990000;'>" . _AM_AJAXFM_EDITORPLUGIN_INFO . "</legend>"; - echo "<table class=''>"; - echo "<tbody>"; - echo "<tr>"; - echo "<th>" . _AM_AJAXFM_EDITOR . "</th>"; - echo "<th>" . _AM_AJAXFM_EDITOR_STATUS . "</th>"; - echo "<th>" . _AM_AJAXFM_EDITOR_ACTION . "</th>"; - echo "</tr>"; - echo "<tr class='odd'>"; - echo "<td>"; - echo "<h3>" . _AM_AJAXFM_EDITORTINYMCE . "</h3>"; - $source = XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname') . '/install/tinymce.settings/tinymce.php'; - $destination = $GLOBALS['xoops']->path('var/configs/tinymce.php'); - echo sprintf(_AM_AJAXFM_EDITORTINYMCE_DESC, $source , $destination); - echo "</td>"; - if(!ajaxfilemanager_installedCustomTinymceSettings()) { - echo "<td>"; - echo " <span style='color:red;'>" . _AM_AJAXFM_EDITORPLUGIN_NOT_INSTALLED . "</span>"; - echo "</td>"; - echo "<td>"; - echo " <form action='" . $currentFile . "' method='post'>"; - echo " <input type='hidden' name='op' value='install_tinymce' />"; - echo " <input type='hidden' name='extension' value='" . $extension . "' />"; - echo " <input class='formButton' value='" . _AM_AJAXFM_INSTALL_EDITORPLUGIN . "'' type='submit' />"; - echo " </form>"; - echo "</td>"; - } else { - echo "<td>"; - echo " <span style='color:green;'>" . _AM_AJAXFM_EDITORPLUGIN_INSTALLED . "</span>"; - echo "</td>"; - echo "<td>"; - echo " <form action='" . $currentFile . "' method='post'>"; - echo " <input type='hidden' name='op' value='uninstall_tinymce' />"; - echo " <input type='hidden' name='extension' value='" . $extension . "' />"; - echo " <input class='formButton' value='" . _AM_AJAXFM_UNINSTALL_EDITORPLUGIN . "' type='submit' />"; - echo "</form>"; - echo "</td>"; - } - echo "</tr>"; - echo "</tbody>"; - echo "</table>"; - // Test tinymce - $editor_configs = array(); - $editor_configs['name'] = 'test_tinymce'; - $editor_configs['value'] = _AM_AJAXFM_EDITORPLUGIN_TEST_TINYMCE; - $editor_configs['rows'] = 20; - $editor_configs['cols'] = 160; - $editor_configs['width'] = '100%'; - $editor_configs['height'] = '400px'; - $editor_configs['editor'] = 'tinymce'; - $tinymce = new XoopsFormEditor(_AM_AJAXFM_EDITORPLUGIN_TEST_TINYMCE, 'test_tinymce', $editor_configs); - echo $tinymce->render(); - echo "</fieldset>"; - - echo "<br />"; - - echo "<h3>" . _AM_AJAXFM_EXTRA_MANAGER . "</h3>"; - - // Standard or enhanced image.php in xoops root path? - echo "<fieldset>"; - echo "<legend style='font-weight:bold; color:#990000;'>" . _AM_AJAXFM_IMAGE_PHP_INFO . "</legend>"; - $extensionsPath = XOOPS_ROOT_PATH . '/class/textsanitizer'; - - $originalImagePhp = XOOPS_ROOT_PATH . '/image.php'; - $enhancedImagePhp = XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname') . '/image.php'; - $crcOriginalImagePhp = strtoupper(dechex(crc32(file_get_contents($originalImagePhp)))); - $crcEnhancedImagePhp = strtoupper(dechex(crc32(file_get_contents($enhancedImagePhp)))); - - if ($crcOriginalImagePhp != $crcEnhancedImagePhp) { - // files not the same - echo _AM_AJAXFM_IMAGE_PHP_NO_SMART; - echo "<br />"; - echo _AM_AJAXFM_IMAGE_PHP_NO_SMART_DESC; - } else { - // files the same - echo _AM_AJAXFM_IMAGE_PHP_SMART; - echo "<br />"; - echo _AM_AJAXFM_IMAGE_PHP_SMART_DESC; - echo "<br />"; - echo "<form action='" . $currentFile . "' method='post'>"; - echo "<input type='hidden' name='op' value='dump_images_cache' />"; - echo "<input class='formButton' value='" . _AM_AJAXFM_DUMP_IMAGES_CACHE . "'' type='submit' />"; - echo "</form>"; - } - echo "</fieldset>"; - include "admin_footer.php"; - break; -} // switch ( $op ) -?> \ No newline at end of file Added: XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/extensions.php =================================================================== --- XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/extensions.php (rev 0) +++ XoopsModules/ajaxfilemanager/trunk/ajaxfilemanager/admin/extensions.php 2012-08-01 22:03:26 UTC (rev 9974) @@ -0,0 +1,341 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * AJAXFILEMANAGER - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * + * 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. See the + * GNU General Public License for more details. + * --------------------------------------------------------------------------- + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html& ... public license + * @package ajaxfilemanager + * @since 1.0 + * @author luciorota <luc...@gm...> + * @version $Id$ + */ + +include 'admin_header.php'; +$currentFile = basename(__FILE__); + +// load classes +xoops_load('xoopsformloader'); +$errors = array(); +$output = ''; + +// Get user groups array +$groups = (is_object($xoopsUser)) ? $xoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS); +// $admin is true if user is an admin +$admin = (is_object($xoopsUser) && $xoopsUser->isAdmin($GLOBALS['xoopsModule']->mid())) ? true : false; + +// get/check parameters/post +if(isset($_POST['op'])) { + $op = $_POST['op']; +} else { + $op = 'default'; +} + + +if(isset($_POST['extension'])) { + $extension = $_POST['extension']; +} + + +switch( $op ) { +case 'dump_images_cache': + if (ajaxfilemanager_delDir(XOOPS_ROOT_PATH . '/uploads/ajaxfilemanager/imagecache', true)) { + if (ajaxfilemanager_makeDir(XOOPS_ROOT_PATH . '/uploads/ajaxfilemanager/imagecache')) { + redirect_header($currentFile, 3, _AM_AJAXFM_DUMP_IMAGES_CACHE_OK); + } else { + redirect_header($currentFile, 3, _AM_AJAXFM_DUMP_IMAGES_CACHE_NOT_OK); + } + } else { + redirect_header($currentFile, 3, _AM_AJAXFM_DUMP_IMAGES_CACHE_NOT_OK); + } + break; +case 'install_tinymce': + ajaxfilemanager_installCustomTinymceSettings(); + redirect_header($currentFile, 3, _AM_AJAXFM_EDITORPLUGIN_INSTALLED_OK); + break; +case 'uninstall_tinymce': + ajaxfilemanager_uninstallCustomTinymceSettings(); + redirect_header($currentFile, 3, _AM_AJAXFM_EDITORPLUGIN_UNINSTALLED_OK); + break; +case 'activate_extension': + ajaxfilemanager_activateExtension($extension); + redirect_header($currentFile, 3, _AM_AJAXFM_EXTENSION_ACTIVATED); + break; +case 'desactivate_extension': + ajaxfilemanager_desactivateExtension($extension); + redirect_header($currentFile, 3, _AM_AJAXFM_EXTENSION_DISABLED); + break; +case 'install_extension': + $source = XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname') . '/install/textsanitizer.extensions' . '/' . $extension; + $destination = XOOPS_ROOT_PATH . '/class/textsanitizer/' . $extension; + if(!file_exists($source)) { + redirect_header($currentFile, 3, _AM_AJAXFM_EXT_FILE_DONT_EXIST_SHORT); + break; + } + // Copy extension + if (!ajaxfilemanager_copyDir($source, $destination)) { + redirect_header($currentFile, 3, _AM_AJAXFM_EXT_FILE_NOT_INSTALLABLE); + } + // Activate extension + ajaxfilemanager_activateExtension($extension); + redirect_header($currentFile, 3, _AM_AJAXFM_EXTENSION_INSTALLED . '<br />' . $extension . ' ' . _AM_AJAXFM_EXTENSION_ACTIVATED); + break; +default: +case 'default': + // render start here + xoops_cp_header(); + + // check if estansions path is writable + $extensionsPath = XOOPS_ROOT_PATH . '/class/textsanitizer'; + if (!is_writable($extensionsPath) or !is_writable($extensionsPath . '/config.php')) { + echo '<p>' . sprintf(_AM_AJAXFM_EXTENSION_WARNING1, $extensionsPath, $extensionsPath) . '</p>'; + echo '<p>' . sprintf(_AM_AJAXFM_EXTENSION_WARNING2, $extensionsPath, $extensionsPath) . '</p>'; + } + // + // Ajax File Manager extensions + // + echo "<h3>" . _AM_AJAXFM_EXTENSIONS_MANAGER . "</h3>"; + echo "<div style='width:50%;float:right;'>"; + // Test dhtmltextarea + $editor_configs = array(); + $editor_configs['name'] = 'test_dhtmltextarea_standard'; + $editor_configs['value'] = _AM_AJAXFM_EDITORPLUGIN_TEST_DHTMLTEXTAREA; + $editor_configs['rows'] = 20; + $editor_configs['cols'] = 160; + $editor_configs['width'] = '100%'; + $editor_configs['height'] = '400px'; + $editor_configs['editor'] = 'dhtmltextarea'; + $dhtmltextarea = new XoopsFormEditor(_AM_AJAXFM_EDITORPLUGIN_TEST_DHTMLTEXTAREA, 'test_dhtmltextarea_standard', $editor_configs); + echo $dhtmltextarea->render(); + echo "</div>"; + // + echo "<div style='width:50%;'>"; + echo "<fieldset>"; + echo "<legend style='font-weight:bold; color:#990000;'>" . _AM_AJAXFM_EXTRA_EXTENSION_INFO . '</legend>'; + $source = XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname') . '/install/textsanitizer.extensions'; + $extraExtensions = ajaxfilemanager_listExtensions($source); + echo _AM_AJAXFM_EXTRA_EXTENSION_INFO_DESC; + echo "<table class=''>"; + echo "<tbody>"; + echo "<tr>"; + echo "<th>" . _AM_AJAXFM_EXTENSION . "</th>"; + echo "<th>" . _AM_AJAXFM_EXTENSION_STATUS . "</th>"; + echo "<th>" . _AM_AJAXFM_EXTENSION_ACTION . "</th>"; + echo "</tr>"; + $class = 0; + foreach ($extraExtensions as $extension) { + $class++; + echo "<tr class='" . (($class&1)?'odd':'even') . "'>"; + echo "<td><h3>" . $extension . "</h3></td>"; + if(!ajaxfilemanager_extensionInstalled($extension)) { + echo "<td>"; + echo " <span style='color:red;'>" . _AM_AJAXFM_EXTENSION_NOT_INSTALLED . "</span>"; + echo "</td>"; + echo "<td>"; + echo " <form action='" . $currentFile . "' method='post'>"; + echo " <input type='hidden' name='op' value='install_extension' />"; + echo " <input type='hidden' name='extension' value='" . $extension . "' />"; + echo " <input class='formButton' value='" . _AM_AJAXFM_INSTALL_EXTENSION . "'' type='submit' />"; + echo " </form>"; + echo "</td>"; + } else { + if(!extensionActivated($extension)) { + echo "<td>"; + echo " <span style='color:green;'>" . _AM_AJAXFM_EXTENSION_INSTALLED_OK . "</span>"; + echo " <br />"; + echo " <span style='color:red;'>" . _AM_AJAXFM_EXTENSION_NOT_ACTIVATED . "</span>"; + echo "</td>"; + echo "<td>"; + echo " <form action='" . $currentFile . "' method='post'>"; + echo " <input type='hidden' name='op' value='activate_extension' />"; + echo " <input type='hidden' name='extension' value='" . $extension . "' />"; + echo " <input class='formButton' value='" . _AM_AJAXFM_ACTIVATE_EXTENSION . "'' type='submit' />"; + echo " </form>"; + echo "</td>"; + } else { + echo "<td>"; + echo " <span style='color:green;'>" . _AM_AJAXFM_EXTENSION_INSTALLED_OK . "</span>"; + echo " <br />"; + echo " <span style='color:green;'>" . _AM_AJAXFM_EXTENSION_ACTIVATED_OK . "</span>"; + echo "</td>"; + echo "<td>"; + echo " <form action='" . $currentFile . "' method='post'>"; + echo " <input type='hidden' name='op' value='desactivate_extension' />"; + echo " <input type='hidden' name='extension' value='" . $extension . "' />"; + echo " <input class='formButton' value='" . _AM_AJAXFM_DISABLE_EXTENSION . "' type='submit' />"; + echo "</form>"; + echo "</td>"; + } + } + echo "</tr>"; + } + echo "</tbody>"; + echo "</table>"; + echo "</fieldset>"; + echo "<br />"; + // Standard or extra Xoops extensions + echo "<fieldset>"; + echo "<legend style='font-weight:bold; color:#990000;'>" . _AM_AJAXFM_EXTENSION_INFO . "</legend>"; + $extensionsPath = XOOPS_ROOT_PATH . '/class/textsanitizer'; + $extensions = ajaxfilemanager_listExtensions($extensionsPath); + $extensions = array_diff($extensions, $extraExtensions); + echo "<table class=''>"; + echo "<tbody>"; + echo "<tr>"; + echo "<th>" . _AM_AJAXFM_EXTENSION . "</th>"; + echo "<th>" . _AM_AJAXFM_EXTENSION_STATUS . "</th>"; + echo "<th>" . _AM_AJAXFM_EXTENSION_ACTION . "</th>"; + echo "</tr>"; + $class = 0; + foreach ($extensions as $extension) { + $class++; + echo "<tr class='" . (($class&1)?'odd':'even') . "'>"; + echo "<td><h3>" . $extension . "</h3></td>"; + if(!extensionActivated($extension)) { + echo "<td>"; + echo " <span style='color:green;'>" . _AM_AJAXFM_EXTENSION_INSTALLED_OK . "</span>"; + echo " <br />"; + echo " <span style='color:red;'>" . _AM_AJAXFM_EXTENSION_NOT_ACTIVATED . "</span>"; + echo "</td>"; + echo "<td>"; + echo " <form action='" . $currentFile . "' method='post'>"; + echo " <input type='hidden' name='op' value='activate_extension' />"; + echo " <input type='hidden' name='extension' value='" . $extension . "' />"; + echo " <input class='formButton' value='" . _AM_AJAXFM_ACTIVATE_EXTENSION . "'' type='submit' />"; + echo " </form>"; + echo "</td>"; + } else { + echo "<td>"; + ... [truncated message content] |
From: <be...@us...> - 2012-08-01 18:58:57
|
Revision: 9973 http://xoops.svn.sourceforge.net/xoops/?rev=9973&view=rev Author: beckmi Date: 2012-08-01 18:58:48 +0000 (Wed, 01 Aug 2012) Log Message: ----------- More changes from Irmtfan (http://xoops.org/modules/newbb/viewtopic.php?post_id=348253#forumpost348253) Modified Paths: -------------- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev9883.txt XoopsModules/newbb/branches/irmtfan/newbb/class/user.php XoopsModules/newbb/branches/irmtfan/newbb/docs/changelog.txt XoopsModules/newbb/branches/irmtfan/newbb/header.php XoopsModules/newbb/branches/irmtfan/newbb/include/plugin.php XoopsModules/newbb/branches/irmtfan/newbb/language/persian/admin.php XoopsModules/newbb/branches/irmtfan/newbb/language/persian/main.php XoopsModules/newbb/branches/irmtfan/newbb/language/persian/modinfo.php XoopsModules/newbb/branches/irmtfan/newbb/polls.php XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_index.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_thread.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_viewall.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_viewforum.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_viewpost.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_viewtopic.html XoopsModules/newbb/branches/irmtfan/newbb/xoops_version.php Added Paths: ----------- XoopsModules/newbb/branches/irmtfan/newbb/templates/images/language/english/style.css XoopsModules/newbb/branches/irmtfan/newbb/templates/images/language/persian/style.css Removed Paths: ------------- XoopsModules/newbb/branches/irmtfan/newbb/templates/style.css Modified: XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev9883.txt =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev9883.txt 2012-08-01 03:11:30 UTC (rev 9972) +++ XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev9883.txt 2012-08-01 18:58:48 UTC (rev 9973) @@ -1,7 +1,27 @@ Changelog from rev.9883 +date: 2012-08-01 +================================================ +1- localization: input date localized (for other date systems like hegira) by replacing strtotime by XoopsLocal::strtotime +in newbb/polls.php + +2- customization&localization: newbb style.css is fully localized and customized and is not hard-coded anymore. +in newbb/header.php +file changes: +-- deleted newbb/templates/style.css +-- added newbb/templates/images/language/english/style.css +-- added newbb/templates/images/language/persian/style.css +priorities: +if exist in themes/YOUR_THEME/modules/newbb/images/language/YOUR_LANG/style.css take it +else if exist in themes/default/modules/newbb/images/language/YOUR_LANG/style.css take it +else if exist in modules/newbb/templates/images/language/YOUR_LANG/style.css take it +else if exist in modules/newbb/templates/images/language/english/style.css take it +else if exist in modules/newbb/templates/style.css take it (for backward compatibility) + +3- many hardcodes in newbb/templates and style.css has been removed + date: 2012-07-30 ================================================ -1- bug fix: edit not record when the reason is not filled (irmtfan) +1- bug fix: edit not displayed when the reason is not filled (irmtfan) 2- bug fix: only the last edit is recorded. (irmtfan/alfred) in newbb/class/post.php 3- bug fix: 'noapprove' permission incorrectly recorded in database. (irmtfan) @@ -12,5 +32,5 @@ in newbb/xoops_version.php 6- hardcode: some style.css color hardcodes has been removed. (irmtfan) in newbb/templates/style.css -7- feature added: text links instead of buttons. (deka98/irmtfan) -in newbb/class/icon.php , newbb/include/functions.render.php , newbb/include/plugin.php +7- feature added: text links instead of buttons. (deka87/irmtfan) +in newbb/class/icon.php , newbb/include/functions.render.php , newbb/include/plugin.php \ No newline at end of file Modified: XoopsModules/newbb/branches/irmtfan/newbb/class/user.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/class/user.php 2012-08-01 03:11:30 UTC (rev 9972) +++ XoopsModules/newbb/branches/irmtfan/newbb/class/user.php 2012-08-01 18:58:48 UTC (rev 9973) @@ -1,298 +1,318 @@ -<?php -/** - * CBB 4.0, or newbb, the forum module for XOOPS project - * - * @copyright The XOOPS Project http://xoops.sf.net - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @author Taiwen Jiang (phppp or D.J.) <ph...@us...> - * @since 4.00 - * @version $Id $ - * @package module::newbb - */ - -if (!defined("XOOPS_ROOT_PATH")) { - exit(); -} - -defined("NEWBB_FUNCTIONS_INI") || include XOOPS_ROOT_PATH.'/modules/newbb/include/functions.ini.php'; - -function newbb_calculateLevel($RPG, $RPGDIFF) -{ - - //$RPG = $user->getVar('posts'); - //$RPGDIFF = $user->getVar('user_regdate'); - - $today = time(); - $diff = $today - $RPGDIFF; - $exp = round($diff / 86400,0); - if ($exp <= 0) { $exp = 1; } - $ppd= round($RPG / $exp, 0); - $level = pow (log10 ($RPG), 3); - $ep = floor (100 * ($level - floor ($level))); - $showlevel = floor ($level + 1); - $hpmulti =round ($ppd / 6, 1); - if ($hpmulti > 1.5) { $hpmulti = 1.5; } - if ($hpmulti < 1) { $hpmulti = 1; } - $maxhp = $level * 25 * $hpmulti; - $hp= $ppd / 5; - if ($hp >= 1) { - $hp= $maxhp; - } else { - $hp= floor ($hp * $maxhp); - } - $hp= floor ($hp); - $maxhp= floor ($maxhp); - if ($maxhp <= 0) { - $zhp = 1; - } else { - $zhp = $maxhp; - } - $hpf= floor (100 * ($hp / $zhp)) - 1; - $maxmp= ($exp * $level) / 5; - $mp= $RPG / 3; - if ($mp >= $maxmp) { $mp = $maxmp; } - $maxmp = floor ($maxmp); - $mp = floor ($mp); - if ($maxmp <= 0) { - $zmp = 1; - } else { - $zmp = $maxmp; - } - $mpf= floor (100 * ($mp / $zmp)) - 1; - if ( $hpf >= 98 ) { $hpf = $hpf - 2; } - if ( $ep >= 98 ) { $ep = $ep - 2; } - if ( $mpf >= 98 ) { $mpf = $mpf - 2; } - - $level = array(); - $level['level'] = $showlevel ; - $level['exp'] = $ep; - $level['exp_width'] = $ep.'%'; - $level['hp'] = $hp; - $level['hp_max'] = $maxhp; - $level['hp_width'] = $hpf.'%'; - $level['mp'] = $mp; - $level['mp_max'] = $maxmp; - $level['mp_width'] = $mpf.'%'; - - return $level; -} - -class newbbUser { - var $user = null; - - function User() - { - } - - function getUserbar() - { - global $xoopsModuleConfig, $xoopsUser, $isadmin; - - $userbar = array(); - if (empty($xoopsModuleConfig['userbar_enabled'])) return $userbar; - - $user = $this->user; - $userbar["profile"] = array("link" => XOOPS_URL . "/userinfo.php?uid=" . $user->getVar("uid"), "name" => _PROFILE); - - if (is_object($xoopsUser)) { - $userbar["pm"] = array("link" => "javascript:void openWithSelfMain('" . XOOPS_URL . "/pmlite.php?send2=1&to_userid=" . $user->getVar("uid") . "', 'pmlite', 450, 380);", "name" => _MD_PM); - } - if ($user->getVar('user_viewemail') || $isadmin) { - $userbar["email"] = array("link" => "javascript:void window.open('mailto:" . $user->getVar('email') . "', 'new');", "name" => _MD_EMAIL); - } - if ($url = $user->getVar('url')) { - $userbar["url"] = array("link" => "javascript:void window.open('" . $url . "', 'new');", "name" => _MD_WWW); - } - if ($icq = $user->getVar('user_icq')) { - $userbar["icq"] = array("link" => "javascript:void window.open('http://wwp.icq.com/scripts/search.dll?to=" . $icq."', 'new');", "name" => _MD_ICQ); - } - if ($aim = $user->getVar('user_aim')) { - $userbar["aim"]= array("link" => "javascript:void window.open('aim:goim?screenname=" . $aim . "&message=Hi+" . $aim . "+Are+you+there?" . "', 'new');", "name" => _MD_AIM); - } - if ($yim = $user->getVar('user_yim')) { - $userbar["yim"] = array("link" => "javascript:void window.open('http://edit.yahoo.com/config/send_webmesg?.target=" . $yim . "&.src=pg" . "', 'new');", "name" => _MD_YIM); - } - if ($msn = $user->getVar('user_msnm')) { - $userbar["msnm"] = array("link" => "javascript:void window.open('http://members.msn.com?mem=" . $msn . "', 'new');", "name" => _MD_MSNM); - } - - return $userbar; - } - - function getLevel() - { - global $xoopsModuleConfig, $forumUrl; - - $level = newbb_calculateLevel($this->user->getVar("posts"), $this->user->getVar("user_regdate")); - $info=''; - if ($xoopsModuleConfig['user_level'] == 2) { - static $rpg_images; - if (!isset($rpg_images)) { - $icon_handler = newbb_getIconHandler(); - $rpg_path = $icon_handler->getPath("rpg"); - foreach (array("img_left", "img_backing", "img_right", "blue", "green", "orange") as $img) { - $rpg_images[$img] = XOOPS_URL . '/' . $rpg_path . '/'.$img.'.gif'; - } - } - $table = "<table class='userlevel'><tr><td class='end'><img src='" . $rpg_images['img_left'] . "' alt='' /></td><td class='center' background='" . $rpg_images['img_backing'] . "'><img src='%s' width='%d' alt='' align='left' /></td><td><img src='" . $rpg_images['img_right'] . "' alt='' /></td></tr></table>"; - - $info = _MD_LEVEL . " " . $level['level'] . "<br />" . _MD_HP . " " . $level['hp'] . " / " . $level['hp_max'] . "<br />". - sprintf($table, $rpg_images["orange"], $level['hp_width']); - $info .= _MD_MP . " " . $level['mp'] . " / " . $level['mp_max'] . "<br />". - sprintf($table, $rpg_images["green"], $level['mp_width']); - $info .= _MD_EXP . " " . $level['exp'] . "<br />". - sprintf($table, $rpg_images["blue"], $level['exp_width']); - } else { - $info = _MD_LEVEL . " " . $level['level'] . "; ". _MD_EXP . " " . $level['exp'] . "<br />"; - $info .= _MD_HP . " " . $level['hp'] . " / " . $level['hp_max'] . "<br />"; - $info .= _MD_MP . " " . $level['mp'] . " / " . $level['mp_max']; - } - return $info; - } - - function getInfo(&$user) - { - global $xoopsModuleConfig, $myts; - static $name_anonymous; - - if ( !(is_object($user)) || !($user->isActive()) ) { - if (!isset($name_anonymous)) { - $name_anonymous = $myts->HtmlSpecialChars($GLOBALS["xoopsConfig"]['anonymous']); - } - return array("name" => $name_anonymous, "link" => $name_anonymous); - } - - $this->user = $user; - - $userinfo["uid"] = $user->getVar("uid"); - - $name = empty($xoopsModuleConfig['show_realname']) ? $user->getVar('uname') : $user->getVar('name'); - $userinfo["name"] = $name ? $name : $user->getVar('uname'); - - $userinfo["link"] = "<a href=\"".XOOPS_URL . "/userinfo.php?uid=" . $user->getVar("uid") ."\">".$userinfo["name"]."</a>"; - - $userinfo["avatar"] = $user->getVar('user_avatar'); -// START hacked by irmtfan - easier rank getting - $userrank = $user->rank(); - if (isset($userrank['image']) && $userrank['image']) { - $userinfo["rank_image"] = $userrank['image']; - $userinfo["rank_title"] = $userrank['title']; - } -// END hacked by irmtfan - easier rank getting - - $userinfo["from"] = $user->getVar('user_from'); - - mod_loadFunctions("time", "newbb"); - $userinfo["regdate"] = newbb_formatTimestamp($user->getVar('user_regdate'), 'reg'); - - $userinfo["posts"] = $user->getVar('posts'); - - if (!empty($xoopsModuleConfig['user_level'])) { - $userinfo["level"] = $this->getLevel(); - } - - if (!empty($xoopsModuleConfig['userbar_enabled'])) { - $userinfo["userbar"] = $this->getUserbar(); - } - - $userinfo["signature"] = $user->getVar('user_sig'); - return $userinfo; - } -} - -class NewbbUserHandler -{ - var $enableGroup; - var $enableOnline; - var $userlist = array(); - var $users = array(); - //var $online = array(); - - function NewbbUserHandler($enableGroup = true, $enableOnline = true) - { - $this->enableGroup = $enableGroup; - $this->enableOnline = $enableOnline; - } - - function loadUserInfo() - { - @include_once XOOPS_ROOT_PATH."/modules/".$GLOBALS["xoopsModule"]->getVar("dirname", "n")."/language/".$GLOBALS["xoopsConfig"]["language"]."/user.php"; - if (class_exists("User_language")) { - $handler = new User_language(); - } else { - $handler = new newbbUser(); - } - foreach (array_keys($this->users) as $uid) { - $this->userlist[$uid] = $handler->getInfo($this->users[$uid]); - } - } - - function loadUserOnline() - { - if (empty($this->users) || !$this->enableOnline) return; - mod_loadFunctions("render", "newbb"); - $image_online = newbb_displayImage('online', _MD_ONLINE); - $image_offline = newbb_displayImage('offline',_MD_OFFLINE); - - $online_handler =& xoops_getmodulehandler('online', 'newbb'); - $onlines = $online_handler->checkStatus(array_keys($this->users)); - - foreach (array_keys($this->users) as $uid) { - $this->userlist[$uid]["status"] = empty($onlines[$uid]) ? $image_offline : $image_online; - } - } - - function loadUserGroups() - { - GLOBAL $xoopsDB; - - if (empty($this->users) || !$this->enableGroup) return; - - $groups = array(); - $member_handler =& xoops_gethandler('member'); - $groups_obj = $member_handler->getGroups(); - $count = count($groups_obj); - for ($i = 0; $i < $count; $i++) { - $groups[$groups_obj[$i]->getVar('groupid')] = $groups_obj[$i]->getVar('name'); - } - unset($groups_obj); - - $sql = 'SELECT groupid, uid FROM ' . $xoopsDB->prefix('groups_users_link') . " WHERE uid IN( " . implode(", ", array_keys($this->users)) . ")"; - $result = $xoopsDB->query($sql); - while ($myrow = $xoopsDB->fetchArray($result)) { - $this->userlist[$myrow['uid']]["groups"][] = $groups[$myrow['groupid']]; - } - } - - function loadUserDigest() - { - GLOBAL $xoopsDB; - - if (empty($this->users)) return; - - $sql = 'SELECT user_digests, uid FROM ' . $xoopsDB->prefix('bb_user_stats') . " WHERE uid IN( " . implode(", ", array_keys($this->users)) . ")"; - $result = $xoopsDB->query($sql); - while ($myrow = $xoopsDB->fetchArray($result)) { - $this->userlist[$myrow['uid']]["digests"] = intval( $myrow['user_digests'] ); - } - } -// START irmtfan remove function -// function loadUserRank() -// { -// return true; -// } -// END irmtfan remove function - - function getUsers() - { - $this->loadUserInfo(); - $this->loadUserOnline(); - $this->loadUserGroups(); - // irmtfan removed $this->loadUserRank(); - $this->loadUserDigest(); - - return $this->userlist; - } -} - +<?php +/** + * CBB 4.0, or newbb, the forum module for XOOPS project + * + * @copyright The XOOPS Project http://xoops.sf.net + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Taiwen Jiang (phppp or D.J.) <ph...@us...> + * @since 4.00 + * @version $Id $ + * @package module::newbb + */ + +if (!defined("XOOPS_ROOT_PATH")) { + exit(); +} + +defined("NEWBB_FUNCTIONS_INI") || include XOOPS_ROOT_PATH.'/modules/newbb/include/functions.ini.php'; + +function newbb_calculateLevel($RPG, $RPGDIFF) +{ + + //$RPG = $user->getVar('posts'); + //$RPGDIFF = $user->getVar('user_regdate'); + + $today = time(); + $diff = $today - $RPGDIFF; + $exp = round($diff / 86400,0); + if ($exp <= 0) { $exp = 1; } + $ppd= round($RPG / $exp, 0); + $level = pow (log10 ($RPG), 3); + $ep = floor (100 * ($level - floor ($level))); + $showlevel = floor ($level + 1); + $hpmulti =round ($ppd / 6, 1); + if ($hpmulti > 1.5) { $hpmulti = 1.5; } + if ($hpmulti < 1) { $hpmulti = 1; } + $maxhp = $level * 25 * $hpmulti; + $hp= $ppd / 5; + if ($hp >= 1) { + $hp= $maxhp; + } else { + $hp= floor ($hp * $maxhp); + } + $hp= floor ($hp); + $maxhp= floor ($maxhp); + if ($maxhp <= 0) { + $zhp = 1; + } else { + $zhp = $maxhp; + } + $hpf= floor (100 * ($hp / $zhp)) - 1; + $maxmp= ($exp * $level) / 5; + $mp= $RPG / 3; + if ($mp >= $maxmp) { $mp = $maxmp; } + $maxmp = floor ($maxmp); + $mp = floor ($mp); + if ($maxmp <= 0) { + $zmp = 1; + } else { + $zmp = $maxmp; + } + $mpf= floor (100 * ($mp / $zmp)) - 1; + if ( $hpf >= 98 ) { $hpf = $hpf - 2; } + if ( $ep >= 98 ) { $ep = $ep - 2; } + if ( $mpf >= 98 ) { $mpf = $mpf - 2; } + + $level = array(); + $level['level'] = $showlevel ; + $level['exp'] = $ep; + $level['exp_width'] = $ep.'%'; + $level['hp'] = $hp; + $level['hp_max'] = $maxhp; + $level['hp_width'] = $hpf.'%'; + $level['mp'] = $mp; + $level['mp_max'] = $maxmp; + $level['mp_width'] = $mpf.'%'; + + return $level; +} + +class newbbUser { + var $user = null; + + function User() + { + } + + function getUserbar() + { + global $xoopsModuleConfig, $xoopsUser, $isadmin; + + $userbar = array(); + if (empty($xoopsModuleConfig['userbar_enabled'])) return $userbar; + + $user = $this->user; + $userbar["profile"] = array("link" => XOOPS_URL . "/userinfo.php?uid=" . $user->getVar("uid"), "name" => _PROFILE); + + if (is_object($xoopsUser)) { + $userbar["pm"] = array("link" => "javascript:void openWithSelfMain('" . XOOPS_URL . "/pmlite.php?send2=1&to_userid=" . $user->getVar("uid") . "', 'pmlite', 450, 380);", "name" => _MD_PM); + } + if ($user->getVar('user_viewemail') || $isadmin) { + $userbar["email"] = array("link" => "javascript:void window.open('mailto:" . $user->getVar('email') . "', 'new');", "name" => _MD_EMAIL); + } + if ($url = $user->getVar('url')) { + $userbar["url"] = array("link" => "javascript:void window.open('" . $url . "', 'new');", "name" => _MD_WWW); + } + if ($icq = $user->getVar('user_icq')) { + $userbar["icq"] = array("link" => "javascript:void window.open('http://wwp.icq.com/scripts/search.dll?to=" . $icq."', 'new');", "name" => _MD_ICQ); + } + if ($aim = $user->getVar('user_aim')) { + $userbar["aim"]= array("link" => "javascript:void window.open('aim:goim?screenname=" . $aim . "&message=Hi+" . $aim . "+Are+you+there?" . "', 'new');", "name" => _MD_AIM); + } + if ($yim = $user->getVar('user_yim')) { + $userbar["yim"] = array("link" => "javascript:void window.open('http://edit.yahoo.com/config/send_webmesg?.target=" . $yim . "&.src=pg" . "', 'new');", "name" => _MD_YIM); + } + if ($msn = $user->getVar('user_msnm')) { + $userbar["msnm"] = array("link" => "javascript:void window.open('http://members.msn.com?mem=" . $msn . "', 'new');", "name" => _MD_MSNM); + } + + return $userbar; + } + + function getLevel() + { + global $xoopsModuleConfig, $forumUrl; + + $level = newbb_calculateLevel($this->user->getVar("posts"), $this->user->getVar("user_regdate")); + $info=''; + if ($xoopsModuleConfig['user_level'] == 2) { + static $rpg_images; + if (!isset($rpg_images)) { + $icon_handler = newbb_getIconHandler(); + $rpg_path = $icon_handler->getPath("rpg"); + foreach (array("img_left", "img_backing", "img_right", "blue", "green", "orange") as $img) { + $rpg_images[$img] = XOOPS_URL . '/' . $rpg_path . '/'.$img.'.gif'; + } + } + $table = "<table class='userlevel'><tr><td class='end'><img src='" . $rpg_images['img_left'] . "' alt='' /></td><td class='center' background='" . $rpg_images['img_backing'] . "'><img src='%s' width='%d' alt='' align='left' /></td><td><img src='" . $rpg_images['img_right'] . "' alt='' /></td></tr></table>"; + + $info = _MD_LEVEL . " " . $level['level'] . "<br />" . _MD_HP . " " . $level['hp'] . " / " . $level['hp_max'] . "<br />". + sprintf($table, $rpg_images["orange"], $level['hp_width']); + $info .= _MD_MP . " " . $level['mp'] . " / " . $level['mp_max'] . "<br />". + sprintf($table, $rpg_images["green"], $level['mp_width']); + $info .= _MD_EXP . " " . $level['exp'] . "<br />". + sprintf($table, $rpg_images["blue"], $level['exp_width']); + } else { + $info = _MD_LEVEL . " " . $level['level'] . "; ". _MD_EXP . " " . $level['exp'] . "<br />"; + $info .= _MD_HP . " " . $level['hp'] . " / " . $level['hp_max'] . "<br />"; + $info .= _MD_MP . " " . $level['mp'] . " / " . $level['mp_max']; + } + return $info; + } + + function getInfo(&$user) + { + global $xoopsModuleConfig, $myts; + static $name_anonymous; + + if ( !(is_object($user)) || !($user->isActive()) ) { + if (!isset($name_anonymous)) { + $name_anonymous = $myts->HtmlSpecialChars($GLOBALS["xoopsConfig"]['anonymous']); + } + return array("name" => $name_anonymous, "link" => $name_anonymous); + } + + $this->user = $user; + + $userinfo["uid"] = $user->getVar("uid"); + + $name = empty($xoopsModuleConfig['show_realname']) ? $user->getVar('uname') : $user->getVar('name'); + $userinfo["name"] = $name ? $name : $user->getVar('uname'); + + $userinfo["link"] = "<a href=\"".XOOPS_URL . "/userinfo.php?uid=" . $user->getVar("uid") ."\">".$userinfo["name"]."</a>"; + + $userinfo["avatar"] = $user->getVar('user_avatar'); + + $userinfo["from"] = $user->getVar('user_from'); + + mod_loadFunctions("time", "newbb"); + $userinfo["regdate"] = newbb_formatTimestamp($user->getVar('user_regdate'), 'reg'); + + $userinfo["posts"] = $user->getVar('posts'); + + if (!empty($xoopsModuleConfig['user_level'])) { + $userinfo["level"] = $this->getLevel(); + } + + if (!empty($xoopsModuleConfig['userbar_enabled'])) { + $userinfo["userbar"] = $this->getUserbar(); + } + + $userinfo["signature"] = $user->getVar('user_sig'); + return $userinfo; + } +} + +class NewbbUserHandler +{ + var $enableGroup; + var $enableOnline; + var $userlist = array(); + var $users = array(); + //var $online = array(); + + function NewbbUserHandler($enableGroup = true, $enableOnline = true) + { + $this->enableGroup = $enableGroup; + $this->enableOnline = $enableOnline; + } + + function loadUserInfo() + { + @include_once XOOPS_ROOT_PATH."/modules/".$GLOBALS["xoopsModule"]->getVar("dirname", "n")."/language/".$GLOBALS["xoopsConfig"]["language"]."/user.php"; + if (class_exists("User_language")) { + $handler = new User_language(); + } else { + $handler = new newbbUser(); + } + foreach (array_keys($this->users) as $uid) { + $this->userlist[$uid] = $handler->getInfo($this->users[$uid]); + } + } + + function loadUserOnline() + { + if (empty($this->users) || !$this->enableOnline) return; + mod_loadFunctions("render", "newbb"); + $image_online = newbb_displayImage('online', _MD_ONLINE); + $image_offline = newbb_displayImage('offline',_MD_OFFLINE); + + $online_handler =& xoops_getmodulehandler('online', 'newbb'); + $onlines = $online_handler->checkStatus(array_keys($this->users)); + + foreach (array_keys($this->users) as $uid) { + $this->userlist[$uid]["status"] = empty($onlines[$uid]) ? $image_offline : $image_online; + } + } + + function loadUserGroups() + { + GLOBAL $xoopsDB; + + if (empty($this->users) || !$this->enableGroup) return; + + $groups = array(); + $member_handler =& xoops_gethandler('member'); + $groups_obj = $member_handler->getGroups(); + $count = count($groups_obj); + for ($i = 0; $i < $count; $i++) { + $groups[$groups_obj[$i]->getVar('groupid')] = $groups_obj[$i]->getVar('name'); + } + unset($groups_obj); + + $sql = 'SELECT groupid, uid FROM ' . $xoopsDB->prefix('groups_users_link') . " WHERE uid IN( " . implode(", ", array_keys($this->users)) . ")"; + $result = $xoopsDB->query($sql); + while ($myrow = $xoopsDB->fetchArray($result)) { + $this->userlist[$myrow['uid']]["groups"][] = $groups[$myrow['groupid']]; + } + } + + function loadUserDigest() + { + GLOBAL $xoopsDB; + + if (empty($this->users)) return; + + $sql = 'SELECT user_digests, uid FROM ' . $xoopsDB->prefix('bb_user_stats') . " WHERE uid IN( " . implode(", ", array_keys($this->users)) . ")"; + $result = $xoopsDB->query($sql); + while ($myrow = $xoopsDB->fetchArray($result)) { + $this->userlist[$myrow['uid']]["digests"] = intval( $myrow['user_digests'] ); + } + } + + function loadUserRank() + { + GLOBAL $xoopsDB; + + if (empty($this->users)) return; + $myts =& MyTextSanitizer::getInstance(); + + $sql = 'SELECT * FROM ' . $xoopsDB->prefix('ranks'); + $result = $xoopsDB->query($sql); + while ($myrow = $xoopsDB->fetchArray($result)) { + $ranks[$myrow['rank_id']] = $myrow; + $ranks[$myrow['rank_id']]["rank_title"] = $myts->htmlspecialchars($ranks[$myrow['rank_id']]["rank_title"]); + if (!empty($ranks[$myrow['rank_id']]['rank_image'])) { + $ranks[$myrow['rank_id']]['rank_image'] = "<img src='" . XOOPS_UPLOAD_URL . "/ranks/" . htmlspecialchars($ranks[$myrow['rank_id']]['rank_image'], ENT_QUOTES) . "' alt='' />"; + } + } + + foreach (array_keys($this->userlist) as $uid) { + if ($rank = $this->users[$uid]->getVar("rank")) { + $this->userlist[$uid]["rank"]["title"] = $ranks[$rank]["rank_title"]; + $this->userlist[$uid]["rank"]["image"] = $ranks[$rank]["rank_image"]; + continue; + } + foreach ($ranks as $id => $rank) { + if ($rank["rank_min"] <= $this->userlist[$uid]["posts"] && $rank["rank_max"] >= $this->userlist[$uid]["posts"]) { + $this->userlist[$uid]["rank"]["title"] = $rank["rank_title"]; + $this->userlist[$uid]["rank"]["image"] = $rank["rank_image"]; + break; + } + } + } + } + + function getUsers() + { + $this->loadUserInfo(); + $this->loadUserOnline(); + $this->loadUserGroups(); + $this->loadUserRank(); + $this->loadUserDigest(); + + return $this->userlist; + } +} + ?> \ No newline at end of file Modified: XoopsModules/newbb/branches/irmtfan/newbb/docs/changelog.txt =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/docs/changelog.txt 2012-08-01 03:11:30 UTC (rev 9972) +++ XoopsModules/newbb/branches/irmtfan/newbb/docs/changelog.txt 2012-08-01 18:58:48 UTC (rev 9973) @@ -20,25 +20,6 @@ 16 Fix Link to Blank.gif 17 Fix Error Upload File too large -18- bug fix: edit not displayed when the reason is not filled (irmtfan) -19- bug fix: only the last edit is recorded. (irmtfan/alfred) -in newbb/class/post.php - -20- bug fix: 'noapprove' permission incorrectly recorded in database. (irmtfan) -in newbb/class/permission.php - -21- bug fix: load user ranks has been hardcoded. it works in old/upgraded websites but not works in new installed websites. a new getting rank introduced. (black_beard/irmtfan) -in newbb/class/user.php, newbb/templates/newbb_thread.html - -22- minor bug fix: mysql 5.1 was incorrectly needed (irmtfan) -in newbb/xoops_version.php - -23- hardcode: some style.css color hardcodes has been removed. (irmtfan) -in newbb/templates/style.css - -24- feature added: text links instead of buttons. (deka87/irmtfan) -in newbb/class/icon.php , newbb/include/functions.render.php , newbb/include/plugin.php - newBB Changelog 4.2 02/08/2012 Modified: XoopsModules/newbb/branches/irmtfan/newbb/header.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/header.php 2012-08-01 03:11:30 UTC (rev 9972) +++ XoopsModules/newbb/branches/irmtfan/newbb/header.php 2012-08-01 18:58:48 UTC (rev 9973) @@ -1,116 +1,140 @@ -<?php -/** - * CBB 4.0, or newbb, the forum module for XOOPS project - * - * @copyright The XOOPS Project http://xoops.sf.net - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @author Taiwen Jiang (phppp or D.J.) <ph...@us...> - * @since 4.00 - * @version $Id$ - * @package module::newbb - */ -include_once '../../mainfile.php'; -defined('XOOPS_ROOT_PATH') or die('Restricted access'); -$xoopsLogger->startTime('newBB_Header'); - -if (!empty($xoopsModuleConfig['do_rewrite'])) { - include_once "seo_url.php"; - /* for seo */ - $toseo_url = array("index.php","viewforum.php","viewtopic.php","rss.php"); - - if(((strpos(getenv('REQUEST_URI'), '.html') === false) && !empty($xoopsModuleConfig['do_rewrite']) && (!isset($_POST) || count($_POST) <= 0))) - { - $redir = false; - if ( strpos(getenv("REQUEST_URI"),"mark_read=") == true || strpos(getenv("REQUEST_URI"),"mark=") == true) { - // Mark Forums - } else { - if ( in_array(basename(getenv('SCRIPT_NAME')),$toseo_url) ) { - //rewrite only for files - - if ( trim(getenv("SCRIPT_NAME")) != '' ) { - if ( strpos(getenv("REQUEST_URI") , "/".SEO_MODULE_NAME."/") === false ) { - $redir = true; - } else if ( getenv("QUERY_STRING") ) { - $redir = true; - } - } - } - } - - if ($redir == true) { - $s = "http://" . getenv('HTTP_HOST') . getenv("REQUEST_URI"); - $s = str_replace("/".REAL_MODULE_NAME."/","/".SEO_MODULE_NAME."/",$s); - $newurl = seo_urls('<a href="'.$s.'"></a>'); - $newurl = str_replace('<a href="','',$newurl); - $newurl = str_replace('"></a>','',$newurl); - if ( !headers_sent() ) { - header("HTTP/1.1 301 Moved Permanently"); - header("Location: $newurl"); - exit(); - } - } - } -} - -include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/include/vars.php"; - -mod_loadFunctions("user", "newbb"); -mod_loadFunctions("topic", "newbb"); - -require_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; -require_once XOOPS_ROOT_PATH."/class/module.textsanitizer.php"; -$myts = MyTextSanitizer::getInstance(); - -$menumode = 0; -$menumode_other = array(); -$menu_url = htmlSpecialChars(preg_replace("/&menumode=[^&]/", "", $_SERVER[ 'REQUEST_URI' ])); -$menu_url .= ( false === strpos($menu_url, "?") ) ? "?menumode=" : "&menumode="; -foreach ($xoopsModuleConfig["valid_menumodes"] as $key => $val) { - if ($key != $menumode) $menumode_other[] = array("title"=>$val, "link"=>$menu_url.$key); -} - - -$newbb_module_header = ''; -$newbb_module_header .= '<link rel="alternate" type="application/rss+xml" title="'.$xoopsModule->getVar("name").'" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', "n").'/rss.php" />'; -if (!empty($xoopsModuleConfig['pngforie_enabled'])) { - $newbb_module_header .= '<style type="text/css">img {behavior:url("include/pngbehavior.htc");}</style>'; -} -$newbb_module_header .= ' - <link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'/templates/style.css" /> - <script type="text/javascript">var toggle_cookie="'.$forumCookie['prefix'].'G'.'";</script> - <script src="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'/include/js/newbb_toggle.js" type="text/javascript"></script> - '; - -if ($menumode == 2) { - $newbb_module_header .= ' - <link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'templates/newbb_menu_hover.css" /> - <style type="text/css">body {behavior:url("include/newbb.htc");}</style> - '; -} - -if ($menumode == 1) { - $newbb_module_header .= ' - <link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'templates/newbb_menu_click.css" /> - <script src="include/js/newbb_menu_click.js" type="text/javascript"></script> - '; -} - -$xoops_module_header = $newbb_module_header; // for cache hack - -if (!empty($xoopsModuleConfig["welcome_forum"]) && is_object($xoopsUser) && !$xoopsUser->getVar('posts')) { - mod_loadFunctions("welcome", "newbb"); -} - -$pollmodules = NULL; -//$module_handler = &xoops_gethandler('module'); -$xoopspoll = &$module_handler->getByDirname('xoopspoll'); -if (is_object($xoopspoll) && $xoopspoll->getVar('isactive')) { - $pollmodules = 'xoopspoll'; -} else { - //Umfrage - $xoopspoll = &$module_handler->getByDirname('umfrage'); - if (is_object($xoopspoll) && $xoopspoll->getVar('isactive')) - $pollmodules = 'umfrage'; -} -$xoopsLogger->stopTime('newBB_Header'); +<?php +/** + * CBB 4.0, or newbb, the forum module for XOOPS project + * + * @copyright The XOOPS Project http://xoops.sf.net + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Taiwen Jiang (phppp or D.J.) <ph...@us...> + * @since 4.00 + * @version $Id$ + * @package module::newbb + */ +include_once '../../mainfile.php'; +defined('XOOPS_ROOT_PATH') or die('Restricted access'); +$xoopsLogger->startTime('newBB_Header'); + +if (!empty($xoopsModuleConfig['do_rewrite'])) { + include_once "seo_url.php"; + /* for seo */ + $toseo_url = array("index.php","viewforum.php","viewtopic.php","rss.php"); + + if(((strpos(getenv('REQUEST_URI'), '.html') === false) && !empty($xoopsModuleConfig['do_rewrite']) && (!isset($_POST) || count($_POST) <= 0))) + { + $redir = false; + if ( strpos(getenv("REQUEST_URI"),"mark_read=") == true || strpos(getenv("REQUEST_URI"),"mark=") == true) { + // Mark Forums + } else { + if ( in_array(basename(getenv('SCRIPT_NAME')),$toseo_url) ) { + //rewrite only for files + + if ( trim(getenv("SCRIPT_NAME")) != '' ) { + if ( strpos(getenv("REQUEST_URI") , "/".SEO_MODULE_NAME."/") === false ) { + $redir = true; + } else if ( getenv("QUERY_STRING") ) { + $redir = true; + } + } + } + } + + if ($redir == true) { + $s = "http://" . getenv('HTTP_HOST') . getenv("REQUEST_URI"); + $s = str_replace("/".REAL_MODULE_NAME."/","/".SEO_MODULE_NAME."/",$s); + $newurl = seo_urls('<a href="'.$s.'"></a>'); + $newurl = str_replace('<a href="','',$newurl); + $newurl = str_replace('"></a>','',$newurl); + if ( !headers_sent() ) { + header("HTTP/1.1 301 Moved Permanently"); + header("Location: $newurl"); + exit(); + } + } + } +} + +include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/include/vars.php"; + +mod_loadFunctions("user", "newbb"); +mod_loadFunctions("topic", "newbb"); + +require_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; +require_once XOOPS_ROOT_PATH."/class/module.textsanitizer.php"; +$myts = MyTextSanitizer::getInstance(); + +$menumode = 0; +$menumode_other = array(); +$menu_url = htmlSpecialChars(preg_replace("/&menumode=[^&]/", "", $_SERVER[ 'REQUEST_URI' ])); +$menu_url .= ( false === strpos($menu_url, "?") ) ? "?menumode=" : "&menumode="; +foreach ($xoopsModuleConfig["valid_menumodes"] as $key => $val) { + if ($key != $menumode) $menumode_other[] = array("title"=>$val, "link"=>$menu_url.$key); +} + + +$newbb_module_header = ''; +$newbb_module_header .= '<link rel="alternate" type="application/rss+xml" title="'.$xoopsModule->getVar("name").'" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', "n").'/rss.php" />'; +if (!empty($xoopsModuleConfig['pngforie_enabled'])) { + $newbb_module_header .= '<style type="text/css">img {behavior:url("include/pngbehavior.htc");}</style>'; +} +// START hacked by irmtfan to add localization/customization for newbb style.css +$dirname=$xoopsModule->getVar('dirname'); +$theme_path = "{$xoopsConfig['theme_set']}/modules/{$dirname}"; +$theme_default_path= "default/modules/{$dirname}"; +$default_path = "modules/{$dirname}/templates"; +$lang_path = "images/language/{$xoopsConfig['language']}"; + + // get from setted theme +if (is_file(XOOPS_THEME_PATH . '/'.$theme_path . '/' . $lang_path . '/style.css')) { + $rel_path=$theme_path . '/' . $lang_path; + // get from default theme +} else if (is_file(XOOPS_THEME_PATH . '/'.$theme_default_path . '/' . $lang_path . '/style.css')) { + $rel_path=$theme_default_path . '/' . $lang_path; + // get from module default path +} else if (is_file(XOOPS_ROOT_PATH. '/'.$default_path . '/' . $lang_path . '/style.css')) { + $rel_path=$default_path . '/' . $lang_path; + // if no one is found get the english from default path +} else if (is_file(XOOPS_ROOT_PATH. '/'.$default_path . '/images/language/english/style.css')) { + $rel_path=$default_path . '/images/language/english'; + // for backward compatibility - as before +} else { + $rel_path=$default_path; +} + +$newbb_module_header .= ' + <link rel="stylesheet" type="text/css" href="'.XOOPS_URL . '/' . $rel_path . '/style.css" /> + <script type="text/javascript">var toggle_cookie="'.$forumCookie['prefix'].'G'.'";</script> + <script src="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'/include/js/newbb_toggle.js" type="text/javascript"></script> + '; +// END hacked by irmtfan to add localization/customization for newbb style.css +if ($menumode == 2) { + $newbb_module_header .= ' + <link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'templates/newbb_menu_hover.css" /> + <style type="text/css">body {behavior:url("include/newbb.htc");}</style> + '; +} + +if ($menumode == 1) { + $newbb_module_header .= ' + <link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'templates/newbb_menu_click.css" /> + <script src="include/js/newbb_menu_click.js" type="text/javascript"></script> + '; +} + +$xoops_module_header = $newbb_module_header; // for cache hack + +if (!empty($xoopsModuleConfig["welcome_forum"]) && is_object($xoopsUser) && !$xoopsUser->getVar('posts')) { + mod_loadFunctions("welcome", "newbb"); +} + +$pollmodules = NULL; +//$module_handler = &xoops_gethandler('module'); +$xoopspoll = &$module_handler->getByDirname('xoopspoll'); +if (is_object($xoopspoll) && $xoopspoll->getVar('isactive')) { + $pollmodules = 'xoopspoll'; +} else { + //Umfrage + $xoopspoll = &$module_handler->getByDirname('umfrage'); + if (is_object($xoopspoll) && $xoopspoll->getVar('isactive')) + $pollmodules = 'umfrage'; +} +$xoopsLogger->stopTime('newBB_Header'); ?> \ No newline at end of file Modified: XoopsModules/newbb/branches/irmtfan/newbb/include/plugin.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/include/plugin.php 2012-08-01 03:11:30 UTC (rev 9972) +++ XoopsModules/newbb/branches/irmtfan/newbb/include/plugin.php 2012-08-01 18:58:48 UTC (rev 9973) @@ -1,87 +1,87 @@ -<?php -/** - * CBB 4.0, or newbb, the forum module for XOOPS project - * - * @copyright The XOOPS Project http://xoops.sf.net - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @author Taiwen Jiang (phppp or D.J.) <ph...@us...> - * @since 4.00 - * @version $Id $ - * @package module::newbb - */ - -if (!defined('XOOPS_ROOT_PATH')) { - exit(); -} -/* some static xoopsModuleConfig */ -$customConfig = array(); - -// specification for custom time format -// default manner will be used if not specified -$customConfig["formatTimestamp_custom"] = ""; // Could be set as "Y-m-d H:i" - -// requiring "name" field for anonymous users in edit form -$customConfig["require_name"] = true; - -// display "register or login to post" for anonymous users -$customConfig["show_reg"] = true; - -// perform forum/topic synchronization on module update -$customConfig["syncOnUpdate"] = true; - -// time for pending/deleted topics/posts, expired one will be removed automatically, in days; 0 or no cleanup -$customConfig["pending_expire"] = 0; - -// redirect to its URI of an attachment when requested -// Set to true if your attachment would be corrupted after download with normal way -$customConfig["download_direct"] = false; - -// Set allowed editors -// Should set from module preferences? -$customConfig["editor_allowed"] = array(); - -// Set the default editor -$customConfig["editor_default"] = "dhtmltextarea"; - -// Set the default editor for quick reply -$customConfig["editor_quick_default"] = "textarea"; - -// default value for editor rows, coloumns -$customConfig["editor_rows"] = 15; -$customConfig["editor_cols"] = 40; - -// default value for editor width, height (string) -$customConfig["editor_width"] = "100%"; -$customConfig["editor_height"] = "400px"; - -// storage method for reading records: 0 - none; 1 - cookie; 2 - db -$customConfig["read_mode"] = 2; - -// expire time for reading records, in days -$customConfig["read_expire"] = 30; - -// maximum records per forum for one user -$customConfig["read_items"] = 100; - -// Enable tag system -$customConfig["do_tag"] = 1; - -// Count posts counts of subfourms -$customConfig["count_subforum"] = 1; - -// Length for post title on index page: 0 for not showing post title, 255 for not truncate -$customConfig["length_title_index"] = 40; - -// MENU handler -/* You could remove anyone by commenting out in order to disable it */ -$customConfig["valid_menumodes"] = array( - 0 => _MD_MENU_SELECT, // for selectbox - //1 => _MD_MENU_CLICK, // for "click to expand" - //2 => _MD_MENU_HOVER // for "mouse hover to expand" - ); -// START hacked by irmtfan -// Display text links instead of image buttons for edit, reply, .... set true or false -$customConfig["display_text_links"] = false; -// END hacked by irmtfan -return $customConfig; +<?php +/** + * CBB 4.0, or newbb, the forum module for XOOPS project + * + * @copyright The XOOPS Project http://xoops.sf.net + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Taiwen Jiang (phppp or D.J.) <ph...@us...> + * @since 4.00 + * @version $Id $ + * @package module::newbb + */ + +if (!defined('XOOPS_ROOT_PATH')) { + exit(); +} +/* some static xoopsModuleConfig */ +$customConfig = array(); + +// specification for custom time format +// default manner will be used if not specified +$customConfig["formatTimestamp_custom"] = ""; // Could be set as "Y-m-d H:i" + +// requiring "name" field for anonymous users in edit form +$customConfig["require_name"] = true; + +// display "register or login to post" for anonymous users +$customConfig["show_reg"] = true; + +// perform forum/topic synchronization on module update +$customConfig["syncOnUpdate"] = true; + +// time for pending/deleted topics/posts, expired one will be removed automatically, in days; 0 or no cleanup +$customConfig["pending_expire"] = 0; + +// redirect to its URI of an attachment when requested +// Set to true if your attachment would be corrupted after download with normal way +$customConfig["download_direct"] = false; + +// Set allowed editors +// Should set from module preferences? +$customConfig["editor_allowed"] = array(); + +// Set the default editor +$customConfig["editor_default"] = "dhtmltextarea"; + +// Set the default editor for quick reply +$customConfig["editor_quick_default"] = "textarea"; + +// default value for editor rows, coloumns +$customConfig["editor_rows"] = 15; +$customConfig["editor_cols"] = 40; + +// default value for editor width, height (string) +$customConfig["editor_width"] = "100%"; +$customConfig["editor_height"] = "400px"; + +// storage method for reading records: 0 - none; 1 - cookie; 2 - db +$customConfig["read_mode"] = 2; + +// expire time for reading records, in days +$customConfig["read_expire"] = 30; + +// maximum records per forum for one user +$customConfig["read_items"] = 100; + +// Enable tag system +$customConfig["do_tag"] = 1; + +// Count posts counts of subfourms +$customConfig["count_subforum"] = 1; + +// Length for post title on index page: 0 for not showing post title, 255 for not truncate +$customConfig["length_title_index"] = 40; + +// MENU handler +/* You could remove anyone by commenting out in order to disable it */ +$customConfig["valid_menumodes"] = array( + 0 => _MD_MENU_SELECT, // for selectbox + //1 => _MD_MENU_CLICK, // for "click to expand" + //2 => _MD_MENU_HOVER // for "mouse hover to expand" + ); +// START hacked by irmtfan +// Display text links instead of image buttons for edit, reply, .... set true or false +$customConfig["display_text_links"] = false; +// END hacked by irmtfan +return $customConfig; ?> \ No newline at end of file Modified: XoopsModules/newbb/branches/irmtfan/newbb/language/persian/admin.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/language/persian/admin.php 2012-08-01 03:11:30 UTC (rev 9972) +++ XoopsModules/newbb/branches/irmtfan/newbb/language/persian/admin.php 2012-08-01 18:58:48 UTC (rev 9973) @@ -277,7 +277,7 @@ define("_AM_NEWBB_TYPE_LIST", "فهرست نوع ها"); define("_AM_NEWBB_TODEL_TYPE", "آیا مطمان هستید که میخواهید نوع [%s] را حذف کنید؟"); define("_AM_NEWBB_TYPE_EDITFORUM_DESC", "اطلاعات هنوز ذخیره نشده اند. باید روی دکمه ارسال بزنید تا ذخیره شوند."); -define("_AM_NEWBB_TYPE_ORDER_DESC", "برای فعال کردن یک نوع برای یک انجمن، یک عدد بالاتر از 0 را برای ترتیب نوع 'type_order' انتخاب کنید. به عبارت دیگر اگر ترتیب نوع 'type_order' را 0 انتخاب کنید، آن نوع برای آن انجمن غیر فعال خواهد شد"); +define("_AM_NEWBB_TYPE_ORDER_DESC", "برای فعال کردن یک نوع برای یک انجمن، یک عدد بالاتر از 0 را برای نوع تاپیک 'type_order' انتخاب کنید. به عبارت دیگر اگر نوع تاپیک 'type_order' را 0 انتخاب کنید، آن نوع برای آن انجمن غیر فعال خواهد شد"); // admin_synchronization.php define("_AM_NEWBB_SYNC_TYPE_FORUM", "داده های انجمن"); Modified: XoopsModules/newbb/branches/irmtfan/newbb/language/persian/main.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/language/persian/main.php 2012-08-01 03:11:30 UTC (rev 9972) +++ XoopsModules/newbb/branches/irmtfan/newbb/language/persian/main.php 2012-08-01 18:58:48 UTC (rev 9973) @@ -10,7 +10,7 @@ define('_MD_MAX_FILESIZE','حداکثر اندازه فایل'); define('_MD_ATTACHMENT','پیوست'); define('_MD_FILESIZE','اندازه'); -define('_MD_HITS','تعداد دانلود'); +define('_MD_HITS','دفعات دیدن'); define('_MD_GROUPS','گروهها:'); define('_MD_DEL_ONE','فقط این پیام را پاک کن'); define('_MD_DEL_RELATED','این پیام و تمامی پیامهای مربوط به آن را پاک کن'); @@ -431,8 +431,8 @@ define("_MD_NEWBB_SEENOTGUEST","<font color=\"red\"><b>فقط برای کاربران عضو سایت</b></font>"); define("_MD_NEWBB_REPORTSUBJECT","A contribution has been reported"); define("_MD_NEWBB_GOTOLASTPOST","رفتن به آخرین پست ارسال شده"); -define("_MD_EDITEDMSG","دلیل ویرایش:"); -define("_MD_DELEDEDMSG","دلیل حذف پست<br /><small>(اگر دلیلی نوشته شده فرد ارسال کننده پست با خبر خواهد شد)</small>:"); +define("_MD_EDITEDMSG","دلیل ویرایش پست (اختیاری):"); +define("_MD_DELEDEDMSG","دلیل ویرایش پست<br /><small>(اگر دلیلی نوشته شده فرد ارسال کننده پست با خبر خواهد شد)</small>:"); define("_MD_DELEDEDMSG_SUBJECT","پست شما حذف شد"); define("_MD_DELEDEDMSG_BODY","سلام %s, پست شما در انجمن زیر Modified: XoopsModules/newbb/branches/irmtfan/newbb/language/persian/modinfo.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/language/persian/modinfo.php 2012-08-01 03:11:30 UTC (rev 9972) +++ XoopsModules/newbb/branches/irmtfan/newbb/language/persian/modinfo.php 2012-08-01 18:58:48 UTC (rev 9973) @@ -33,7 +33,7 @@ define("_MI_NEWBB_ADMENU_REPORT","گزارش ها"); define("_MI_NEWBB_ADMENU_DIGEST","خلاصه"); define("_MI_NEWBB_ADMENU_VOTE","نظر سنجی ها"); -define("_MI_NEWBB_ADMENU_TYPE", "نوع های تاپیک"); +define("_MI_NEWBB_ADMENU_TYPE", "نوع تاپیک ها"); define("_MI_NEWBB_ADMENU_ABOUT", "درباره این ماژول"); //config options @@ -140,7 +140,7 @@ define("_MI_POST_TIMELIMIT", "ایجاد محدودیت زمانی برای زدن پست های پشت سر هم"); define("_MI_POST_TIMELIMIT_DESC", "قرار دادن محدودیت زمانی برای زدن پیام پشت سر هم. به ثانیه، 0 به معنی بدون محدودیت است"); define("_MI_RECORDEDIT_TIMELIMIT", "محدودیت زمانی برای ذخیره شدن اطلاعات مربوط به ویرایش شدن پیام"); -define("_MI_RECORDEDIT_TIMELIMIT_DESC", "قرار دادن یک زمان به دقیقه که از آن زمان به بعد پس از ارسال پست ویرایش های آن پست ذخیره میشوند. قرار دادن 0 به این معنی است که هیچ ویرایشی ثبت نشود."); +define("_MI_RECORDEDIT_TIMELIMIT_DESC", "قرار دادن محدودیت زمانی برای ذخیره شدن اطلاعات ویرایش پیام ها به دقیقه. 0 به معنی این است که عبارت ویرایش شد در زیر پیام ها اضافه نشود"); //define("_MI_SUBJECT_PREFIX_LEVEL", "سطح دسترسی برای گروه هایی که میتوانند پیشوند (Prefix) اضافه کنند"); //define("_MI_SUBJECT_PREFIX_LEVEL_DESC", "گروه های مجاز را انتخاب کنید"); //define("_MI_SPL_DISABLE", 'غیر فعال'); @@ -229,7 +229,7 @@ میتوانید ثبت نام کرده و سپس مبادرت به ارسال پیام کنید.<br /><br /> اگر هر سوالی راجع به استفاده از newbb دارید, لطفا سایت پشتیبانی را بازدید کنید <a href=\"http://www.xoops.ir/modules/newbb/\" target=\"_blank\" title=\"newbb @ persian xoops\">ماژول انجمن ها</a>. "); -define("_MI_NEWBB_ADMENU_GROUPMOD", "انتخاب گروهی ناظران"); +define("_MI_NEWBB_ADMENU_GROUPMOD", "نظارت بر گروه ها"); define("_MI_SUBJECT_PREFIX", "اضافه کردن پیشوند به ابتدای عنوان"); define("_MI_SUBJECT_PREFIX_DESC", "قرار دادن یک پیشوند مثلا [حل شده] در ابتدای نام یک عنوان.برای جدا کردن گزینه ها از ',' استفاده کنید، اگر میخواهید هیچ پیشوندی نداشته باشید فقط NONE را باقی بگذارید."); define("_MI_SUBJECT_PREFIX_DEFAULT", '<font color="#00CC00">[حل شده]</font>,<font color="#00CC00">[قطعی شده]</font>,<font color="#FF0000">[درخواست شده]</font>,<font color="#FF0000">[گزارش خطا]</font>,<font color="#FF0000">[حل نشده]</font>'); @@ -250,7 +250,7 @@ define('_MI_NEWBB_INFOBOX_HIDDEN', 'بله به صورت فشرده'); define('_MI_NEWBB_INFOBOX_SHOW', 'بله به صورت کامل'); define('_MI_SHOW_SOCIALLINKS', "نمایش لینک های شبکه های اجتماعی"); -define('_MI_SHOW_SOCIALLINKS_DESC', "دکمه های شبکه های اجتماعی از جمله فیس بوک و تویتر را نمایش میدهد"); +define('_MI_SHOW_SOCIALLINKS_DESC', "دکمه های شبکه های اجتماعی از چمله فیس بوک و تویتر را نمایش میدهد"); //4.2 define("_MI_PAGENAV_DISPLAY","نمایش مرورگر"); Modified: XoopsModules/newbb/branches/irmtfan/newbb/polls.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/polls.php 2012-08-01 03:11:30 UTC (rev 9972) +++ XoopsModules/newbb/branches/irmtfan/newbb/polls.php 2012-08-01 18:58:48 UTC (rev 9973) @@ -1,570 +1,580 @@ -<?php -/** - * Newbb module - * - * 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 http://www.fsf.org/copyleft/gpl.html GNU public license - * @package newbb - * @since 4.0 - * @author Taiwen Jiang <ph...@us...> - * @version $Id: polls.php 2175 2008-09-23 14:07:03Z phppp $ - */ - - -include_once dirname(__FILE__) . "/header.php"; - -include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; -include_once XOOPS_ROOT_PATH . "/class/xoopslists.php"; -include_once XOOPS_ROOT_PATH . "/class/xoopsblock.php"; - -if ( $pollmodules == 'xoopspoll') -{ - include XOOPS_ROOT_PATH . "/modules/xoopspoll/include/constants.php"; - include_once XOOPS_ROOT_PATH . "/modules/xoopspoll/class/xoopspoll.php"; - include_once XOOPS_ROOT_PATH . "/modules/xoopspoll/class/xoopspolloption.php"; - include_once XOOPS_ROOT_PATH . "/modules/xoopspoll/class/xoopspolllog.php"; - include_once XOOPS_ROOT_PATH . "/modules/xoopspoll/class/xoopspollrenderer.php"; -} -elseif ($pollmodules == 'umfrage') -{ - include XOOPS_ROOT_PATH."/modules/umfrage/include/constants.php"; - include_once XOOPS_ROOT_PATH."/modules/umfrage/class/umfrage.php"; - include_once XOOPS_ROOT_PATH."/modules/umfrage/class/umfrageoption.php"; - include_once XOOPS_ROOT_PATH."/modules/umfrage/class/umfragelog.php"; - include_once XOOPS_ROOT_PATH."/modules/umfrage/class/umfragerenderer.php"; -} -else -{ - redirect_header("javascript:history.go(-1);", 2, _MD_POLLMODULE_ERROR); - exit(); -} - -$op = "add"; -if (isset($_GET['op'])) $op = $_GET['op']; -if (isset($_POST['op'])) $op = $_POST['op']; -if (isset($_GET['poll_id'])) $poll_id = intval($_GET['poll_id']); -if (isset($_POST['poll_id'])) $poll_id = intval($_POST['poll_id']); -if (isset($_GET['topic_id'])) $topic_id = intval($_GET['topic_id']); -if (isset($_POST['topic_id'])) $topic_id = intval($_POST['topic_id']); - -if (!isset($module_handler)) $module_handler =& xoops_gethandler('module'); -$xoopspoll =& $module_handler->getByDirname($pollmodules); -if (!is_object($xoopspoll) || !$xoopspoll->getVar('isactive')) { - redirect_header("javascript:history.go(-1);", 2, _MD_POLLMODULE_ERROR); - exit(); -} - -include XOOPS_ROOT_PATH . "/header.php"; - -$topic_handler =& xoops_getmodulehandler('topic', 'newbb'); -$topic_obj =& $topic_handler->get($topic_id); -$forum = $topic_obj->getVar('forum_id'); -$forum_handler =& xoops_getmodulehandler('forum', 'newbb'); -$forum_obj =& $forum_handler->get($forum); -if (!$forum_handler->getPermission($forum_obj)) { - redirect_header("index.php", 2, _MD_NORIGHTTOACCESS); - exit(); -} -if (!$topic_handler->getPermission($forum_obj, $topic_obj->getVar('topic_status'), "view")) { - redirect_header("viewforum.php?forum=" . $forum_obj->getVar('forum_id'), 2, _MD_NORIGHTTOVIEW); - exit(); -} - -$isadmin = newbb_isAdmin($forum_obj); -$perm = false; -if ($isadmin) { - $perm = true; -} elseif ($topic_handler->getPermission($forum_obj, $topic_obj->getVar('topic_status'), "addpoll") - //&& $forum_obj->getVar('allow_polls') == 1 -) { - if ( ($op=="add" || $op=="save") && !$topic_obj->getVar("topic_haspoll") && is_object($xoopsUser) && $xoopsUser->getVar("uid") == $topic_obj->getVar("topic_poster") ) { - $perm = true; - } elseif (!empty($poll_id)) { - $poll = new XoopsPoll($poll_id); - if (is_object($xoopsUser) && $xoopsUser->getVar("uid") == $poll->getVar("user_id")) { - $perm = true; - } - } -} -if (!$perm) { - redirect_header("viewtopic.php?topic_id=" . $topic_id, 2, _NOPERM); -} - -if ( $op == "add" ) { - $poll_form = new XoopsThemeForm(_MD_POLL_CREATNEWPOLL, "poll_form", "polls.php"); - - $question_text = new XoopsFormText(_MD_POLL_POLLQUESTION, "question", 50, 255); - $poll_form->addElement($question_text, true); - - $desc_tarea = new XoopsFormTextarea(_MD_POLL_POLLDESC, "description"); - $poll_form->addElement($desc_tarea); - - $currenttime = formatTimestamp(time(), "Y-m-d H:i:s"); - $endtime = formatTimestamp(time() + 604800, "Y-m-d H:i:s"); - $expire_text = new XoopsFormText(_MD_POLL_EXPIRATION . "<br /><small>" . _MD_POLL_FORMAT . "<br />" . sprintf(_MD_POLL_CURRENTTIME, $currenttime) . "</small>", "end_time", 30, 19, $endtime); - $poll_form->addElement($expire_text); - - $weight_text = new XoopsFormText(_MD_POLL_DISPLAYORDER, "weight", 6, 5, 0); - $poll_form->addElement($weight_text); - - $multi_yn = new XoopsFormRadioYN(_MD_POLL_ALLOWMULTI, "multiple", 0); - $poll_form->addElement($multi_yn); - - $notify_yn = new XoopsFormRadioYN(_MD_POLL_NOTIFY, "notify", 1); - $poll_form->addElement($notify_yn); - - $option_tray = new XoopsFormElementTray(_MD_POLL_POLLOPTIONS, ""); - $barcolor_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/".$pollmodules."/images/colorbars/"); - for($i = 0; $i < 10; $i++) { - $current_bar = (current($barcolor_array) != "blank.gif") ? current($barcolor_array) : next($barcolor_array); - $option_text = new XoopsFormText("", "option_text[]", 50, 255); - $option_tray->addElement($option_text); - $color_select = new XoopsFormSelect("", "option_color[{$i}]", $current_bar); - $color_select->addOptionArray($barcolor_array); - $color_select->setExtra("onchange='showImgSelected(\"option_color_image[{$i}]\", \"option_color[{$i}]\", \"modules/".$pollmodules."/images/colorbars\", \"\", \"" . XOOPS_URL . "\")'"); - $color_label = new XoopsFormLabel("", "<img src='" . XOOPS_URL . "/modules/".$pollmodules."/images/colorbars/" . $current_bar . "' name='option_color_image[{$i}]' id='option_color_image[{$i}]' width='30' align='bottom' height='15' alt='' /><br />"); - $option_tray->addElement($color_select); - $option_tray->addElement($color_label); - if ( !next($barcolor_array) ) { - reset($barcolor_array); - } - unset($color_select, $color_label); - } - $poll_form->addElement($option_tray); - - $submit_button = new XoopsFormButton("", "poll_submit", _SUBMIT, "submit"); - $poll_form->addElement($submit_button); - $op_hidden = new XoopsFormHidden("op", "save"); - $poll_form->addElement($op_hidden); - $poll_topic_id_hidden = new XoopsFormHidden("topic_id", $topic_id); - $poll_form->addElement($poll_topic_id_hidden); - //include XOOPS_ROOT_PATH . "/header.php"; - echo "<h4>" . _MD_POLL_POLLCONF . "</h4>"; - $poll_form->display(); - //include XOOPS_ROOT_PATH . "/footer.php"; - //exit(); -} - -if ( $op == "save" ) { - /* - * The option check should be done before submitting - */ - $option_empty = true; - if (empty($_POST['option_text'])) { - redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); - } - $option_text = $_POST['option_text']; - foreach ( $option_text as $optxt ) { - if ( trim($optxt) != "" ) { - $option_empty = false; - break; - } - } - if ($option_empty) { - redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); - } - if ( $pollmodules == 'xoopspoll') - $poll = new XoopsPoll(); - else if ( $pollmodules == 'umfrage') - $poll = new Umfrage(); - else die("POLL-ERROR: polls.php Line 190"); - $poll->setVar("question", @$_POST['question']); - $poll->setVar("description", @$_POST['description']); - if ( !empty($_POST['end_time']) ) { - $timezone = is_object($xoopsUser) ? $xoopsUser->getVar("timezone") : null; - $poll->setVar("end_time", userTimeToServerTime(strtotime($_POST['end_time']), $timezone)); - } else { - // if expiration date is not set, set it to 10 days from now - $poll->setVar("end_time", time() + (86400 * 10)); - } - $poll->setVar("display", 0); - $poll->setVar("weight", intval(@$_POST['weight'])); - $poll->setVar("multiple", intval(@$_POST['multiple'])); - if ( !empty($_POST["notify"]) ) { - // if notify, set mail status to "not mailed" - $poll->setVar("mail_status", POLL_NOTMAILED); - } else { - // if not notify, set mail status to already "mailed" - $poll->setVar("mail_status", POLL_MAILED); - } - $uid = is_object($xoopsUser) ? $xoopsUser->getVar("uid") : 0; - $poll->setVar("user_id", $uid); - $new_poll_id = $poll->store(); - $option_color = empty($_POST['option_color']) ? NULL : $_POST['option_color']; - if ( !empty($new_poll_id) ) { - $i = 0; - foreach ( $option_text as $optxt ) { - $optxt = trim($optxt); - if ( $optxt != "" ) { - if ( $pollmodules == 'xoopspoll') - $option = new XoopsPollOption(); - else if ( $pollmodules == 'umfrage') - $option = new UmfrageOption(); - else die("POLL-ERROR: polls.php Line 223"); - $option->setVar("option_text", $optxt); - $option->setVar("option_color", $option_color[$i]); - $option->setVar("poll_id", $new_poll_id); - $option->store(); - } - $i++; - } - $sql = "UPDATE " . $xoopsDB->prefix("bb_topics") . " SET topic_haspoll = 1, poll_id = {$new_poll_id} WHERE topic_id = {$topic_id}"; - if ( !$result = $xoopsDB->query($sql) ) { - xoops_error($xoopsDB->error()); - } - include_once XOOPS_ROOT_PATH . '/class/template.php'; - xoops_template_clear_module_cache($xoopsModule->getVar('mid')); - } else { - xoops_error($poll->getHtmlErrors()); - exit(); - } - redirect_header("viewtopic.php?topic_id={$topic... [truncated message content] |
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] |
From: <be...@us...> - 2012-08-01 03:07:10
|
Revision: 9971 http://xoops.svn.sourceforge.net/xoops/?rev=9971&view=rev Author: beckmi Date: 2012-08-01 03:07:04 +0000 (Wed, 01 Aug 2012) Log Message: ----------- Adding to Releases version 0.80 Added Paths: ----------- XoopsModules/xhelp/releases/0.80/xhelp/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2012-08-01 03:06:45
|
Revision: 9970 http://xoops.svn.sourceforge.net/xoops/?rev=9970&view=rev Author: beckmi Date: 2012-08-01 03:06:38 +0000 (Wed, 01 Aug 2012) Log Message: ----------- Adding folder for Release 0.80 Added Paths: ----------- XoopsModules/xhelp/releases/0.80/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2012-08-01 02:55:31
|
Revision: 9969 http://xoops.svn.sourceforge.net/xoops/?rev=9969&view=rev Author: beckmi Date: 2012-08-01 02:55:15 +0000 (Wed, 01 Aug 2012) Log Message: ----------- Adding version 0.80 from Trabis Added Paths: ----------- XoopsModules/xhelp/trunk/xhelp/addTicket.php XoopsModules/xhelp/trunk/xhelp/admin/ XoopsModules/xhelp/trunk/xhelp/admin/about.php XoopsModules/xhelp/trunk/xhelp/admin/admin.php XoopsModules/xhelp/trunk/xhelp/admin/admin_buttons.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/admin/upgradeProgress.php XoopsModules/xhelp/trunk/xhelp/anon_addTicket.php XoopsModules/xhelp/trunk/xhelp/blocks/ XoopsModules/xhelp/trunk/xhelp/blocks/index.html XoopsModules/xhelp/trunk/xhelp/blocks/xhelp_blocks.php XoopsModules/xhelp/trunk/xhelp/checkemail.php XoopsModules/xhelp/trunk/xhelp/class/ XoopsModules/xhelp/trunk/xhelp/class/cacheService.php XoopsModules/xhelp/trunk/xhelp/class/configoption.php XoopsModules/xhelp/trunk/xhelp/class/department.php XoopsModules/xhelp/trunk/xhelp/class/departmentMailBox.php XoopsModules/xhelp/trunk/xhelp/class/eventService.php XoopsModules/xhelp/trunk/xhelp/class/faq/ XoopsModules/xhelp/trunk/xhelp/class/faq/Smartfaq.php XoopsModules/xhelp/trunk/xhelp/class/faq/index.html XoopsModules/xhelp/trunk/xhelp/class/faq/smartsection.php XoopsModules/xhelp/trunk/xhelp/class/faq/wordpress.php XoopsModules/xhelp/trunk/xhelp/class/faq/xoopsfaq.php XoopsModules/xhelp/trunk/xhelp/class/faq.php XoopsModules/xhelp/trunk/xhelp/class/faqAdapter.php XoopsModules/xhelp/trunk/xhelp/class/faqAdapterFactory.php XoopsModules/xhelp/trunk/xhelp/class/faqCategory.php XoopsModules/xhelp/trunk/xhelp/class/file.php XoopsModules/xhelp/trunk/xhelp/class/firnService.php XoopsModules/xhelp/trunk/xhelp/class/index.html XoopsModules/xhelp/trunk/xhelp/class/logMessage.php XoopsModules/xhelp/trunk/xhelp/class/logService.php XoopsModules/xhelp/trunk/xhelp/class/mailBoxIMAP.php XoopsModules/xhelp/trunk/xhelp/class/mailEvent.php XoopsModules/xhelp/trunk/xhelp/class/mailbox.php XoopsModules/xhelp/trunk/xhelp/class/mailboxPOP3.php XoopsModules/xhelp/trunk/xhelp/class/membership.php XoopsModules/xhelp/trunk/xhelp/class/mimetype.php XoopsModules/xhelp/trunk/xhelp/class/msgParser.php XoopsModules/xhelp/trunk/xhelp/class/msgStore.php XoopsModules/xhelp/trunk/xhelp/class/notification.php XoopsModules/xhelp/trunk/xhelp/class/notificationService.php XoopsModules/xhelp/trunk/xhelp/class/pear/ XoopsModules/xhelp/trunk/xhelp/class/pear/Mail/ XoopsModules/xhelp/trunk/xhelp/class/pear/Mail/mime.php XoopsModules/xhelp/trunk/xhelp/class/pear/Mail/mimeDecode.php XoopsModules/xhelp/trunk/xhelp/class/pear/Mail/mimePart.php XoopsModules/xhelp/trunk/xhelp/class/pear/Mail/xmail.dtd XoopsModules/xhelp/trunk/xhelp/class/pear/Mail/xmail.xsl XoopsModules/xhelp/trunk/xhelp/class/pear/Net/ XoopsModules/xhelp/trunk/xhelp/class/pear/Net/IMAP.php XoopsModules/xhelp/trunk/xhelp/class/pear/Net/IMAPProtocol.php XoopsModules/xhelp/trunk/xhelp/class/pear/Net/POP3.php XoopsModules/xhelp/trunk/xhelp/class/pear/Net/Socket.php XoopsModules/xhelp/trunk/xhelp/class/pear/PEAR.php XoopsModules/xhelp/trunk/xhelp/class/renderer.php XoopsModules/xhelp/trunk/xhelp/class/report.php XoopsModules/xhelp/trunk/xhelp/class/reportFactory.php XoopsModules/xhelp/trunk/xhelp/class/reportParameter.php XoopsModules/xhelp/trunk/xhelp/class/reportRenderer/ XoopsModules/xhelp/trunk/xhelp/class/reportRenderer/htmlReportRenderer.php XoopsModules/xhelp/trunk/xhelp/class/reportRenderer/pdfReportRenderer.php XoopsModules/xhelp/trunk/xhelp/class/reportRenderer.php XoopsModules/xhelp/trunk/xhelp/class/reportRendererFactory.php XoopsModules/xhelp/trunk/xhelp/class/responseTemplates.php XoopsModules/xhelp/trunk/xhelp/class/responses.php XoopsModules/xhelp/trunk/xhelp/class/role.php XoopsModules/xhelp/trunk/xhelp/class/savedSearch.php XoopsModules/xhelp/trunk/xhelp/class/session.php XoopsModules/xhelp/trunk/xhelp/class/staff.php XoopsModules/xhelp/trunk/xhelp/class/staffReview.php XoopsModules/xhelp/trunk/xhelp/class/staffRole.php XoopsModules/xhelp/trunk/xhelp/class/staffService.php XoopsModules/xhelp/trunk/xhelp/class/status.php XoopsModules/xhelp/trunk/xhelp/class/ticket.php XoopsModules/xhelp/trunk/xhelp/class/ticketEmails.php XoopsModules/xhelp/trunk/xhelp/class/ticketField.php XoopsModules/xhelp/trunk/xhelp/class/ticketFieldDepartment.php XoopsModules/xhelp/trunk/xhelp/class/ticketList.php XoopsModules/xhelp/trunk/xhelp/class/ticketMailParser.php XoopsModules/xhelp/trunk/xhelp/class/ticketSolution.php XoopsModules/xhelp/trunk/xhelp/class/ticketValues.php XoopsModules/xhelp/trunk/xhelp/class/uploader.php XoopsModules/xhelp/trunk/xhelp/class/validator.php XoopsModules/xhelp/trunk/xhelp/class/xhelpBaseObject.php XoopsModules/xhelp/trunk/xhelp/class/xhelpBaseObjectHandler.php XoopsModules/xhelp/trunk/xhelp/class/xhelpForm.php XoopsModules/xhelp/trunk/xhelp/class/xhelpFormCheckbox.php XoopsModules/xhelp/trunk/xhelp/class/xhelpFormRadio.php XoopsModules/xhelp/trunk/xhelp/class/xhelpFormRegex.php XoopsModules/xhelp/trunk/xhelp/class/xhelpNaiveBayesian.php XoopsModules/xhelp/trunk/xhelp/class/xhelpPageNav.php XoopsModules/xhelp/trunk/xhelp/class/xhelpPlugin.php XoopsModules/xhelp/trunk/xhelp/class/xhelpService.php XoopsModules/xhelp/trunk/xhelp/class/xhelpTree.php XoopsModules/xhelp/trunk/xhelp/delete.php XoopsModules/xhelp/trunk/xhelp/docs/ XoopsModules/xhelp/trunk/xhelp/docs/CHANGELOG.txt XoopsModules/xhelp/trunk/xhelp/docs/Class Relationships.vsd XoopsModules/xhelp/trunk/xhelp/docs/Custom Fields Object Model.vsd XoopsModules/xhelp/trunk/xhelp/docs/Custom Fields Use Cases.txt XoopsModules/xhelp/trunk/xhelp/docs/Event_Service.txt XoopsModules/xhelp/trunk/xhelp/docs/LICENSE.txt XoopsModules/xhelp/trunk/xhelp/docs/LISEZMOI.txt XoopsModules/xhelp/trunk/xhelp/docs/Module Overview.txt XoopsModules/xhelp/trunk/xhelp/docs/README.txt XoopsModules/xhelp/trunk/xhelp/docs/Support Plans.vsd XoopsModules/xhelp/trunk/xhelp/docs/dbStructure.vsd XoopsModules/xhelp/trunk/xhelp/docs/index.html XoopsModules/xhelp/trunk/xhelp/docs/leiamebr.txt XoopsModules/xhelp/trunk/xhelp/docs/smarty_variables.xls XoopsModules/xhelp/trunk/xhelp/docs/xhelp roadmap.xls XoopsModules/xhelp/trunk/xhelp/docs/xhelp-xmldtd.xml XoopsModules/xhelp/trunk/xhelp/docs/xhelp_workflow.vsd XoopsModules/xhelp/trunk/xhelp/docs/xml_layout.xml XoopsModules/xhelp/trunk/xhelp/error.php XoopsModules/xhelp/trunk/xhelp/faq.php XoopsModules/xhelp/trunk/xhelp/functions.php XoopsModules/xhelp/trunk/xhelp/header.php XoopsModules/xhelp/trunk/xhelp/iepngfix.js XoopsModules/xhelp/trunk/xhelp/images/ XoopsModules/xhelp/trunk/xhelp/images/3Dev_xhelp.png XoopsModules/xhelp/trunk/xhelp/images/3Dev_xhelp_trans.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/ XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/Thumbs.db XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/dept-blue.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/dept-green.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/dept-orange.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/dept-red.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/index.html XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/priority1.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/priority1full.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/priority1print.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/priority2.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/priority2full.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/priority2print.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/priority3.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/priority3full.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/priority3print.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/priority4.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/priority4full.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/priority4print.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/priority5.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/priority5full.png XoopsModules/xhelp/trunk/xhelp/images/Priority-solid/priority5print.png XoopsModules/xhelp/trunk/xhelp/images/Thumbs.db XoopsModules/xhelp/trunk/xhelp/images/actions.png XoopsModules/xhelp/trunk/xhelp/images/addTicket.png XoopsModules/xhelp/trunk/xhelp/images/arrow_blank.png XoopsModules/xhelp/trunk/xhelp/images/asc.png XoopsModules/xhelp/trunk/xhelp/images/assignOwner.gif XoopsModules/xhelp/trunk/xhelp/images/assignOwner.png XoopsModules/xhelp/trunk/xhelp/images/ball.png XoopsModules/xhelp/trunk/xhelp/images/bg.gif XoopsModules/xhelp/trunk/xhelp/images/button_blank.png XoopsModules/xhelp/trunk/xhelp/images/button_delete.png XoopsModules/xhelp/trunk/xhelp/images/button_edit.png XoopsModules/xhelp/trunk/xhelp/images/calendar.png XoopsModules/xhelp/trunk/xhelp/images/claimOwner.gif XoopsModules/xhelp/trunk/xhelp/images/claimOwner.png XoopsModules/xhelp/trunk/xhelp/images/delete.png XoopsModules/xhelp/trunk/xhelp/images/dept-bg-cap.png XoopsModules/xhelp/trunk/xhelp/images/dept-bg.png XoopsModules/xhelp/trunk/xhelp/images/dept-blue.png XoopsModules/xhelp/trunk/xhelp/images/dept-fill-cap.png XoopsModules/xhelp/trunk/xhelp/images/dept-green.png XoopsModules/xhelp/trunk/xhelp/images/dept-orange.png XoopsModules/xhelp/trunk/xhelp/images/dept-red.png XoopsModules/xhelp/trunk/xhelp/images/desc.png XoopsModules/xhelp/trunk/xhelp/images/edit.png XoopsModules/xhelp/trunk/xhelp/images/email.png XoopsModules/xhelp/trunk/xhelp/images/graph_bg.jpg XoopsModules/xhelp/trunk/xhelp/images/help.png XoopsModules/xhelp/trunk/xhelp/images/highPriority.png XoopsModules/xhelp/trunk/xhelp/images/important-32.png XoopsModules/xhelp/trunk/xhelp/images/important.png XoopsModules/xhelp/trunk/xhelp/images/important2.png XoopsModules/xhelp/trunk/xhelp/images/index.html XoopsModules/xhelp/trunk/xhelp/images/left_both.gif XoopsModules/xhelp/trunk/xhelp/images/logMessages.png XoopsModules/xhelp/trunk/xhelp/images/lookup.png XoopsModules/xhelp/trunk/xhelp/images/main.png XoopsModules/xhelp/trunk/xhelp/images/merge.png XoopsModules/xhelp/trunk/xhelp/images/myTickets.png XoopsModules/xhelp/trunk/xhelp/images/newTicket.png XoopsModules/xhelp/trunk/xhelp/images/off.png XoopsModules/xhelp/trunk/xhelp/images/on.png XoopsModules/xhelp/trunk/xhelp/images/openTicket.png XoopsModules/xhelp/trunk/xhelp/images/print.png XoopsModules/xhelp/trunk/xhelp/images/priority1.png XoopsModules/xhelp/trunk/xhelp/images/priority1full.png XoopsModules/xhelp/trunk/xhelp/images/priority1print.png XoopsModules/xhelp/trunk/xhelp/images/priority2.png XoopsModules/xhelp/trunk/xhelp/images/priority2full.png XoopsModules/xhelp/trunk/xhelp/images/priority2print.png XoopsModules/xhelp/trunk/xhelp/images/priority3.png XoopsModules/xhelp/trunk/xhelp/images/priority3full.png XoopsModules/xhelp/trunk/xhelp/images/priority3print.png XoopsModules/xhelp/trunk/xhelp/images/priority4.png XoopsModules/xhelp/trunk/xhelp/images/priority4full.png XoopsModules/xhelp/trunk/xhelp/images/priority4print.png XoopsModules/xhelp/trunk/xhelp/images/priority5.png XoopsModules/xhelp/trunk/xhelp/images/priority5full.png XoopsModules/xhelp/trunk/xhelp/images/priority5print.png XoopsModules/xhelp/trunk/xhelp/images/profile.png XoopsModules/xhelp/trunk/xhelp/images/progress.gif XoopsModules/xhelp/trunk/xhelp/images/readme.png XoopsModules/xhelp/trunk/xhelp/images/report.png XoopsModules/xhelp/trunk/xhelp/images/response.png XoopsModules/xhelp/trunk/xhelp/images/right_both.gif XoopsModules/xhelp/trunk/xhelp/images/search.png XoopsModules/xhelp/trunk/xhelp/images/search2.png XoopsModules/xhelp/trunk/xhelp/images/ticket-small.png XoopsModules/xhelp/trunk/xhelp/images/ticket.png XoopsModules/xhelp/trunk/xhelp/images/ticketInfo.png XoopsModules/xhelp/trunk/xhelp/images/xhelp_slogo.png XoopsModules/xhelp/trunk/xhelp/images/xhelp_slogo_ba.png XoopsModules/xhelp/trunk/xhelp/include/ XoopsModules/xhelp/trunk/xhelp/include/blocksadmin.inc.php XoopsModules/xhelp/trunk/xhelp/include/calendar/ XoopsModules/xhelp/trunk/xhelp/include/calendar/calendar-blue.css XoopsModules/xhelp/trunk/xhelp/include/calendar/calendar.js XoopsModules/xhelp/trunk/xhelp/include/calendar/calendarjs.php XoopsModules/xhelp/trunk/xhelp/include/constants.php XoopsModules/xhelp/trunk/xhelp/include/events.php XoopsModules/xhelp/trunk/xhelp/include/functions.js XoopsModules/xhelp/trunk/xhelp/include/functions_admin.php XoopsModules/xhelp/trunk/xhelp/include/index.html XoopsModules/xhelp/trunk/xhelp/include/jpgraph/ XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/accbarex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/accbarframeex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/accbarframeex02.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/accbarframeex03.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/alphabarex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/antispamex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/axislabelbkgex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/axislabelbkgex02.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/axislabelbkgex03.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/axislabelbkgex04.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/axislabelbkgex05.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/axislabelbkgex06.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/axislabelbkgex07.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/background_type_ex0.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/background_type_ex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/background_type_ex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/background_type_ex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/background_type_ex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/backgroundex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/backgroundex02.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/backgroundex03.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/balloonex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/balloonex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bar2scalesex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bar_csimex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bar_csimex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bar_csimex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/barcsim_details.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/barcsim_popup.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/barformatcallbackex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bargradex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bargradex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bargradex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bargradex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bargradex5.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bargradex6.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bargradsmallex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bargradsmallex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bargradsmallex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bargradsmallex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bargradsmallex5.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bargradsmallex6.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bargradsmallex7.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bargradsmallex8.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/barimgex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/barintex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/barintex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/barline_csimex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/barlinealphaex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/barlinefreq_csimex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/barlinefreqex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/barpatternex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/barscalecallbackex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bartutex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bartutex12.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bartutex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bartutex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bartutex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bartutex5.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bartutex6.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/basic_contourex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/basic_contourex02.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/basic_contourex03-1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/basic_contourex03-2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/basic_contourex03-3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/basic_contourex04.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/basic_contourex05.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bezierex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bkgimgflagex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bkgimgflagex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bkgimgflagex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bkgimgflagex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/bkgimgflagex5.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/blueblack400x300grad.png XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/boxstockcsimex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/boxstockex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/boxstockex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/builtinplotmarksex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/canvas_jpgarchex.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/canvasbezierex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/canvasex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/canvasex02.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/canvasex03.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/canvasex04.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/canvasex05.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/canvasex06.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/canvaspiralex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ccbp_ex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ccbp_ex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ccbpgraph.class.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/centeredlineex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/centeredlineex02.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/centeredlineex03.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/centerlinebarex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/checkgd.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/checkgd2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/checkttf.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/classroom.jpg XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/clipping_ex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/clipping_ex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/colormaps.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/comb90dategraphex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/comb90dategraphex02.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/comb90dategraphex03.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/combgraphex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/combgraphex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/contourex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/contourex02.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/contourex03.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/contourex04.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/contourex05.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/csim_in_html_ex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/csim_in_html_ex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/csim_in_html_graph_ex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/csim_in_html_graph_ex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/dataset01.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/dateaxisex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/dateaxisex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/dateaxisex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/dateaxisex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/datescaleticksex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/dateutilex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/dateutilex02.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/dupyaxisex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example0-0.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example0.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example1.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example1.2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example10.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example11.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example13.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example14.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example15.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example16.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example16.2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example16.3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example16.4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example16.5.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example16.6.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example16.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example17.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example18.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example19.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example19.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example2.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example2.5.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example2.6.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example20.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example20.2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example20.3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example20.4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example20.5.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example20.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example21.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example22.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example23.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example24.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example25.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example25.2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example25.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example26.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example26.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example27.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example27.2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example27.3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example27.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example28.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example28.2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example28.3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example28.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example3.0.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example3.0.2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example3.0.3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example3.1.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example3.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example3.2.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example3.2.2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example3.2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example3.3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example3.4.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example3.4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example5.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example5.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example6.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example6.2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example6.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example7.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example8.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example8.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example9.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example9.2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/example9.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/exampleex9.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/fieldscatterex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/filledgridex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/filledline01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/filledlineex01.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/filledlineex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/filledlineex02.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/filledlineex03.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/filledstepstyleex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/fixscale_radarex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/footerex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/funcex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/funcex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/funcex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/funcex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/gantt_samerowex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/gantt_samerowex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/gantt_textex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttcolumnfontsex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttconstrainex0.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttconstrainex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttconstrainex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttcsimex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttcsimex02.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex00.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex02.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex03.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex04.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex05.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex06.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex07.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex08.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex09.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex10.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex11.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex12.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex13-zoom1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex13-zoom2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex13.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex14.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex15.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex16.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex17-flag.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex17.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex18.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex19.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex30.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttex_slice.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/gantthgridex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/gantthourex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/gantthourminex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/gantticonex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttmonthyearex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttmonthyearex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttmonthyearex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttmonthyearex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ganttsimpleex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/grace_ex0.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/grace_ex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/grace_ex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/grace_ex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/gradbkgex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/gradlinefillex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/gradlinefillex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/gradlinefillex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/gradlinefillex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/groupbarex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/heat1.jpg XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/horizbarex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/horizbarex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/horizbarex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/horizbarex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/horizbarex6.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/imgmarkercsimex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/imgmarkerex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/impulsex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/impulsex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/impulsex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/impulsex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/interpolation-growth-log.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/interpolation-growth.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/inyaxisex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/inyaxisex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/inyaxisex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex10.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex11.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex12.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex13.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex14.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex15.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex16.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex17.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex4.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex4.2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex5.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex6.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex7.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex8.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex9.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex_cyrillic.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/ledex_cyrillic2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/lightbluedarkblue400x300grad.png XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/linebarcentex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/linebarex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/linebarex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/linebarex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/linegraceex.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/lineiconex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/lineiconex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/lineimagefillex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/linlogex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/listallflags.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/listallflags_helper.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/listfontsex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/logbarex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/loglogex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/manscaleex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/manscaleex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/manscaleex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/manscaleex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/manual_textscale_ex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/manual_textscale_ex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/manual_textscale_ex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/manual_textscale_ex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/manualtickex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/manualtickex1a.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/manualtickex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/manualtickex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/manualtickex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/markflagex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/mkgrad.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/multconstganttex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/mulyaxiscsimex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/mulyaxisex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/negbarvalueex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/nullvalueex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/partiallyfilledlineex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/penguin.png XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pie3d_csimex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pie3dex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pie3dex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pie3dex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pie3dex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pie3dex5.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pie_csimex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/piebkgex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/piec_csimex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/piecex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/piecex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pieex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pieex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pieex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pieex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pieex5.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pieex6.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pieex7.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pieex8.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pieex9.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pielabelsex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pielabelsex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pielabelsex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pielabelsex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pielabelsex5.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/plotbanddensity_ex0.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/plotbanddensity_ex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/plotbanddensity_ex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/plotlineex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/polar_csimex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/polarclockex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/polarclockex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/polarex0-180.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/polarex0.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/polarex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/polarex10.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/polarex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/polarex3-lin.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/polarex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/polarex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/polarex5.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/polarex6.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/polarex7-1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/polarex7-2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/polarex7.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/polarex8.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/polarex9.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/prepaccdata_example.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pushpinex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/pushpinex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/radar_csimex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/radarex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/radarex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/radarex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/radarex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/radarex5.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/radarex6.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/radarex6.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/radarex7.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/radarex8.1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/radarex8.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/radarex9.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/radarlogex1-aa.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/radarlogex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/radarlogex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/radarmarkex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/rotateex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/rotex0.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/rotex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/rotex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/rotex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/rotex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/rotex5.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/saab_95.jpg XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/scatter_csimex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/scatterex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/scatterex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/scatterlinkex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/scatterlinkex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/scatterlinkex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/scatterlinkex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/scatterrotex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/show-example.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/show-image.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/show-source.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/smallstaticbandsex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/smallstaticbandsex10.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/smallstaticbandsex11.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/smallstaticbandsex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/smallstaticbandsex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/smallstaticbandsex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/smallstaticbandsex5.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/smallstaticbandsex6.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/smallstaticbandsex7.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/smallstaticbandsex8.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/smallstaticbandsex9.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/splineex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/staticbandbarex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/staticbandbarex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/staticbandbarex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/staticbandbarex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/staticbandbarex5.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/staticbandbarex6.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/staticbandbarex7.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/staticlinebarex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/stockex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/stockex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/stship.jpg XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/sunspotsex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/sunspotsex2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/sunspotsex3.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/sunspotsex4.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/sunspotsex5.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/sunspotsex6.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/sunspotsex7.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/tabtitleex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/testsuit.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/text-example1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/text-example2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/textalignex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/textpalignex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/tiger1.jpg XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/tiger_bkg.gif XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/tiger_bkg.jpg XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/tiger_bkg.png XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/timestampex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/titlecsimex01.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/titleex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/topxaxisex1.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/worldmap1.jpg XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/y2synch.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/y2synch2.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/Examples/yearssn.txt XoopsModules/xhelp/trunk/xhelp/include/jpgraph/VERSION XoopsModules/xhelp/trunk/xhelp/include/jpgraph/contour_dev/ XoopsModules/xhelp/trunk/xhelp/include/jpgraph/contour_dev/findpolygon.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/contour_dev/tri-quad.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/flag_mapping XoopsModules/xhelp/trunk/xhelp/include/jpgraph/flags.dat XoopsModules/xhelp/trunk/xhelp/include/jpgraph/flags_thumb100x100.dat XoopsModules/xhelp/trunk/xhelp/include/jpgraph/flags_thumb35x35.dat XoopsModules/xhelp/trunk/xhelp/include/jpgraph/flags_thumb60x60.dat XoopsModules/xhelp/trunk/xhelp/include/jpgraph/gd_image.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/imgdata_balls.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/imgdata_bevels.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/imgdata_diamonds.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/imgdata_pushpins.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/imgdata_squares.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/imgdata_stars.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/index.html XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpg-config.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_antispam-digits.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_antispam.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_bar.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_canvas.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_canvtools.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_contour.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_date.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_errhandler.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_error.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_flags.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_gantt.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_gb2312.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_gradient.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_iconplot.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_imgtrans.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_led.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_legend.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_line.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_log.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_meshinterpolate.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_mgraph.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_pie.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_pie3d.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_plotband.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_plotline.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_plotmark.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_polar.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_radar.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_regstat.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_rgb.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_scatter.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_stock.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_text.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_ttf.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/jpgraph_utils.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/lang/ XoopsModules/xhelp/trunk/xhelp/include/jpgraph/lang/de.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/lang/en.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpgraph/lang/prod.inc.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/ XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/ XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/CodeWriter.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/ErrorHandler.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/Generator.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/Handle.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/Include.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/Lexer.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/Listener.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/Monitor.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/RequestData.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/Script.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/Serializer.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/Server/ XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/Server/PostOffice.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/Server.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/Types.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/Unserializer/ XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/Unserializer/PHP.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/Unserializer/XML.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/Unserializer.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/errors/ XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/errors/errors.en.ini XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/ XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/encode/ XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/encode/php.js XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/encode/xml.js XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/httpclient.js XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/remoteobject.js XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/request/ XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/request/get.js XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/request/post.js XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/request/rawpost.js XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/request.js XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/serialize.js XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/util/ XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/util/data.js XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/util/errorreader.js XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/util/mock.js XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/util/mockxmlhttp.js XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/util/pseudoxmlhttp.js XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/util/typeof.js XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan/js/util/utf8.js XoopsModules/xhelp/trunk/xhelp/include/jpspan/JPSpan.php XoopsModules/xhelp/trunk/xhelp/include/jpspan/LICENSE XoopsModules/xhelp/trunk/xhelp/include/jpspan/README XoopsModules/xhelp/trunk/xhelp/include/jpspan/TODO XoopsModules/xhelp/trunk/xhelp/include/jpspan/VERSION XoopsModules/xhelp/trunk/xhelp/include/multifile.js XoopsModules/xhelp/trunk/xhelp/index.php XoopsModules/xhelp/trunk/xhelp/install.php XoopsModules/xhelp/trunk/xhelp/language/ XoopsModules/xhelp/trunk/xhelp/language/english/ XoopsModules/xhelp/trunk/xhelp/language/english/admin.php XoopsModules/xhelp/trunk/xhelp/language/english/blocks.php XoopsModules/xhelp/trunk/xhelp/language/english/index.html XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/ XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/dept_changedpriority_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/dept_changedstatus_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/dept_closeticket_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/dept_mergeticket_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/dept_modifiedresponse_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/dept_modifiedticket_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/dept_newowner_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/dept_newresponse_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/dept_newticket_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/dept_removedticket_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/index.html XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/ticket_changedpriority_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/ticket_changedstatus_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/ticket_closeticket_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/ticket_mergeticket_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/ticket_modifiedresponse_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/ticket_modifiedticket_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/ticket_new_user_activation1.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/ticket_new_user_activation2.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/ticket_new_user_byemail.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/ticket_newowner_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/ticket_newresponse_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/ticket_newticket_byemail_notify.tpl XoopsModules/xhelp/trunk/xhelp/language/english/mail_template/ti... [truncated message content] |
From: <be...@us...> - 2012-08-01 00:50:54
|
Revision: 9968 http://xoops.svn.sourceforge.net/xoops/?rev=9968&view=rev Author: beckmi Date: 2012-08-01 00:50:47 +0000 (Wed, 01 Aug 2012) Log Message: ----------- Updating language constants Modified Paths: -------------- XoopsModules/wfdownloads/trunk/wfdownloads/admin/menu.php XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/menu.php =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/admin/menu.php 2012-07-31 22:44:26 UTC (rev 9967) +++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/menu.php 2012-08-01 00:50:47 UTC (rev 9968) @@ -80,10 +80,10 @@ $adminmenu[$i]['link'] = "admin/import.php"; $adminmenu[$i]["icon"] = $pathIcon32 . '/add.png'; $i++; -$adminmenu[$i]['title'] = _AM_WFD_HELP; +$adminmenu[$i]['title'] = _MI_WFD_HELP; $adminmenu[$i]['link'] = "docs/english/readme.html"; $adminmenu[$i]["icon"] = $pathIcon32 . '/help.png'; $i++; -$adminmenu[$i]['title'] = _AM_WFD_ABOUT; +$adminmenu[$i]['title'] = _AM_MODULEADMIN_ABOUT; $adminmenu[$i]['link'] = "admin/about.php"; $adminmenu[$i]["icon"] = $pathIcon32 . '/about.png'; \ No newline at end of file Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php 2012-07-31 22:44:26 UTC (rev 9967) +++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php 2012-08-01 00:50:47 UTC (rev 9968) @@ -307,4 +307,5 @@ //3.21 -define("_MI_WFD_DB_IMPORT", "Import"); \ No newline at end of file +define("_MI_WFD_DB_IMPORT", "Import"); +define("_MI_WFD_HELP", "Help"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2012-07-31 22:44:35
|
Revision: 9967 http://xoops.svn.sourceforge.net/xoops/?rev=9967&view=rev Author: beckmi Date: 2012-07-31 22:44:26 +0000 (Tue, 31 Jul 2012) Log Message: ----------- Version 3.21 Beta 1 (conversion to XOOPS 2.5.5 GUI) Modified Paths: -------------- XoopsModules/wfdownloads/trunk/wfdownloads/admin/about.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/brokendown.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/category.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/import.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/index.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/indexpage.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/ip_log.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/menu.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/mimetypes.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/mirror.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/modifications.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/newdownloads.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/permissions.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/review.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/update.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/upload.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/votedata.php XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__changelog.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__support.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__version.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/index.html XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php XoopsModules/wfdownloads/trunk/wfdownloads/sql/wfdownloads.sql XoopsModules/wfdownloads/trunk/wfdownloads/submit.php XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_mirrors.html XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php Added Paths: ----------- XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_footer.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header2.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/main.php XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt XoopsModules/wfdownloads/trunk/wfdownloads/docs/credits.txt XoopsModules/wfdownloads/trunk/wfdownloads/docs/install.txt XoopsModules/wfdownloads/trunk/wfdownloads/docs/lang_diff.txt XoopsModules/wfdownloads/trunk/wfdownloads/docs/license.txt XoopsModules/wfdownloads/trunk/wfdownloads/docs/readme.txt XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/ignore.png XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/link.png XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/statistics.png XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/world_link.png XoopsModules/wfdownloads/trunk/wfdownloads/images/module_logo.png XoopsModules/wfdownloads/trunk/wfdownloads/language/english/help/ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/help/help.html XoopsModules/wfdownloads/trunk/wfdownloads/language/english/help/index.html Removed Paths: ------------- XoopsModules/wfdownloads/trunk/wfdownloads/changelog.txt XoopsModules/wfdownloads/trunk/wfdownloads/readme.txt Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/about.php =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/admin/about.php 2012-07-31 22:41:41 UTC (rev 9966) +++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/about.php 2012-07-31 22:44:26 UTC (rev 9967) @@ -1,102 +1,30 @@ -<?php -/** - * $Id: about.php,v 1.6 2007/08/10 20:59:33 m0nty_ Exp $ - * Module: WF-Downloads - * Version: v2.0.5a - * Release Date: 26 july 2004 - * Author: WF-Sections - * Licence: GNU - */ - -include 'admin_header.php'; -$myts = & MyTextSanitizer :: getInstance(); - -global $xoopsModule; - -wfdownloads_xoops_cp_header(); - -$versioninfo =& $xoopsModule; - -wfdownloads_adminMenu(-1, _AM_WFD_ABOUT); -// Left headings... - echo " - <img src='" . XOOPS_URL . "/modules/wfdownloads/" . $versioninfo -> getInfo('image') . "' alt='' title='' hspace='10' vspace='0' /></a>\n - <div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $versioninfo -> getInfo('name') . " version " . $versioninfo -> getInfo('version') . "</div>\n - <div>\n"; -if ($versioninfo -> getInfo('author_realname') != '') -{ - $author_name = $versioninfo -> getInfo('author'); -} -else -{ - $author_name = $versioninfo -> getInfo('author'); -} - echo " - </div>\n - <div>" . _MI_WFD_RELEASE . " " . $versioninfo -> getInfo('releasedate') . "</div>\n - <div>" . _AM_WFD_BY . " " . $author_name . "</div>\n - <div>" . $versioninfo -> getInfo('license') . "</div><br />\n"; -// Author Information -$sform = new XoopsThemeForm(_MI_WFD_AUTHOR_INFO, "", ""); - -$sform -> addElement(new XoopsFormLabel(_MI_WFD_AUTHOR_NAME, $author_name)); - -$sform -> addElement(new XoopsFormLabel(_MI_WFD_AUTHOR_WEBSITE, "<a href='" . $versioninfo -> getInfo('author_website_url') . "' target='_blank'>" . $versioninfo -> getInfo('author_website_name') . "</a>")); - -$sform -> addElement(new XoopsFormLabel(_MI_WFD_AUTHOR_EMAIL, "<a href='mailto:" . $versioninfo -> getInfo('author_email') . "'>" . $versioninfo -> getInfo('author_email') . "</a>")); - -$sform -> addElement(new XoopsFormLabel(_MI_WFD_AUTHOR_DEVTEAM, $versioninfo -> getInfo('teammembers'))); -$sform -> display(); -// Author Information -$sform = new XoopsThemeForm(_MI_WFD_MODULE_INFO, "", ""); - -$sform -> addElement(new XoopsFormLabel(_MI_WFD_MODULE_STATUS, $versioninfo -> getInfo('status'))); - -//$sform -> addElement(new XoopsFormLabel(_MI_WFD_MODULE_DEMO, "<a href='" . $versioninfo -> getInfo('support_site_url') . "' target='_blank'>" . $versioninfo -> getInfo('support_site_name') . "</a>")); - -$sform -> addElement(new XoopsFormLabel(_MI_WFD_MODULE_SUPPORT, "<a href='" . $versioninfo -> getInfo('support_site_url') . "' target='_blank'>" . $versioninfo -> getInfo('support_site_name') . "</a>")); - -$sform -> addElement(new XoopsFormLabel(_MI_WFD_MODULE_BUG, "<a href='" . $versioninfo -> getInfo('submit_bug') . "' target='_blank'>" . "Submit a Bug" . "</a>")); - -$sform -> addElement(new XoopsFormLabel(_MI_WFD_MODULE_FEATURE, "<a href='" . $versioninfo -> getInfo('submit_feature') . "' target='_blank'>" . "Request a new feature" . "</a>")); -$sform -> display(); -// Author Information - -$sform = new XoopsThemeForm(_MI_WFD_MODULE_DISCLAIMER, "", ""); -ob_start(); -echo "<div class='even'>" . $versioninfo -> getInfo('warning') . "</div>"; -$sform -> addElement(new XoopsFormLabel('', ob_get_contents(), 0)); -ob_end_clean(); -$sform -> display(); - -$sform = new XoopsThemeForm(_MI_WFD_AUTHOR_CREDITS, "", ""); -ob_start(); -echo "<div class='even'>" . $versioninfo -> getInfo('author_credits') . "</div>"; -$sform -> addElement(new XoopsFormLabel('', ob_get_contents(), 0)); -ob_end_clean(); -$sform -> display(); - -global $myts; - -$file = '../changelog.txt'; -if (@file_exists($file)) -{ - $fp = @fopen($file, "r"); - $bugtext = @fread($fp, filesize($file)); - @fclose($file); -} - -$sform = new XoopsThemeForm(_MI_WFD_AUTHOR_BUGFIXES, "", ""); -ob_start(); -echo "<div class='even'>".$myts->displayTarea($bugtext, true)."</div>"; -$sform -> addElement(new XoopsFormLabel('', ob_get_contents(), 0)); -ob_end_clean(); -$sform -> display(); -unset($file); - - echo " - <div align = 'center'>" . _MI_WFD_COPYRIGHTIMAGE . "</div>\n - "; -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/wfdownloads/trunk/wfdownloads/admin/admin_footer.php =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_footer.php (rev 0) +++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_footer.php 2012-07-31 22:44:26 UTC (rev 9967) @@ -0,0 +1,28 @@ +<?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 $ + */ + +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/wfdownloads/trunk/wfdownloads/admin/admin_header.php =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php 2012-07-31 22:41:41 UTC (rev 9966) +++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php 2012-07-31 22:44:26 UTC (rev 9967) @@ -1,38 +1,73 @@ -<?php -/** - * $Id: admin_header.php,v 1.5 2007/08/10 20:59:33 m0nty_ Exp $ - * Module: WF-Downloads - * Version: v2.0.5a - * Release Date: 26 july 2004 - * Author: WF-Sections - * Licence: GNU - */ - -include '../../../include/cp_header.php'; -include_once(XOOPS_ROOT_PATH . '/modules/wfdownloads/include/functions.php'); -include_once(XOOPS_ROOT_PATH . '/modules/wfdownloads/include/common.php'); - -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; - -$myts = &MyTextSanitizer::getInstance(); - -$imagearray = array( - 'editimg' => "<img src='../images/icon/edit.gif' alt='" . _AM_WFD_ICO_EDIT . "' title='" . _AM_WFD_ICO_EDIT . "' align='middle'>", - 'deleteimg' => "<img src='../images/icon/delete.gif' alt='" . _AM_WFD_ICO_DELETE . "' title='" . _AM_WFD_ICO_DELETE . "' align='middle'>", - 'online' => "<img src='../images/icon/on.gif' alt='" . _AM_WFD_ICO_ONLINE . "' title='" . _AM_WFD_ICO_ONLINE . "' align='middle'>", - 'offline' => "<img src='../images/icon/off.gif' alt='" . _AM_WFD_ICO_OFFLINE . "' title='" . _AM_WFD_ICO_OFFLINE . "' align='middle'>", - 'approved' => "<img src='../images/icon/on.gif' alt=''" . _AM_WFD_ICO_APPROVED . "' title=''" . _AM_WFD_ICO_APPROVED . "' align='middle'>", - 'notapproved' => "<img src='../images/icon/off.gif' alt='" . _AM_WFD_ICO_NOTAPPROVED . "' title='" . _AM_WFD_ICO_NOTAPPROVED . "' align='middle'>", - 'relatedfaq' => "<img src='../images/icon/link.gif' alt='" . _AM_WFD_ICO_LINK . "' title='" . _AM_WFD_ICO_LINK . "' align='middle'>", - 'relatedurl' => "<img src='../images/icon/urllink.gif' alt='" . _AM_WFD_ICO_URL . "' title='" . _AM_WFD_ICO_URL . "' align='middle'>", - 'addfaq' => "<img src='../images/icon/add.gif' alt='" . _AM_WFD_ICO_ADD . "' title='" . _AM_WFD_ICO_ADD . "' align='middle'>", - 'approve' => "<img src='../images/icon/approve.gif' alt='" . _AM_WFD_ICO_APPROVE . "' title='" . _AM_WFD_ICO_APPROVE . "' align='middle'>", - 'statsimg' => "<img src='../images/icon/stats.gif' alt='" . _AM_WFD_ICO_STATS . "' title='" . _AM_WFD_ICO_STATS . "' align='middle'>", - 'ignore' => "<img src='../images/icon/ignore.gif' alt='" . _AM_WFD_ICO_IGNORE . "' title='" . _AM_WFD_ICO_IGNORE . "' align='middle'>", - 'ack_yes' => "<img src='../images/icon/on.gif' alt='" . _AM_WFD_ICO_ACK . "' title='" . _AM_WFD_ICO_ACK . "' align='middle'>", - 'ack_no' => "<img src='../images/icon/off.gif' alt='" . _AM_WFD_ICO_REPORT . "' title='" . _AM_WFD_ICO_REPORT . "' align='middle'>", - 'con_yes' => "<img src='../images/icon/on.gif' alt='" . _AM_WFD_ICO_CONFIRM . "' title='" . _AM_WFD_ICO_CONFIRM . "' align='middle'>", - 'con_no' => "<img src='../images/icon/off.gif' alt='" . _AM_WFD_ICO_CONBROKEN . "' title='" . _AM_WFD_ICO_CONBROKEN . "' align='middle'>" - ); - -?> \ 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'; + +include_once(XOOPS_ROOT_PATH . '/modules/wfdownloads/include/functions.php'); +include_once(XOOPS_ROOT_PATH . '/modules/wfdownloads/include/common.php'); + +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + +$myts = &MyTextSanitizer::getInstance(); + +global $xoopsModule; + +$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='". $pathIcon16 .'/edit.png'."' alt='" . _AM_WFD_ICO_EDIT . "' title='" . _AM_WFD_ICO_EDIT . "' align='middle'>", + 'deleteimg' => "<img src='". $pathIcon16 .'/delete.png'."' alt='" . _AM_WFD_ICO_DELETE . "' title='" . _AM_WFD_ICO_DELETE . "' align='middle'>", + 'online' => "<img src='". $pathIcon16 .'/1.png'."' alt='" . _AM_WFD_ICO_ONLINE . "' title='" . _AM_WFD_ICO_ONLINE . "' align='middle'>", + 'offline' => "<img src='". $pathIcon16 .'/0.png'."' alt='" . _AM_WFD_ICO_OFFLINE . "' title='" . _AM_WFD_ICO_OFFLINE . "' align='middle'>", + 'approved' => "<img src='". $pathIcon16 .'/on.png'."' alt=''" . _AM_WFD_ICO_APPROVED . "' title=''" . _AM_WFD_ICO_APPROVED . "' align='middle'>", + 'notapproved' => "<img src='". $pathIcon16 .'/off.png'."' alt='" . _AM_WFD_ICO_NOTAPPROVED . "' title='" . _AM_WFD_ICO_NOTAPPROVED . "' align='middle'>", + 'relatedfaq' => "<img src='../images/icon/link.png' alt='" . _AM_WFD_ICO_LINK . "' title='" . _AM_WFD_ICO_LINK . "' align='middle'>", + 'relatedurl' => "<img src='../images/icon/world_link.png' alt='" . _AM_WFD_ICO_URL . "' title='" . _AM_WFD_ICO_URL . "' align='middle'>", + 'addfaq' => "<img src='". $pathIcon16 .'/add.png'."' alt='" . _AM_WFD_ICO_ADD . "' title='" . _AM_WFD_ICO_ADD . "' align='middle'>", + 'approve' => "<img src='". $pathIcon16 .'/on.png'."' alt='" . _AM_WFD_ICO_APPROVE . "' title='" . _AM_WFD_ICO_APPROVE . "' align='middle'>", + 'statsimg' => "<img src='../images/icon/statistics.png' alt='" . _AM_WFD_ICO_STATS . "' title='" . _AM_WFD_ICO_STATS . "' align='middle'>", + 'ignore' => "<img src='../images/icon/ignore.png' alt='" . _AM_WFD_ICO_IGNORE . "' title='" . _AM_WFD_ICO_IGNORE . "' align='middle'>", + 'ack_yes' => "<img src='". $pathIcon16 .'/on.png'."' alt='" . _AM_WFD_ICO_ACK . "' title='" . _AM_WFD_ICO_ACK . "' align='middle'>", + 'ack_no' => "<img src='". $pathIcon16 .'/off.png'."' alt='" . _AM_WFD_ICO_REPORT . "' title='" . _AM_WFD_ICO_REPORT . "' align='middle'>", + 'con_yes' => "<img src='". $pathIcon16 .'/on.png'."' alt='" . _AM_WFD_ICO_CONFIRM . "' title='" . _AM_WFD_ICO_CONFIRM . "' align='middle'>", + 'con_no' => "<img src='". $pathIcon16 .'/off.png'."' alt='" . _AM_WFD_ICO_CONBROKEN . "' title='" . _AM_WFD_ICO_CONBROKEN . "' align='middle'>" + ); + + +if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){ + include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'); + }else{ + redirect_header("../../../admin.php", 5, _AM_BIRTHDAY_MODULEADMIN_MISSING, false); + } \ No newline at end of file Added: XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header2.php =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header2.php (rev 0) +++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header2.php 2012-07-31 22:44:26 UTC (rev 9967) @@ -0,0 +1,38 @@ +<?php +/** + * $Id: admin_header.php,v 1.5 2007/08/10 20:59:33 m0nty_ Exp $ + * Module: WF-Downloads + * Version: v2.0.5a + * Release Date: 26 july 2004 + * Author: WF-Sections + * Licence: GNU + */ + +include '../../../include/cp_header.php'; +include_once(XOOPS_ROOT_PATH . '/modules/wfdownloads/include/functions.php'); +include_once(XOOPS_ROOT_PATH . '/modules/wfdownloads/include/common.php'); + +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + +$myts = &MyTextSanitizer::getInstance(); + +$imagearray = array( + 'editimg' => "<img src='../images/icon/edit.gif' alt='" . _AM_WFD_ICO_EDIT . "' title='" . _AM_WFD_ICO_EDIT . "' align='middle'>", + 'deleteimg' => "<img src='../images/icon/delete.gif' alt='" . _AM_WFD_ICO_DELETE . "' title='" . _AM_WFD_ICO_DELETE . "' align='middle'>", + 'online' => "<img src='../images/icon/on.gif' alt='" . _AM_WFD_ICO_ONLINE . "' title='" . _AM_WFD_ICO_ONLINE . "' align='middle'>", + 'offline' => "<img src='../images/icon/off.gif' alt='" . _AM_WFD_ICO_OFFLINE . "' title='" . _AM_WFD_ICO_OFFLINE . "' align='middle'>", + 'approved' => "<img src='../images/icon/on.gif' alt=''" . _AM_WFD_ICO_APPROVED . "' title=''" . _AM_WFD_ICO_APPROVED . "' align='middle'>", + 'notapproved' => "<img src='../images/icon/off.gif' alt='" . _AM_WFD_ICO_NOTAPPROVED . "' title='" . _AM_WFD_ICO_NOTAPPROVED . "' align='middle'>", + 'relatedfaq' => "<img src='../images/icon/link.gif' alt='" . _AM_WFD_ICO_LINK . "' title='" . _AM_WFD_ICO_LINK . "' align='middle'>", + 'relatedurl' => "<img src='../images/icon/urllink.gif' alt='" . _AM_WFD_ICO_URL . "' title='" . _AM_WFD_ICO_URL . "' align='middle'>", + 'addfaq' => "<img src='../images/icon/add.gif' alt='" . _AM_WFD_ICO_ADD . "' title='" . _AM_WFD_ICO_ADD . "' align='middle'>", + 'approve' => "<img src='../images/icon/approve.gif' alt='" . _AM_WFD_ICO_APPROVE . "' title='" . _AM_WFD_ICO_APPROVE . "' align='middle'>", + 'statsimg' => "<img src='../images/icon/stats.gif' alt='" . _AM_WFD_ICO_STATS . "' title='" . _AM_WFD_ICO_STATS . "' align='middle'>", + 'ignore' => "<img src='../images/icon/ignore.gif' alt='" . _AM_WFD_ICO_IGNORE . "' title='" . _AM_WFD_ICO_IGNORE . "' align='middle'>", + 'ack_yes' => "<img src='../images/icon/on.gif' alt='" . _AM_WFD_ICO_ACK . "' title='" . _AM_WFD_ICO_ACK . "' align='middle'>", + 'ack_no' => "<img src='../images/icon/off.gif' alt='" . _AM_WFD_ICO_REPORT . "' title='" . _AM_WFD_ICO_REPORT . "' align='middle'>", + 'con_yes' => "<img src='../images/icon/on.gif' alt='" . _AM_WFD_ICO_CONFIRM . "' title='" . _AM_WFD_ICO_CONFIRM . "' align='middle'>", + 'con_no' => "<img src='../images/icon/off.gif' alt='" . _AM_WFD_ICO_CONBROKEN . "' title='" . _AM_WFD_ICO_CONBROKEN . "' align='middle'>" + ); + +?> \ No newline at end of file Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/brokendown.php =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/admin/brokendown.php 2012-07-31 22:41:41 UTC (rev 9966) +++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/brokendown.php 2012-07-31 22:44:26 UTC (rev 9967) @@ -78,8 +78,9 @@ wfdownloads_xoops_cp_header(); - wfdownloads_adminMenu(3, _AM_WFD_BROKEN_FILE); + //wfdownloads_adminMenu(3, _AM_WFD_BROKEN_FILE); + echo " <fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_WFD_BROKEN_REPORTINFO . "</legend>\n <div style='padding: 8px;'>" . _AM_WFD_BROKEN_REPORTSNO . " <b>$totalbrokendownloads</b><div>\n @@ -145,7 +146,7 @@ $lid = intval($download->getVar('lid')); $ingnore_link = "<a href='".WFDOWNLOADS_URL."admin/brokendown.php?op=ignoreBrokenDownloads&lid=".$lid."' alt='" . _AM_WFD_BROKEN_IGNORE_ALT . "' title='" . _AM_WFD_BROKEN_IGNORE_ALT . "'>" . $imagearray['ignore'] . "</a>"; - $edit_link = "<a href='".WFDOWNLOADS_URL."admin/index.php?op=Download&lid=".$lid."' alt='" . _AM_WFD_BROKEN_EDIT_ALT . "' title='" . _AM_WFD_BROKEN_EDIT_ALT . "'> " . $imagearray['editimg'] . " </a>"; + $edit_link = "<a href='".WFDOWNLOADS_URL."admin/main.php?op=Download&lid=".$lid."' alt='" . _AM_WFD_BROKEN_EDIT_ALT . "' title='" . _AM_WFD_BROKEN_EDIT_ALT . "'> " . $imagearray['editimg'] . " </a>"; $delete_link = "<a href='".WFDOWNLOADS_URL."admin/brokendown.php?op=delBrokenDownloads&lid=".$lid."' alt='" . _AM_WFD_BROKEN_DELETE_ALT . "' title='" . _AM_WFD_BROKEN_DELETE_ALT . "'>" . $imagearray['deleteimg'] . "</a>"; $ack_image = ($reports[$i]->getVar('acknowledged')) ? $imagearray['ack_yes'] : $imagearray['ack_no']; $ack_link = "<a href='".WFDOWNLOADS_URL."admin/brokendown.php?op=updateNotice&lid=".$lid."&ack=".$reports[$i]->getVar('acknowledged')."' alt='" . _AM_WFD_BROKEN_ACK_ALT . "' title='" . _AM_WFD_BROKEN_ACK_ALT . "'>" . $ack_image . "</a>"; @@ -184,6 +185,5 @@ } echo"</table>"; } -xoops_cp_footer(); - -?> \ No newline at end of file +//xoops_cp_footer(); +include 'admin_footer.php'; \ No newline at end of file Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/category.php =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/admin/category.php 2012-07-31 22:41:41 UTC (rev 9966) +++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/category.php 2012-07-31 22:44:26 UTC (rev 9967) @@ -44,7 +44,7 @@ $cid = (isset($_POST['cid'])) ? intval($_POST['cid']) : intval($_GET['cid']); wfdownloads_xoops_cp_header(); - wfdownloads_adminMenu(2, _AM_WFD_MCATEGORY); + //wfdownloads_adminMenu(2, _AM_WFD_MCATEGORY); include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; $sform = new XoopsThemeForm(_AM_WFD_CCATEGORY_MOVE, "move", xoops_getenv('PHP_SELF')); @@ -240,7 +240,7 @@ case "modCat": $cid = (isset($_POST['cid'])) ? intval($_POST['cid']) : 0; wfdownloads_xoops_cp_header(); - wfdownloads_adminMenu(2, _AM_WFD_MCATEGORY); + //wfdownloads_adminMenu(2, _AM_WFD_MCATEGORY); createcat($cid); xoops_cp_footer(); break; @@ -249,8 +249,11 @@ default: wfdownloads_xoops_cp_header(); - wfdownloads_adminMenu(2, _AM_WFD_MCATEGORY); + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation('category.php'); + //wfdownloads_adminMenu(2, _AM_WFD_MCATEGORY); + include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; $totalcats = wfd_totalcategory(); @@ -278,8 +281,7 @@ } createcat(0); - xoops_cp_footer(); +//xoops_cp_footer(); +include 'admin_footer.php'; break; -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/import.php =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/admin/import.php 2012-07-31 22:41:41 UTC (rev 9966) +++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/import.php 2012-07-31 22:44:26 UTC (rev 9967) @@ -32,7 +32,9 @@ include_once('admin_header.php'); include_once(WFDOWNLOADS_ROOT_PATH."include/update.php"); wfdownloads_xoops_cp_header(); -wfdownloads_adminMenu(-1, "Import"); +$indexAdmin = new ModuleAdmin(); +echo $indexAdmin->addNavigation('import.php'); +//wfdownloads_adminMenu(-1, "Import"); // ========================================================================================= // This function imports data from mydownloads into wf-downloads @@ -376,6 +378,5 @@ $form->display(); break; } -wfdownloads_modFooter(); -xoops_cp_footer(); -?> \ No newline at end of file +//xoops_cp_footer(); +include 'admin_footer.php'; \ No newline at end of file Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/index.php =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/admin/index.php 2012-07-31 22:41:41 UTC (rev 9966) +++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/index.php 2012-07-31 22:44:26 UTC (rev 9967) @@ -1,761 +1,129 @@ -<?php -/** - * $Id: index.php,v 1.23 2007/09/30 12:39:13 m0nty_ Exp $ - * Module: WF-Downloads - * Version: v2.0.5a - * Release Date: 26 july 2004 - * Author: WF-Sections - * Licence: GNU - */ - -include 'admin_header.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php'; -include_once WFDOWNLOADS_ROOT_PATH.'class/wfd_lists.php'; -include_once XOOPS_ROOT_PATH.'/class/tree.php'; -include_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; - -$mytree = new XoopsTree($xoopsDB -> prefix('wfdownloads_cat'), "cid", "pid"); - -function Download() -{ - - $lid = isset($_REQUEST['lid']) ? intval($_REQUEST['lid']) : 0; - - $category_handler = xoops_getmodulehandler('category'); - $numrows = $category_handler->getCount(); - if ($numrows) - { - wfdownloads_xoops_cp_header(); - - wfdownloads_adminMenu(3, _AM_WFD_MDOWNLOADS); - - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_WFD_FILE_ALLOWEDAMIME . "</legend>\n - <div style='padding: 8px;'>\n"; - - $mime_handler = xoops_getmodulehandler('mimetype'); - $criteria = new Criteria("mime_admin", 1); - $mimetypes = $mime_handler->getList($criteria); - $allowmimetypes = implode(' | ', $mimetypes); - echo $allowmimetypes; - echo "</div>\n - </fieldset><br />\n - "; - - $download_handler = xoops_getmodulehandler('download'); - if ($lid) - { - $download = $download_handler->get($lid); - $title = _AM_WFD_FILE_MODIFYFILE; - // added - start - March 4 2006 - jpc - $cid = intval($download->getVar('cid')); - $category = $category_handler->get($cid); - // added - end - March 4 2006 - jpc - - // changed - start - April 22 2006 - jwe - //$title = _AM_WFD_FILE_MODIFYFILE; - $title = ereg_replace("{category}", $category->getVar('title'), _AM_WFD_FFS_EDITDOWNLOADTITLE); - // changed - end - April 22 2006 - jwe - - } - else - { - $download = $download_handler->create(); - $title = _AM_WFD_FILE_CREATENEWFILE; - // added - start - March 4 2006 - jpc - $cid = (!empty($_POST['cid'])) ? intval($_POST['cid']) : 0 ; - $download->setVar('cid', $cid); - $category = $category_handler->get($cid); - // added - end - March 4 2006 - jpc - - // changed - start - April 22 2006 - jwe - //$title = _AM_WFD_FILE_CREATENEWFILE; - $title = ereg_replace("{category}", $category->getVar('title'), _AM_WFD_FFS_DOWNLOADTITLE); - // changed - end - April 22 2006 - jwe - - } - - // changed - start - March 4 2006 - jpc - if ((isset($_POST['submit_category']) && !empty($_POST['submit_category'])) || $lid) - { - - $fid = $category->getVar('formulize_fid'); - $customArray = array(); - if($fid) - { - global $xoopsUser; - include_once XOOPS_ROOT_PATH . "/modules/formulize/include/formdisplay.php"; - include_once XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php"; - - $customArray['fid'] = $fid; - $customArray['formulize_mgr'] =& xoops_getmodulehandler('elements', 'formulize'); - $customArray['groups'] = $xoopsUser ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS); - $customArray['prevEntry'] = getEntryValues($download->getVar('formulize_idreq'), $customArray['formulize_mgr'], $customArray['groups'], $fid); - $customArray['entry'] = $download->getVar('formulize_idreq'); - $customArray['go_back'] = ""; - $customArray['parentLinks'] = ""; - - $owner = getEntryOwner($entry); - $member_handler =& xoops_gethandler('member'); - $owner_groups =& $member_handler->getGroupsByUser($owner, FALSE); - - $customArray['owner_groups'] = $owner_groups; - } - $sform = $download->getAdminForm($title, $customArray); - } - elseif(file_exists(XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php")) - { - $sform = $download->getCategoryForm(); - } - else - { - $sform = $download->getAdminForm($title); - } - $sform->display(); - // changed - end - March 4 2006 - jpc - } - else - { - redirect_header(WFDOWNLOADS_URL.'admin/category.php?', 1, _AM_WFD_CCATEGORY_NOEXISTS); - exit(); - } - - if ($lid) - { - global $imagearray; - // Vote data - $rating_handler = xoops_getmodulehandler('rating'); - $totalvotes = $rating_handler->getCount(); - - $reg_criteria = new CriteriaCompo(new Criteria('lid', $lid)); - $reg_criteria->add(new Criteria("ratinguser", 0, ">")); - $votesreg = $rating_handler->getCount($reg_criteria); - $reg_criteria->setSort("ratingtimestamp"); - $reg_criteria->setOrder("DESC"); - $regvotes = $rating_handler->getObjects($reg_criteria); - - $anon_criteria = new CriteriaCompo(new Criteria('lid', $lid)); - $anon_criteria->add(new Criteria("ratinguser", 0, ">")); - $votesanon = $rating_handler->getCount($anon_criteria); - $anon_criteria->setSort("ratingtimestamp"); - $anon_criteria->setOrder("DESC"); - - echo " - <fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_WFD_VOTE_RATINGINFOMATION . "</legend>\n - <div style='padding: 8px;'><b>" . _AM_WFD_VOTE_TOTALVOTES . "</b>" . $totalvotes . "<br /><br />\n - "; - - printf(_AM_WFD_VOTE_REGUSERVOTES, $votesreg); - - echo "<br />"; - - printf(_AM_WFD_VOTE_ANONUSERVOTES, $votesanon); - - echo " - </div>\n - <table width='100%' cellspacing='1' cellpadding='2' class='outer'>\n - <tr>\n - <th align='center'>" . _AM_WFD_VOTE_USER . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_IP . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_RATING . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_USERAVG . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_TOTALRATE . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_DATE . "</td>\n - <th align='center'>" . _AM_WFD_MINDEX_ACTION . "</td>\n - </tr>\n - "; - - if ($votesreg == 0) - { - echo "<tr><td align='center' colspan='7' class='even'><b>" . _AM_WFD_VOTE_NOREGVOTES . "</b></td></tr>"; - } - else { - foreach (array_keys($regvotes) as $i) { - $uids[] = $regvotes[$i]->getVar('ratinguser'); - } - - $criteria = new Criteria("uid", "(".implode(',', $uids).")", "IN"); - $criteria->setGroupby("uid"); - $userratings = $rating_handler->getUserAverage($criteria); - - - foreach (array_keys($regvotes) as $i) { - $formatted_date = formatTimestamp($regvotes[$i]->getVar('ratingtimestamp'), $xoopsModuleConfig['dateformat']); - $useravgrating = isset($userratings[$regvotes[$i]->getVar('ratinguser')]) ? $userratings[$regvotes[$i]->getVar('ratinguser')]["avg"] : 0; - $uservotes = isset($userratings[$regvotes[$i]->getVar('ratinguser')]) ? $userratings[$regvotes[$i]->getVar('ratinguser')]["count"] : 0; - $ratinguname = XoopsUser :: getUnameFromId($regvotes[$i]->getVar('ratinguser')); - - echo " - <tr><td align='center' class='head'>$ratinguname</td>\n - <td align='center' class='even'>".$regvotes[$i]->getVar('ratinghostname')."</th>\n - <td align='center' class='even'>".$regvotes[$i]->getVar('rating')."</th>\n - <td align='center' class='even'>$useravgrating</th>\n - <td align='center' class='even'>$uservotes</th>\n - <td align='center' class='even'>$formatted_date</th>\n - <td align='center' class='even'>\n - <a href='".WFDOWNLOADS_URL."admin/index.php?op=delVote&lid=" . $lid . "&rid=" . $regvotes[$i]->getVar('ratingid') . "'>" . $imagearray['deleteimg'] . "</a>\n - </th></tr>\n - "; - } - } - echo " - </table>\n - <br />\n - <table width='100%' cellspacing='1' cellpadding='2' class='outer'>\n - <tr>\n - <th align='center'>" . _AM_WFD_VOTE_USER . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_IP . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_RATING . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_USERAVG . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_TOTALRATE . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_DATE . "</td>\n - <th align='center'>" . _AM_WFD_MINDEX_ACTION . "</td>\n - </tr>\n - "; - if ($votesanon == 0) - { - echo "<tr><td colspan='7' align='center' class='even'><b>" . _AM_WFD_VOTE_NOUNREGVOTES . "</b></td></tr>"; - } - else { - $criteria = new Criteria("uid", 0); - $userratings = $rating_handler->getUserAverage($criteria); - - - foreach (array_keys($regvotes) as $i) { - $formatted_date = formatTimestamp($regvotes[$i]->getVar('ratingtimestamp'), $xoopsModuleConfig['dateformat']); - $useravgrating = isset($userratings['avg']) ? $userratings["avg"] : 0; - $uservotes = isset($userratings['count']) ? $userratings["count"] : 0; - - $ratinguname = $GLOBALS['xoopsConfig']['anonymous']; - - echo " - <tr><td align='center' class='head'>$ratinguname</td>\n - <td align='center' class='even'>".$regvotes[$i]->getVar('ratinghostname')."</th>\n - <td align='center' class='even'>".$regvotes[$i]->getVar('rating')."</th>\n - <td align='center' class='even'>$useravgrating</th>\n - <td align='center' class='even'>$uservotes</th>\n - <td align='center' class='even'>$formatted_date</th>\n - <td align='center' class='even'>\n - <a href='".WFDOWNLOADS_URL."admin/index.php?op=delVote&lid=" . $lid . "&rid=" . $regvotes[$i]->getVar('ratingid') . "'>" . $imagearray['deleteimg'] . "</a>\n - </th></tr>\n - "; - } - } - echo " - </table>\n - </fieldset>\n - "; - } - xoops_cp_footer(); -} - -function delVote() -{ - global $_GET; - $rating_handler = xoops_getmodulehandler('rating'); - $rating = $rating_handler->get($_GET['rid']); - if ($rating_handler->delete($rating, true)) { - wfd_updaterating(intval($rating->getVar('lid'))); - } - redirect_header(WFDOWNLOADS_URL.'admin/index.php', 1, _AM_WFD_VOTE_VOTEDELETED); -} - -function addDownload() -{ - global $xoopsUser, $xoopsModuleConfig; - - $lid = (!empty($_POST['lid'])) ? intval($_POST['lid']) : 0; - $cid = (!empty($_POST['cid'])) ? intval($_POST['cid']) : 0; - $status = (!empty($_POST['status'])) ? intval($_POST['status']) : 2; - - $download_handler = xoops_getmodulehandler('download'); - if ($lid > 0) { - $thisIsANewRecord = false; /* Added by Lankford on 2007/3/21 */ - - $download = $download_handler->get($lid); - } - else { - $thisIsANewRecord = true; /* Added by Lankford on 2007/3/21 */ - - $download = $download_handler->create(); - } - - /** - * Define URL - */ - if (empty($_FILES['userfile']['name'])) - { - if ($_POST["url"] && $_POST["url"] != "" && $_POST["url"] != "http://") - { - $url = ($_POST["url"] != "http://") ? $_POST["url"] : ''; - $filename = ''; - $filetype = ''; - } else { - $url = ($_POST["url"] != "http://") ? $_POST["url"] : ''; - $filename = $_POST['filename']; - $filetype = $_POST['filetype']; - } - $size = ((empty($_POST["size"]) || !is_numeric($_POST["size"]))) ? 0 : intval($_POST["size"]); - $title = trim($_POST["title"]); - $download->setVar('filename', $filename); - $download->setVar('filetype', $filetype); - } - else - { - global $_FILES; - - $down = wfd_uploading($_FILES, $xoopsModuleConfig['uploaddir'], "", "index.php", 0, 0); - $url = ($_POST["url"] != "http://") ? $_POST["url"] : ''; - $size = $down['size']; - $title = $_FILES['userfile']['name']; - $ext = rtrim(strrchr($title, '.'), '.'); - $title = str_replace($ext, '', $title); - $title = (isset($_POST["title_checkbox"]) && $_POST["title_checkbox"] == 1) ? $title : trim($_POST["title"]); - - $filename = $down['filename']; - $filetype = $_FILES['userfile']['type']; - $download->setVar('filename', $filename); - $download->setVar('filetype', $filetype); - } - - /** - * Get data from form - */ - $screenshot = ($_POST["screenshot"] != "blank.png") ? $_POST["screenshot"] : ''; - $screenshot2 = ($_POST["screenshot2"] != "blank.png") ? $_POST["screenshot2"] : ''; - $screenshot3 = ($_POST["screenshot3"] != "blank.png") ? $_POST["screenshot3"] : ''; - $screenshot4 = ($_POST["screenshot4"] != "blank.png") ? $_POST["screenshot4"] : ''; - - if (!empty($_POST["homepage"]) || $_POST["homepage"] != "http://") - { - $download->setVar('homepage', trim($_POST["homepage"])); - $download->setVar('homepagetitle', trim($_POST["homepagetitle"])); - } - - $version = (!empty($_POST["version"])) ? trim($_POST["version"]) : 0; - - /* Added by Lankford on 2007/3/21 */ - // Here, I want to know if: - // a) Are they actually changing the value of version, or is it the same? - // b) Are they actually modifying the record, or is this a new one? - // If both conditions are true, then trigger all three notifications related to modified records. - if (!$thisIsANewRecord and ($download->getVar('version') != $version)) { - // Trigger the three events related to modified files (one for the file, category, and global event categories respectively) - $notification_handler = &xoops_gethandler('notification'); - $tags = array(); - $tags['FILE_NAME'] = $title; - $tags['FILE_URL'] = WFDOWNLOADS_URL.'singlefile.php?cid=' . $cid . '&lid=' . $lid; - $category_handler = xoops_getmodulehandler('category'); - $category = $category_handler->get($cid); - $tags['FILE_VERSION'] = $version; - $tags['CATEGORY_NAME'] = $category->getVar('title'); - $tags['CATEGORY_URL'] = WFDOWNLOADS_URL.'viewcat.php?cid=' . $cid; - - if ($xoopsModuleConfig['autoapprove'] == 2 || $xoopsModuleConfig['autoapprove'] == 4) - { // Then this change will be automatically approved, so the notification needs to go out. - $notification_handler->triggerEvent('global', 0, 'filemodified', $tags); - $notification_handler->triggerEvent('category', $cid, 'filemodified', $tags); - $notification_handler->triggerEvent('file', $lid, 'filemodified', $tags); - } - } - /* End add block */ - - $download->setVar('version', $version); - $download->setVar('url', $url); - $download->setVar('cid', $cid); - $download->setVar('title', $title); - $download->setVar('status', $status); - $download->setVar('size', $size); - $download->setVar('screenshot', $screenshot); - $download->setVar('screenshot2', $screenshot2); - $download->setVar('screenshot3', $screenshot3); - $download->setVar('screenshot4', $screenshot4); - $download->setVar('platform', trim($_POST["platform"])); - $download->setVar('summary', trim($_POST["summary"])); - $download->setVar('description', trim($_POST["description"])); - $download->setVar('submitter', trim($_POST["submitter"])); - $download->setVar('publisher', trim($_POST["publisher"])); - $download->setVar('price', trim($_POST["price"])); - if (!$xoopsModuleConfig['enable_mirrors']) { - $download->setVar('mirror', formatURL(trim($_POST["mirror"]))); - } - $download->setVar('license', trim($_POST["license"])); - $download->setVar('features', trim($_POST["features"])); - $download->setVar('requirements', trim($_POST["requirements"])); - $limitations = (isset($_POST["limitations"])) ? $_POST["limitations"] : ''; - $download->setVar('limitations', $limitations); - $versiontypes = (isset($_POST["versiontypes"])) ? $_POST["versiontypes"] : ''; - $download->setVar('versiontypes', $versiontypes); - - $dhistory = (isset($_POST["dhistory"])) ? $_POST["dhistory"] : ''; - $dhistoryhistory = (isset($_POST["dhistoryaddedd"])) ? $_POST["dhistoryaddedd"] : ''; - - if ($lid > 0 && !empty($dhistoryhistory)) - { - $dhistory = $dhistory . "\n\n"; - $time = time(); - $dhistory .= _AM_WFD_FILE_HISTORYVERS . $version . _AM_WFD_FILE_HISTORDATE . formatTimestamp($time, $xoopsModuleConfig['dateformat']) . "\n\n"; - $dhistory .= $dhistoryhistory; - } - $download->setVar('dhistory', $dhistory); - $download->setVar('dhistoryhistory', $dhistoryhistory); - - $updated = (isset($_POST['was_published']) && $_POST['was_published'] == 0) ? 0 : time(); - - if ($_POST['up_dated'] == 0) { - $updated = 0; - } - $download->setVar('updated', $updated); - - $offline = ($_POST['offline'] == 1) ? 1 : 0; - $download->setVar('offline', $offline); - $approved = (isset($_POST['approved']) && $_POST['approved'] == 1) ? 1 : 0; - $notifypub = (isset($_POST['notifypub']) && $_POST['notifypub'] == 1); - - $expiredate = 0; - if (!$lid) - { - $publishdate = time(); - } - else - { - $publishdate = $_POST['was_published']; - $expiredate = $_POST['was_expired']; - } - - if ($approved == 1 && empty($publishdate)) - { - $publishdate = time(); - } - - if (isset($_POST['publishdateactivate'])) - { - $publishdate = strtotime($_POST['published']['date']) + $_POST['published']['time']; - } - if ($_POST['clearpublish']) - { - $publishdate = $download->getVar('published'); - } - - if (isset($_POST['expiredateactivate'])) - { - $expiredate = strtotime($_POST['expired']['date']) + $_POST['expired']['time']; - } - if ($_POST['clearexpire']) - { - $expiredate = '0'; - } - - $download->setVar('expired', $expiredate); - $download->setVar('published', $publishdate); - $download->setVar('date', time()); - /** - * Update or insert download data into database - */ - if (!$lid) - { - $download->setVar('ipaddress', $_SERVER['REMOTE_ADDR']); - } - - - // added - start - March 4 2006 - jpc - $category_handler = xoops_getmodulehandler('category'); - $category = $category_handler->get($cid); - $fid = $category->getVar('formulize_fid'); - if($fid) { - global $xoopsUser; - include_once XOOPS_ROOT_PATH . "/modules/formulize/include/formread.php"; - include_once XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php"; - - $formulize_mgr =& xoops_getmodulehandler('elements', 'formulize'); - - if ($lid) { - $entries[$fid][0] = $download->getVar('formulize_idreq'); - if($entries[$fid][0]) { - $owner = getEntryOwner($entries[$fid][0]); - } else { - print "no idreq"; - $entries[$fid][0] = ""; - $owner = ""; - } - $cid = $download->getVar('cid'); - } else { - $entries[$fid][0] = ""; - $owner = ""; - } - $member_handler =& xoops_gethandler('member'); - $owner_groups =& $member_handler->getGroupsByUser($owner, FALSE); - $uid = !empty($xoopsUser) ? $xoopsUser->getVar('uid') : 0; - $groups = $xoopsUser ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS); - $entries = handleSubmission($formulize_mgr, $entries, $uid, $owner, $fid, $owner_groups, $groups, "new"); // "new" causes xoops token check to be skipped, since WF-downloads should be doing that - - //if (!$lid) - if(!$owner) - { - $id_req = $entries[$fid][0]; - $download->setVar('formulize_idreq', $id_req); - } - } - // added - end - March 4 2006 - jpc - - - $download_handler->insert($download); - $newid = intval($download->getVar('lid')); - /** - * Send notifications - */ - if (!$lid) - { - $tags = array(); - $tags['FILE_NAME'] = $title; - $tags['FILE_URL'] = WFDOWNLOADS_URL.'singlefile.php?cid=' . $cid . '&lid=' . $newid; - - // changed - start - March 4 2006 - jpc - //$category_handler = xoops_getmodulehandler('category'); - //$category = $category_handler->get($cid); - // changed - end - March 4 2006 - jpc - $tags['CATEGORY_NAME'] = $category->getVar('title'); - $tags['CATEGORY_URL'] = WFDOWNLOADS_URL.'viewcat.php?cid=' . $cid; - $notification_handler = & xoops_gethandler('notification'); - $notification_handler -> triggerEvent('global', 0, 'new_file', $tags); - $notification_handler -> triggerEvent('category', $cid, 'new_file', $tags); - } - if ($lid && $approved && $notifypub) - { - $tags = array(); - $tags['FILE_NAME'] = $title; - $tags['FILE_URL'] = WFDOWNLOADS_URL.'singlefile.php?cid=' . $cid . '&lid=' . $lid; - $category_handler = xoops_getmodulehandler('category'); - $category = $category_handler->get($cid); - $tags['CATEGORY_NAME'] = $category->getVar('title'); - $tags['CATEGORY_URL'] = WFDOWNLOADS_URL.'viewcat.php?cid=' . $cid; - $notification_handler = & xoops_gethandler('notification'); - $notification_handler -> triggerEvent('global', 0, 'new_file', $tags); - $notification_handler -> triggerEvent('category', $cid, 'new_file', $tags); - $notification_handler -> triggerEvent('file', $lid, 'approve', $tags); - } - $message = (!$lid) ? _AM_WFD_FILE_NEWFILEUPLOAD : _AM_WFD_FILE_FILEMODIFIEDUPDATE ; - $message = ($lid && !$_POST['was_published'] && $approved) ? _AM_WFD_FILE_FILEAPPROVED : $message; - - redirect_header(WFDOWNLOADS_URL.'admin/index.php', 1, $message); -} -// Page start here - -$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : 'main'; - -switch ($op) -{ - case "addDownload": - addDownload(); - break; - - case "Download": - Download(); - break; - - case "delDownload": - - global $xoopsModule, $xoopsModuleConfig; - $confirm = (isset($_REQUEST['confirm'])) ? 1 : 0; - $lid = (isset($_GET['lid'])) ? intval($_GET['lid']) : 0; - $lid = (isset($_POST['lid'])) ? intval($_POST['lid']) : $lid; - $download_handler = xoops_getmodulehandler('download'); - $download = $download_handler->get($lid); - $title = $download->getVar('title'); - if ($confirm) - { - $file = $xoopsModuleConfig['uploaddir'] . "/" . $download->getVar('filename'); - if (is_file($file)) - { - @chmod($file, 0777); - @unlink($file); - } - $download_handler->delete($download); - redirect_header(WFDOWNLOADS_URL.'admin/index.php', 1, sprintf(_AM_WFD_FILE_FILEWASDELETED, $title)); - exit(); - } - else - { - wfdownloads_xoops_cp_header(); - xoops_confirm(array('op' => 'delDownload', 'lid' => $lid, 'confirm' => 1, 'title' => $title), 'index.php', _AM_WFD_FILE_REALLYDELETEDTHIS . "<br /><br>" . $title, _DELETE); - xoops_cp_footer(); - } - break; - case "delVote": - delVote(); - break; - - // added - start - March 4 2006 - jpc - case "patch_formulize": - patch_formulize(); - break; - // added - end - March 4 2006 - jpc - case 'main': - default: - - global $xoopsUser, $xoopsDB, $xoopsConfig; - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; - $start = isset($_GET['start']) ? intval($_GET['start']) : 0; - $start1 = isset($_GET['start1']) ? intval($_GET['start1']) : 0; - $start2 = isset($_GET['start2']) ? intval($_GET['start2']) : 0; - $start3 = isset($_GET['start3']) ? intval($_GET['start3']) : 0; - $start4 = isset($_GET['start4']) ? intval($_GET['start4']) : 0; - $totalcats = wfd_totalcategory(); - - $report_handler = xoops_getmodulehandler('report'); - $review_handler = xoops_getmodulehandler('review'); - $mirror_handler = xoops_getmodulehandler('mirror'); - $modification_handler = xoops_getmodulehandler('modification'); - $download_handler = xoops_getmodulehandler('download'); - - $totalbrokendownloads = $report_handler->getCount(); - $totalmodrequests = $modification_handler->getCount(); - $newreviews = $review_handler->getCount(); - $newmirrors = $mirror_handler->getCount(); - $totalnewdownloads = $download_handler->getCount(new Criteria("published", 0)); - $totaldownloads = $download_handler->getCount(new Criteria("published", 0, ">")); - - wfdownloads_xoops_cp_header(); - wfdownloads_adminMenu(0, _AM_WFD_BINDEX); - - echo " - <fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_WFD_MINDEX_DOWNSUMMARY . "</legend>\n - <div style='padding: 8px;'><small>\n - <a href='category.php'>" . _AM_WFD_SCATEGORY . "</a><b>" . $totalcats . "</b> | \n - <a href='index.php'>" . _AM_WFD_SFILES . "</a><b>" . $totaldownloads . "</b> | \n - <a href='newdownloads.php'>" . _AM_WFD_SNEWFILESVAL . "</a><b>" . $totalnewdownloads . "</b> | \n - <a href='modifications.php'>" . _AM_WFD_SMODREQUEST . "</a><b>" . $totalmodrequests . "</b> | \n - <a href='brokendown.php'>" . _AM_WFD_SBROKENSUBMIT . "</a><b>" . $totalbrokendownloads . "</b> | \n - <a href='review.php'>" . _AM_WFD_SREVIEWS . "</a><b>" . $newreviews . "</b> | \n - <a href='mirror.php'>" . _AM_WFD_SMIRRORS . "</a><b>" . $newmirrors . "</b>\n - </small></div></fieldset><br />\n - "; - wfd_serverstats(); - - if ($totaldownloads > 0) - { - $criteria = new CriteriaCompo(); - $criteria->setLimit($xoopsModuleConfig['admin_perpage']); - $criteria->setStart($start); - $criteria->setSort("published"); - $criteria->setOrder("DESC"); - $published_array = $download_handler->getActiveDownloads($criteria); - $published_array_count = $download_handler->getActiveCount(); - - wfd_downlistheader(_AM_WFD_MINDEX_PUBLISHEDDOWN); - if ($published_array_count > 0) - { - foreach (array_keys($published_array) as $i) - { - wfd_downlistbody($published_array[$i]->toArray()); - } - } - else - { - wfd_downlistfooter(); - } - wfd_downlistpagenav($published_array_count, $start, 'art'); - /** - * Auto Publish - */ - $criteria = new Criteria("published", time(), ">"); - $auto_publish_count = $download_handler->getCount($criteria); - $criteria->setSort("published"); - $criteria->setOrder("ASC"); - $criteria->setLimit($xoopsModuleConfig['admin_perpage']); - $criteria->setStart($start2); - $auto_published_array = $download_handler->getObjects($criteria); - - wfd_downlistheader(_AM_WFD_MINDEX_AUTOPUBLISHEDDOWN); - if ($auto_publish_count > 0) - { - foreach (array_keys($auto_published_array) as $i) - { - wfd_downlistbody($auto_published_array[$i]->toArray()); - } - } - else - { - wfd_downlistfooter(); - } - wfd_downlistpagenav($auto_publish_count, $start2, 'art2'); - /** - * Expired downloads - */ - $criteria = new CriteriaCompo(); - $criteria->add(new Criteria("expired", time(), "<"), 'AND'); - $criteria->add(new Criteria("expired", 0, "<>"), 'AND'); - $expired_count = $download_handler->getCount($criteria); - $criteria->setSort("expired"); - $criteria->setOrder("ASC"); - $criteria->setLimit($xoopsModuleConfig['admin_perpage']); - $criteria->setStart($start3); - $expired_array = $download_handler->getObjects($criteria); - - wfd_downlistheader("Expired"); - if ($expired_count > 0) - { - foreach (array_keys($expired_array) as $i) - { - wfd_downlistbody($expired_array[$i]->toArray()); - } - } - else - { - wfd_downlistfooter(); - } - wfd_downlistpagenav($expired_count, $start3, 'art3'); - /** - * Offline download - */ - - $criteria = new Criteria("offline", 1); - $offline_count = $download_handler->getCount($criteria); - $criteria->setSort("published"); - $criteria->setOrder("ASC"); - $criteria->setLimit($xoopsModuleConfig['admin_perpage']); - $criteria->setStart($start4); - $offline_array = $download_handler->getObjects($criteria); - - wfd_downlistheader(_AM_WFD_MINDEX_OFFLINEDOWN); - if ($offline_count > 0) - { - foreach (array_keys($offline_array) as $i) - { - wfd_downlistbody($offline_array[$i]->toArray()); - } - } - else - { - wfd_downlistfooter(); - } - wfd_downlistpagenav($offline_count, $start4, 'art4'); - } - xoops_cp_footer(); - break; -} - - - -// added - start - March 4 2006 - jpc -function patch_formulize() -{ - if(!isset($_POST['patch_formulize'])) { - print "<form action=\"index.php?op=patch_formulize\" method=post>"; - print "<input type = submit name=patch_formulize value=\"Apply Patch for Formulize\">"; - print "</form>"; - } else { - global $xoopsDB; - - $sqls[] = "ALTER TABLE " . $xoopsDB->prefix("wfdownloads_cat") . " ADD formulize_fid int(5) NOT NULL default '0';"; - $sqls[] = "ALTER TABLE " . $xoopsDB->prefix("wfdownloads_downloads") . " ADD formulize_idreq int(5) NOT NULL default '0';"; - - foreach($sqls as $sql) - if(!$result = $xoopsDB->queryF($sql)) - exit("Error patching for Formulize.<br>SQL dump:<br>" . $sql . "<br>Please contact <a href=su...@fr...>Freeform Solutions</a> for assistance."); - - print "Patching for Formulize completed."; - } -} -// added - end - March 4 2006 - jpc -?> \ 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 $ + */ + + +require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; +include_once dirname(__FILE__) . '/admin_header.php'; + +xoops_cp_header(); +$indexAdmin = new ModuleAdmin(); + +//-------------------------- +$report_handler = xoops_getmodulehandler('report'); + $review_handler = xoops_getmodulehandler('review'); + $mirror_handler = xoops_getmodulehandler('mirror'); + $modification_handler = xoops_getmodulehandler('modification'); + $download_handler = xoops_getmodulehandler('download'); + + +$totalcats = wfd_totalcategory(); + $totalbrokendownloads = $report_handler->getCount(); + $totalmodrequests = $modification_handler->getCount(); + $newreviews = $review_handler->getCount(); + $newmirrors = $mirror_handler->getCount(); + $totalnewdownloads = $download_handler->getCount(new Criteria("published", 0)); + $totaldownloads = $download_handler->getCount(new Criteria("published", 0, ">")); + +$indexAdmin->addInfoBox(_AM_WFD_MINDEX_DOWNSUMMARY); + +if ($totalcats > 0) { + $indexAdmin->addInfoBoxLine( + _AM_WFD_MINDEX_DOWNSUMMARY, "<infolabel>" . '<a href="category.php">' . _AM_WFD_SCATEGORY . '</a><b>' + . "</infolabel>", $totalcats, 'Green' + ); +} else { + $indexAdmin->addInfoBoxLine( + _AM_WFD_MINDEX_DOWNSUMMARY, "<infolabel>" . _AM_WFD_SCATEGORY . "</infolabel>", $totalcats, 'Green' + ); +} + +if ($totaldownloads > 0) { + $indexAdmin->addInfoBoxLine( + _AM_WFD_MINDEX_DOWNSUMMARY, "<infolabel>" . '<a href="main.php">' . _AM_WFD_SFILES . '</a><b>' + . "</infolabel>", $totaldownloads, 'Green' + ); +} else { + $indexAdmin->addInfoBoxLine( + _AM_WFD_MINDEX_DOWNSUMMARY, "<infolabel>" . _AM_WFD_SFILES . "</infolabel>", $totaldownloads, 'Green' + ); +} + +if ($totalnewdownloads > 0) { + $indexAdmin->addInfoBoxLine( + _AM_WFD_MINDEX_DOWNSUMMARY, "<infolabel>" . '<a href="newdownloads.php">' . _AM_WFD_SNEWFILESVAL . '</a><b>' + . "</infolabel>", $totalnewdownloads, 'Green' + ); +} else { + $indexAdmin->addInfoBoxLine( + _AM_WFD_MINDEX_DOWNSUMMARY, "<infolabel>" . _AM_WFD_SNEWFILESVAL . "</infolabel>", $totalnewdownloads, 'Green' + ); +} + +if ($totalmodrequests > 0) { + $indexAdmin->addInfoBoxLine( + _AM_WFD_MINDEX_DOWNSUMMARY, "<infolabel>" . '<a href="modifications.php">' . _AM_WFD_SMODREQUEST . '</a><b>' + . "</infolabel>", $totalmodrequests, 'Green' + ); +} else { + $indexAdmin->addInfoBoxLine( + _AM_WFD_MINDEX_DOWNSUMMARY, "<infolabel>" . _AM_WFD_SMODREQUEST . "</infolabel>", $totalmodrequests, 'Green' + ); +} + +if ($totalbrokendownloads > 0) { + $indexAdmin->addInfoBoxLine( + _AM_WFD_MINDEX_DOWNSUMMARY, "<infolabel>" . '<a href="brokendown.php">' . _AM_WFD_SBROKENSUBMIT . '</a><b>' + . "</infolabel>", $totalbrokendownloads, 'Green' + ); +} else { + $indexAdmin->addInfoBoxLine( + _AM_WFD_MINDEX_DOWNSUMMARY, "<infolabel>" . _AM_WFD_SBROKENSUBMIT . "</infolabel>", $totalbrokendownloads, 'Green' + ); +} + +if ($newreviews > 0) { + $indexAdmin->addInfoBoxLine( + _AM_WFD_MINDEX_DOWNSUMMARY, "<infolabel>" . '<a href="review.php">' . _AM_WFD_SREVIEWS . '</a><b>' + . "</infolabel>", $newreviews, 'Green' + ); +} else { + $indexAdmin->addInfoBoxLine( + _AM_WFD_MINDEX_DOWNSUMMARY, "<infolabel>" . ... [truncated message content] |
From: <be...@us...> - 2012-07-31 22:41:48
|
Revision: 9966 http://xoops.svn.sourceforge.net/xoops/?rev=9966&view=rev Author: beckmi Date: 2012-07-31 22:41:41 +0000 (Tue, 31 Jul 2012) Log Message: ----------- Adding version 3.2 RC2 to Releases Added Paths: ----------- XoopsModules/wfdownloads/releases/3.2_RC2/wfdownloads/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2012-07-31 22:38:57
|
Revision: 9965 http://xoops.svn.sourceforge.net/xoops/?rev=9965&view=rev Author: beckmi Date: 2012-07-31 22:38:46 +0000 (Tue, 31 Jul 2012) Log Message: ----------- Adding Wf-Downloads 3.2 RC2 Added Paths: ----------- XoopsModules/wfdownloads/releases/3.2_RC2/ XoopsModules/wfdownloads/trunk/wfdownloads/admin/ XoopsModules/wfdownloads/trunk/wfdownloads/admin/about.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/brokendown.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/category.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/cookies.js XoopsModules/wfdownloads/trunk/wfdownloads/admin/funcs.js XoopsModules/wfdownloads/trunk/wfdownloads/admin/import.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/index.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/indexpage.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/ip_log.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/menu.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/mimetypes.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/mirror.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/modifications.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/newdownloads.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/newstory.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/permissions.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/review.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/update.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/upload.php XoopsModules/wfdownloads/trunk/wfdownloads/admin/votedata.php XoopsModules/wfdownloads/trunk/wfdownloads/blocks/ XoopsModules/wfdownloads/trunk/wfdownloads/blocks/index.html XoopsModules/wfdownloads/trunk/wfdownloads/blocks/wfdownloads_top.php XoopsModules/wfdownloads/trunk/wfdownloads/blocks/wfdownloads_top_by_cat.php XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php XoopsModules/wfdownloads/trunk/wfdownloads/changelog.txt XoopsModules/wfdownloads/trunk/wfdownloads/class/ XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php XoopsModules/wfdownloads/trunk/wfdownloads/class/dbupdater.php XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php XoopsModules/wfdownloads/trunk/wfdownloads/class/img_uploader.php XoopsModules/wfdownloads/trunk/wfdownloads/class/index.html XoopsModules/wfdownloads/trunk/wfdownloads/class/ip_log.php XoopsModules/wfdownloads/trunk/wfdownloads/class/mimetype.php XoopsModules/wfdownloads/trunk/wfdownloads/class/mirror.php XoopsModules/wfdownloads/trunk/wfdownloads/class/modification.php XoopsModules/wfdownloads/trunk/wfdownloads/class/object.php XoopsModules/wfdownloads/trunk/wfdownloads/class/rating.php XoopsModules/wfdownloads/trunk/wfdownloads/class/report.php XoopsModules/wfdownloads/trunk/wfdownloads/class/review.php XoopsModules/wfdownloads/trunk/wfdownloads/class/uploader.php XoopsModules/wfdownloads/trunk/wfdownloads/class/wfd_lists.php XoopsModules/wfdownloads/trunk/wfdownloads/comment_delete.php XoopsModules/wfdownloads/trunk/wfdownloads/comment_edit.php XoopsModules/wfdownloads/trunk/wfdownloads/comment_new.php XoopsModules/wfdownloads/trunk/wfdownloads/comment_post.php XoopsModules/wfdownloads/trunk/wfdownloads/comment_reply.php XoopsModules/wfdownloads/trunk/wfdownloads/docs/ XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/ XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__about.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__changelog.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__credits.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__disclaimer.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__history.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__import.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__important_notes_v3.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__install.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__langchanges.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__license.txt XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__menu.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__support.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__update_wfd.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__update_wfd2x_or_wfd30x_to_310.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__update_wfd310rc1_to_rc2.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/__version.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/language_changes.txt XoopsModules/wfdownloads/trunk/wfdownloads/docs/english/readme.html XoopsModules/wfdownloads/trunk/wfdownloads/docs/index.html XoopsModules/wfdownloads/trunk/wfdownloads/footer.php XoopsModules/wfdownloads/trunk/wfdownloads/header.php XoopsModules/wfdownloads/trunk/wfdownloads/images/ XoopsModules/wfdownloads/trunk/wfdownloads/images/bg.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/brokenimg.png XoopsModules/wfdownloads/trunk/wfdownloads/images/category/ XoopsModules/wfdownloads/trunk/wfdownloads/images/category/blank.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/category/index.html XoopsModules/wfdownloads/trunk/wfdownloads/images/category/thumbs/ XoopsModules/wfdownloads/trunk/wfdownloads/images/category/thumbs/index.html XoopsModules/wfdownloads/trunk/wfdownloads/images/down.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/ XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/approve.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/arrow.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/close12.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/delete.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/disabled.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/down.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/download.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/download1.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/download2.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/download3.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/download4.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/downloads.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/downloads02.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/downloads03.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/edit.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/forum.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/ignore.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/index.html XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/newred.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/off.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/on.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/open12.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/pop.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rate0.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rate1.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rate2.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rate3.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rate4.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rate5.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/reviews.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rss.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/update.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/index.html XoopsModules/wfdownloads/trunk/wfdownloads/images/left_both.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/loadingAnimation.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/logo-en.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/logo.png XoopsModules/wfdownloads/trunk/wfdownloads/images/macFFBgHack.png XoopsModules/wfdownloads/trunk/wfdownloads/images/module_logo.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/right_both.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/screenshots/ XoopsModules/wfdownloads/trunk/wfdownloads/images/screenshots/blank.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/screenshots/imonfire.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/screenshots/index.html XoopsModules/wfdownloads/trunk/wfdownloads/images/screenshots/thumbs/ XoopsModules/wfdownloads/trunk/wfdownloads/images/screenshots/thumbs/140x79_imonfire.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/screenshots/thumbs/index.html XoopsModules/wfdownloads/trunk/wfdownloads/images/size2.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/up.gif XoopsModules/wfdownloads/trunk/wfdownloads/images/wfdl_slogo.png XoopsModules/wfdownloads/trunk/wfdownloads/include/ XoopsModules/wfdownloads/trunk/wfdownloads/include/comment_functions.php XoopsModules/wfdownloads/trunk/wfdownloads/include/common.php XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php XoopsModules/wfdownloads/trunk/wfdownloads/include/index.html XoopsModules/wfdownloads/trunk/wfdownloads/include/js/ XoopsModules/wfdownloads/trunk/wfdownloads/include/js/index.html XoopsModules/wfdownloads/trunk/wfdownloads/include/js/jquery-latest.js XoopsModules/wfdownloads/trunk/wfdownloads/include/js/thickbox-compressed.js XoopsModules/wfdownloads/trunk/wfdownloads/include/notification.inc.php XoopsModules/wfdownloads/trunk/wfdownloads/include/search.inc.php XoopsModules/wfdownloads/trunk/wfdownloads/include/update.php XoopsModules/wfdownloads/trunk/wfdownloads/index.php XoopsModules/wfdownloads/trunk/wfdownloads/language/ XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/ XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/admin.php XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/blocks.php XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/index.html XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/mail_template/ XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/mail_template/category_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/mail_template/category_filesubmit_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/mail_template/category_newfile_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/mail_template/file_approve_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/mail_template/file_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/mail_template/filebroken_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/mail_template/global_filebroken_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/mail_template/global_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/mail_template/global_filemodify_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/mail_template/global_filesubmit_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/mail_template/global_newcategory_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/mail_template/global_newfile_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/mail_template/index.html XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/main.php XoopsModules/wfdownloads/trunk/wfdownloads/language/danish/modinfo.php XoopsModules/wfdownloads/trunk/wfdownloads/language/english/ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php XoopsModules/wfdownloads/trunk/wfdownloads/language/english/blocks.php XoopsModules/wfdownloads/trunk/wfdownloads/language/english/index.html XoopsModules/wfdownloads/trunk/wfdownloads/language/english/mail_template/ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/mail_template/category_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/english/mail_template/category_filesubmit_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/english/mail_template/category_newfile_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/english/mail_template/file_approve_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/english/mail_template/file_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/english/mail_template/filebroken_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/english/mail_template/global_filebroken_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/english/mail_template/global_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/english/mail_template/global_filemodify_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/english/mail_template/global_filesubmit_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/english/mail_template/global_newcategory_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/english/mail_template/global_newfile_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/english/mail_template/index.html XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php XoopsModules/wfdownloads/trunk/wfdownloads/language/french/ XoopsModules/wfdownloads/trunk/wfdownloads/language/french/admin.php XoopsModules/wfdownloads/trunk/wfdownloads/language/french/blocks.php XoopsModules/wfdownloads/trunk/wfdownloads/language/french/index.html XoopsModules/wfdownloads/trunk/wfdownloads/language/french/mail_template/ XoopsModules/wfdownloads/trunk/wfdownloads/language/french/mail_template/category_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/french/mail_template/category_filesubmit_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/french/mail_template/category_newfile_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/french/mail_template/file_approve_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/french/mail_template/file_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/french/mail_template/filebroken_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/french/mail_template/global_filebroken_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/french/mail_template/global_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/french/mail_template/global_filemodify_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/french/mail_template/global_filesubmit_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/french/mail_template/global_newcategory_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/french/mail_template/global_newfile_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/french/mail_template/index.html XoopsModules/wfdownloads/trunk/wfdownloads/language/french/main.php XoopsModules/wfdownloads/trunk/wfdownloads/language/french/modinfo.php XoopsModules/wfdownloads/trunk/wfdownloads/language/german/ XoopsModules/wfdownloads/trunk/wfdownloads/language/german/admin.php XoopsModules/wfdownloads/trunk/wfdownloads/language/german/blocks.php XoopsModules/wfdownloads/trunk/wfdownloads/language/german/index.html XoopsModules/wfdownloads/trunk/wfdownloads/language/german/mail_template/ XoopsModules/wfdownloads/trunk/wfdownloads/language/german/mail_template/category_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/german/mail_template/category_filesubmit_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/german/mail_template/category_newfile_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/german/mail_template/file_approve_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/german/mail_template/file_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/german/mail_template/filebroken_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/german/mail_template/global_filebroken_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/german/mail_template/global_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/german/mail_template/global_filemodify_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/german/mail_template/global_filesubmit_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/german/mail_template/global_newcategory_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/german/mail_template/global_newfile_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/german/mail_template/index.html XoopsModules/wfdownloads/trunk/wfdownloads/language/german/main.php XoopsModules/wfdownloads/trunk/wfdownloads/language/german/modinfo.php XoopsModules/wfdownloads/trunk/wfdownloads/language/index.html XoopsModules/wfdownloads/trunk/wfdownloads/language/persian/ XoopsModules/wfdownloads/trunk/wfdownloads/language/persian/admin.php XoopsModules/wfdownloads/trunk/wfdownloads/language/persian/blocks.php XoopsModules/wfdownloads/trunk/wfdownloads/language/persian/index.html XoopsModules/wfdownloads/trunk/wfdownloads/language/persian/mail_template/ XoopsModules/wfdownloads/trunk/wfdownloads/language/persian/mail_template/category_filesubmit_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/persian/mail_template/category_newfile_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/persian/mail_template/file_approve_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/persian/mail_template/filebroken_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/persian/mail_template/global_filebroken_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/persian/mail_template/global_filemodify_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/persian/mail_template/global_filesubmit_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/persian/mail_template/global_newcategory_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/persian/mail_template/global_newfile_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/persian/mail_template/index.html XoopsModules/wfdownloads/trunk/wfdownloads/language/persian/main.php XoopsModules/wfdownloads/trunk/wfdownloads/language/persian/modinfo.php XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/ XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/admin.php XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/blocks.php XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/credits.txt XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/index.html XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/mail_template/ XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/mail_template/category_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/mail_template/category_filesubmit_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/mail_template/category_newfile_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/mail_template/file_approve_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/mail_template/file_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/mail_template/filebroken_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/mail_template/global_filebroken_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/mail_template/global_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/mail_template/global_filemodify_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/mail_template/global_filesubmit_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/mail_template/global_newcategory_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/mail_template/global_newfile_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/mail_template/index.html XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/main.php XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr/modinfo.php XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/ XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/admin.php XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/blocks.php XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/credits.txt XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/index.html XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/mail_template/ XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/mail_template/category_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/mail_template/category_filesubmit_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/mail_template/category_newfile_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/mail_template/file_approve_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/mail_template/file_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/mail_template/filebroken_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/mail_template/global_filebroken_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/mail_template/global_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/mail_template/global_filemodify_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/mail_template/global_filesubmit_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/mail_template/global_newcategory_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/mail_template/global_newfile_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/mail_template/index.html XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/main.php XoopsModules/wfdownloads/trunk/wfdownloads/language/portuguesebr_utf-8/modinfo.php XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/ XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/admin.php XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/blocks.php XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/index.html XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/mail_template/ XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/mail_template/category_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/mail_template/category_filesubmit_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/mail_template/category_newfile_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/mail_template/file_approve_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/mail_template/file_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/mail_template/filebroken_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/mail_template/global_filebroken_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/mail_template/global_filemodified_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/mail_template/global_filemodify_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/mail_template/global_filesubmit_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/mail_template/global_newcategory_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/mail_template/global_newfile_notify.tpl XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/mail_template/index.html XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/main.php XoopsModules/wfdownloads/trunk/wfdownloads/language/spanish/modinfo.php XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php XoopsModules/wfdownloads/trunk/wfdownloads/module.css XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php XoopsModules/wfdownloads/trunk/wfdownloads/notification_update.php XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php XoopsModules/wfdownloads/trunk/wfdownloads/readme.txt XoopsModules/wfdownloads/trunk/wfdownloads/review.php XoopsModules/wfdownloads/trunk/wfdownloads/rss.php XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php XoopsModules/wfdownloads/trunk/wfdownloads/sql/ XoopsModules/wfdownloads/trunk/wfdownloads/sql/index.html XoopsModules/wfdownloads/trunk/wfdownloads/sql/wfdownloads.sql XoopsModules/wfdownloads/trunk/wfdownloads/submit.php XoopsModules/wfdownloads/trunk/wfdownloads/templates/ XoopsModules/wfdownloads/trunk/wfdownloads/templates/blocks/ XoopsModules/wfdownloads/trunk/wfdownloads/templates/blocks/index.html XoopsModules/wfdownloads/trunk/wfdownloads/templates/blocks/wfdownloads_block_new.html XoopsModules/wfdownloads/trunk/wfdownloads/templates/blocks/wfdownloads_block_top.html XoopsModules/wfdownloads/trunk/wfdownloads/templates/blocks/wfdownloads_block_top_by_cat.html XoopsModules/wfdownloads/trunk/wfdownloads/templates/index.html XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_admin_menu.html XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_brokenfile.html XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_disclaimer.html XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_footer.html XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_header.html XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_index.html XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_mirrors.html XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_newlistindex.html XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_ratefile.html XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_reviews.html XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_topten.html XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_viewcat.html XoopsModules/wfdownloads/trunk/wfdownloads/thickbox.css XoopsModules/wfdownloads/trunk/wfdownloads/topten.php XoopsModules/wfdownloads/trunk/wfdownloads/uploads/ XoopsModules/wfdownloads/trunk/wfdownloads/uploads/index.html XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php XoopsModules/wfdownloads/trunk/wfdownloads/visit.php XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php Removed Paths: ------------- XoopsModules/wfdownloads/releases/3.2/ Added: XoopsModules/wfdownloads/trunk/wfdownloads/admin/about.php =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/admin/about.php (rev 0) +++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/about.php 2012-07-31 22:38:46 UTC (rev 9965) @@ -0,0 +1,102 @@ +<?php +/** + * $Id: about.php,v 1.6 2007/08/10 20:59:33 m0nty_ Exp $ + * Module: WF-Downloads + * Version: v2.0.5a + * Release Date: 26 july 2004 + * Author: WF-Sections + * Licence: GNU + */ + +include 'admin_header.php'; +$myts = & MyTextSanitizer :: getInstance(); + +global $xoopsModule; + +wfdownloads_xoops_cp_header(); + +$versioninfo =& $xoopsModule; + +wfdownloads_adminMenu(-1, _AM_WFD_ABOUT); +// Left headings... + echo " + <img src='" . XOOPS_URL . "/modules/wfdownloads/" . $versioninfo -> getInfo('image') . "' alt='' title='' hspace='10' vspace='0' /></a>\n + <div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $versioninfo -> getInfo('name') . " version " . $versioninfo -> getInfo('version') . "</div>\n + <div>\n"; +if ($versioninfo -> getInfo('author_realname') != '') +{ + $author_name = $versioninfo -> getInfo('author'); +} +else +{ + $author_name = $versioninfo -> getInfo('author'); +} + echo " + </div>\n + <div>" . _MI_WFD_RELEASE . " " . $versioninfo -> getInfo('releasedate') . "</div>\n + <div>" . _AM_WFD_BY . " " . $author_name . "</div>\n + <div>" . $versioninfo -> getInfo('license') . "</div><br />\n"; +// Author Information +$sform = new XoopsThemeForm(_MI_WFD_AUTHOR_INFO, "", ""); + +$sform -> addElement(new XoopsFormLabel(_MI_WFD_AUTHOR_NAME, $author_name)); + +$sform -> addElement(new XoopsFormLabel(_MI_WFD_AUTHOR_WEBSITE, "<a href='" . $versioninfo -> getInfo('author_website_url') . "' target='_blank'>" . $versioninfo -> getInfo('author_website_name') . "</a>")); + +$sform -> addElement(new XoopsFormLabel(_MI_WFD_AUTHOR_EMAIL, "<a href='mailto:" . $versioninfo -> getInfo('author_email') . "'>" . $versioninfo -> getInfo('author_email') . "</a>")); + +$sform -> addElement(new XoopsFormLabel(_MI_WFD_AUTHOR_DEVTEAM, $versioninfo -> getInfo('teammembers'))); +$sform -> display(); +// Author Information +$sform = new XoopsThemeForm(_MI_WFD_MODULE_INFO, "", ""); + +$sform -> addElement(new XoopsFormLabel(_MI_WFD_MODULE_STATUS, $versioninfo -> getInfo('status'))); + +//$sform -> addElement(new XoopsFormLabel(_MI_WFD_MODULE_DEMO, "<a href='" . $versioninfo -> getInfo('support_site_url') . "' target='_blank'>" . $versioninfo -> getInfo('support_site_name') . "</a>")); + +$sform -> addElement(new XoopsFormLabel(_MI_WFD_MODULE_SUPPORT, "<a href='" . $versioninfo -> getInfo('support_site_url') . "' target='_blank'>" . $versioninfo -> getInfo('support_site_name') . "</a>")); + +$sform -> addElement(new XoopsFormLabel(_MI_WFD_MODULE_BUG, "<a href='" . $versioninfo -> getInfo('submit_bug') . "' target='_blank'>" . "Submit a Bug" . "</a>")); + +$sform -> addElement(new XoopsFormLabel(_MI_WFD_MODULE_FEATURE, "<a href='" . $versioninfo -> getInfo('submit_feature') . "' target='_blank'>" . "Request a new feature" . "</a>")); +$sform -> display(); +// Author Information + +$sform = new XoopsThemeForm(_MI_WFD_MODULE_DISCLAIMER, "", ""); +ob_start(); +echo "<div class='even'>" . $versioninfo -> getInfo('warning') . "</div>"; +$sform -> addElement(new XoopsFormLabel('', ob_get_contents(), 0)); +ob_end_clean(); +$sform -> display(); + +$sform = new XoopsThemeForm(_MI_WFD_AUTHOR_CREDITS, "", ""); +ob_start(); +echo "<div class='even'>" . $versioninfo -> getInfo('author_credits') . "</div>"; +$sform -> addElement(new XoopsFormLabel('', ob_get_contents(), 0)); +ob_end_clean(); +$sform -> display(); + +global $myts; + +$file = '../changelog.txt'; +if (@file_exists($file)) +{ + $fp = @fopen($file, "r"); + $bugtext = @fread($fp, filesize($file)); + @fclose($file); +} + +$sform = new XoopsThemeForm(_MI_WFD_AUTHOR_BUGFIXES, "", ""); +ob_start(); +echo "<div class='even'>".$myts->displayTarea($bugtext, true)."</div>"; +$sform -> addElement(new XoopsFormLabel('', ob_get_contents(), 0)); +ob_end_clean(); +$sform -> display(); +unset($file); + + echo " + <div align = 'center'>" . _MI_WFD_COPYRIGHTIMAGE . "</div>\n + "; +xoops_cp_footer(); + +?> \ No newline at end of file Added: XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php (rev 0) +++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php 2012-07-31 22:38:46 UTC (rev 9965) @@ -0,0 +1,38 @@ +<?php +/** + * $Id: admin_header.php,v 1.5 2007/08/10 20:59:33 m0nty_ Exp $ + * Module: WF-Downloads + * Version: v2.0.5a + * Release Date: 26 july 2004 + * Author: WF-Sections + * Licence: GNU + */ + +include '../../../include/cp_header.php'; +include_once(XOOPS_ROOT_PATH . '/modules/wfdownloads/include/functions.php'); +include_once(XOOPS_ROOT_PATH . '/modules/wfdownloads/include/common.php'); + +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + +$myts = &MyTextSanitizer::getInstance(); + +$imagearray = array( + 'editimg' => "<img src='../images/icon/edit.gif' alt='" . _AM_WFD_ICO_EDIT . "' title='" . _AM_WFD_ICO_EDIT . "' align='middle'>", + 'deleteimg' => "<img src='../images/icon/delete.gif' alt='" . _AM_WFD_ICO_DELETE . "' title='" . _AM_WFD_ICO_DELETE . "' align='middle'>", + 'online' => "<img src='../images/icon/on.gif' alt='" . _AM_WFD_ICO_ONLINE . "' title='" . _AM_WFD_ICO_ONLINE . "' align='middle'>", + 'offline' => "<img src='../images/icon/off.gif' alt='" . _AM_WFD_ICO_OFFLINE . "' title='" . _AM_WFD_ICO_OFFLINE . "' align='middle'>", + 'approved' => "<img src='../images/icon/on.gif' alt=''" . _AM_WFD_ICO_APPROVED . "' title=''" . _AM_WFD_ICO_APPROVED . "' align='middle'>", + 'notapproved' => "<img src='../images/icon/off.gif' alt='" . _AM_WFD_ICO_NOTAPPROVED . "' title='" . _AM_WFD_ICO_NOTAPPROVED . "' align='middle'>", + 'relatedfaq' => "<img src='../images/icon/link.gif' alt='" . _AM_WFD_ICO_LINK . "' title='" . _AM_WFD_ICO_LINK . "' align='middle'>", + 'relatedurl' => "<img src='../images/icon/urllink.gif' alt='" . _AM_WFD_ICO_URL . "' title='" . _AM_WFD_ICO_URL . "' align='middle'>", + 'addfaq' => "<img src='../images/icon/add.gif' alt='" . _AM_WFD_ICO_ADD . "' title='" . _AM_WFD_ICO_ADD . "' align='middle'>", + 'approve' => "<img src='../images/icon/approve.gif' alt='" . _AM_WFD_ICO_APPROVE . "' title='" . _AM_WFD_ICO_APPROVE . "' align='middle'>", + 'statsimg' => "<img src='../images/icon/stats.gif' alt='" . _AM_WFD_ICO_STATS . "' title='" . _AM_WFD_ICO_STATS . "' align='middle'>", + 'ignore' => "<img src='../images/icon/ignore.gif' alt='" . _AM_WFD_ICO_IGNORE . "' title='" . _AM_WFD_ICO_IGNORE . "' align='middle'>", + 'ack_yes' => "<img src='../images/icon/on.gif' alt='" . _AM_WFD_ICO_ACK . "' title='" . _AM_WFD_ICO_ACK . "' align='middle'>", + 'ack_no' => "<img src='../images/icon/off.gif' alt='" . _AM_WFD_ICO_REPORT . "' title='" . _AM_WFD_ICO_REPORT . "' align='middle'>", + 'con_yes' => "<img src='../images/icon/on.gif' alt='" . _AM_WFD_ICO_CONFIRM . "' title='" . _AM_WFD_ICO_CONFIRM . "' align='middle'>", + 'con_no' => "<img src='../images/icon/off.gif' alt='" . _AM_WFD_ICO_CONBROKEN . "' title='" . _AM_WFD_ICO_CONBROKEN . "' align='middle'>" + ); + +?> \ No newline at end of file Added: XoopsModules/wfdownloads/trunk/wfdownloads/admin/brokendown.php =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/admin/brokendown.php (rev 0) +++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/brokendown.php 2012-07-31 22:38:46 UTC (rev 9965) @@ -0,0 +1,189 @@ +<?php +/** + * $Id: brokendown.php,v 1.7 2007/09/30 12:39:13 m0nty_ Exp $ + * Module: WF-Downloads + * Version: v2.0.5a + * Release Date: 26 july 2004 + * Author: WF-Sections + * Licence: GNU + */ + +include 'admin_header.php'; + +$op = ''; + +if (!isset($_POST['op'])) +{ + $op = isset($_GET['op']) ? $_GET['op'] : 'listBrokenDownloads'; +} +else +{ + $op = $_POST['op']; +} + +$lid = (isset($_GET['lid'])) ? intval($_GET['lid']) : 0; + +switch ($op) +{ + case "updateNotice": + $report_handler = xoops_getmodulehandler('report'); + if (isset($_GET['ack'])) + { + $acknowledged = (isset($_GET['ack']) && $_GET['ack'] == 0) ? 1 : 0; + $report_handler->updateAll("acknowledged", $acknowledged, new Criteria("lid", $lid), true); + $update_mess = _AM_WFD_BROKEN_NOWACK; + } + + if (isset($_GET['con'])) + { + $confirmed = (isset($_GET['con']) && $_GET['con'] == 0) ? 1 : 0; + $report_handler->updateAll("confirmed", $confirmed, new Criteria("lid", $lid), true); + $update_mess = _AM_WFD_BROKEN_NOWCON; + } + redirect_header(WFDOWNLOADS_URL.'admin/brokendown.php?op=default', 1, $update_mess); + break; + + case "delBrokenDownloads": + $criteria = new Criteria('lid', intval($lid)); + $report_handler = xoops_getmodulehandler('report'); + $report = $report_handler->getObjects($criteria); + if (isset($report[0])) { + $report_handler->delete($report[0], true); + } + $download_handler = xoops_getmodulehandler('download'); + $download = $download_handler->get($lid); + $download_handler->delete($download, true); + redirect_header(WFDOWNLOADS_URL.'admin/brokendown.php?op=default', 1, _AM_WFD_BROKENFILEDELETED); + break; + + case "ignoreBrokenDownloads": + $criteria = new Criteria('lid', intval($lid)); + $report_handler = xoops_getmodulehandler('report'); + $report = $report_handler->getObjects($criteria); + if (isset($report[0])) { + $report_handler->delete($report[0], true); + } + + redirect_header(WFDOWNLOADS_URL.'admin/brokendown.php?op=default', 1, _AM_WFD_BROKEN_FILEIGNORED); + break; + + default: + case "listBrokenDownloads": + case "default": + + global $xoopsDB, $imagearray, $xoopsModule; + $report_handler = xoops_getmodulehandler('report'); + $reports = $report_handler->getObjects(); + $totalbrokendownloads = count($reports); + + wfdownloads_xoops_cp_header(); + + wfdownloads_adminMenu(3, _AM_WFD_BROKEN_FILE); + + echo " + <fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_WFD_BROKEN_REPORTINFO . "</legend>\n + <div style='padding: 8px;'>" . _AM_WFD_BROKEN_REPORTSNO . " <b>$totalbrokendownloads</b><div>\n + <div style='padding: 8px;'>\n + <ul><li>" . $imagearray['ignore'] . " " . _AM_WFD_BROKEN_IGNOREDESC . "</li>\n + <li>" . $imagearray['editimg'] . " " . _AM_WFD_BROKEN_EDITDESC . "</li> + <li>" . $imagearray['deleteimg'] . " " . _AM_WFD_BROKEN_DELETEDESC . "</li>\n + <li>" . $imagearray['ack_yes'] . " " . _AM_WFD_BROKEN_ACKDESC . "</li> + <li>" . $imagearray['con_yes'] . " " . _AM_WFD_BROKEN_CONFIRMDESC . "</li> + </ul></div>\n + </fieldset><br />\n + + <table width='100%' border='0' cellspacing='1' cellpadding = '2' class='outer'>\n + <tr align = 'center'>\n + <th width = '3%' align = 'center'>" . _AM_WFD_BROKEN_ID . "</th>\n + <th width = '35%' align = 'left'>" . _AM_WFD_BROKEN_TITLE . "</th>\n + <th>" . _AM_WFD_BROKEN_REPORTER . "</th>\n + <th>" . _AM_WFD_BROKEN_FILESUBMITTER . "</th>\n + <th>" . _AM_WFD_BROKEN_DATESUBMITTED . "</th>\n + <th align='center'>" . _AM_WFD_BROKEN_ACTION . "</th>\n + </tr>\n + "; + + if ($totalbrokendownloads == 0) + { + echo "<tr align = 'center'><td align = 'center' class='head' colspan = '6'>" . _AM_WFD_BROKEN_NOFILEMATCH . "</td></tr>"; + } + else + { + foreach (array_keys($reports) as $i) { + $lids[] = $reports[$i]->getVar('lid'); + $uids[] = $reports[$i]->getVar('sender'); + } + $download_handler = xoops_getmodulehandler('download'); + $downloads = $download_handler->getObjects(new Criteria('lid', "(".implode(',', array_unique($lids)).")", "IN"), true); + + foreach (array_keys($downloads) as $i) { + $uids[] = $downloads[$i]->getVar('submitter'); + } + + $member_handler = xoops_gethandler('member'); + $users = $member_handler->getUsers(new Criteria("uid", "(".implode(',', array_unique($uids)).")", "IN"), true); + + foreach (array_keys($reports) as $i) { + // Does the download exists ? + if (isset($downloads[$reports[$i]->getVar('lid')])) { + $submitter = isset($users[$downloads[$reports[$i]->getVar('lid')]->getVar('submitter')]) ? $users[$downloads[$reports[$i]->getVar('lid')]->getVar('submitter')] : false; + $download = $downloads[$reports[$i]->getVar('lid')]; + $download_link = "<a href='" . WFDOWNLOADS_URL."singlefile.php?cid=" . $download->getVar('cid') . "&lid=" . $download->getVar('lid') . "' target='_blank'>" . $download->getVar('title') . "</a>"; + $submitteremail = is_object($submitter) ? $submitter->getVar('email') : ''; + $submitteruname = is_object($submitter) ? $submitter->getVar('uname') : $xoopsConfig['anonymous']; + } else { + $submitter = ''; + $download_link = _AM_WFD_BROKEN_DOWNLOAD_DONT_EXISTS; + $submitteremail = ''; + $submitteruname = $xoopsConfig['anonymous']; + } + + $sender = isset($users[$reports[$i]->getVar('sender')]) ? $users[$reports[$i]->getVar('sender')] : ""; + $senderemail = isset($users[$reports[$i]->getVar('sender')]) ? $users[$reports[$i]->getVar('sender')]->getVar('email') : ""; + $sendername = isset($users[$reports[$i]->getVar('sender')]) ? $users[$reports[$i]->getVar('sender')]->getVar('uname') : $xoopsConfig['anonymous']; + + $lid = intval($download->getVar('lid')); + + $ingnore_link = "<a href='".WFDOWNLOADS_URL."admin/brokendown.php?op=ignoreBrokenDownloads&lid=".$lid."' alt='" . _AM_WFD_BROKEN_IGNORE_ALT . "' title='" . _AM_WFD_BROKEN_IGNORE_ALT . "'>" . $imagearray['ignore'] . "</a>"; + $edit_link = "<a href='".WFDOWNLOADS_URL."admin/index.php?op=Download&lid=".$lid."' alt='" . _AM_WFD_BROKEN_EDIT_ALT . "' title='" . _AM_WFD_BROKEN_EDIT_ALT . "'> " . $imagearray['editimg'] . " </a>"; + $delete_link = "<a href='".WFDOWNLOADS_URL."admin/brokendown.php?op=delBrokenDownloads&lid=".$lid."' alt='" . _AM_WFD_BROKEN_DELETE_ALT . "' title='" . _AM_WFD_BROKEN_DELETE_ALT . "'>" . $imagearray['deleteimg'] . "</a>"; + $ack_image = ($reports[$i]->getVar('acknowledged')) ? $imagearray['ack_yes'] : $imagearray['ack_no']; + $ack_link = "<a href='".WFDOWNLOADS_URL."admin/brokendown.php?op=updateNotice&lid=".$lid."&ack=".$reports[$i]->getVar('acknowledged')."' alt='" . _AM_WFD_BROKEN_ACK_ALT . "' title='" . _AM_WFD_BROKEN_ACK_ALT . "'>" . $ack_image . "</a>"; + $con_image = ($reports[$i]->getVar('confirmed')) ? $imagearray['con_yes'] : $imagearray['con_no']; + $con_link = "<a href='".WFDOWNLOADS_URL."admin/brokendown.php?op=updateNotice&lid=".$lid."&con=".$reports[$i]->getVar('confirmed')."' alt='" . _AM_WFD_BROKEN_CONFIRM_ALT . "' title='" . _AM_WFD_BROKEN_CONFIRM_ALT . "'>" . $con_image . " </a>\n"; + + echo " + <tr align = 'center'>\n + <td class = 'head'>".$reports[$i]->getVar('reportid')."</td>\n + <td class = 'even' align = 'left'>$download_link</td>\n + "; + if ($senderemail == "") + { + echo "<td class = 'even'>".$sendername." (".$reports[$i]->getVar('ip').")"; + } + else + { + echo "<td class = 'even'><a href='mailto:".$senderemail."'>".$sendername."</a> (".$reports[$i]->getVar('ip').")"; + } + if ($submitteremail == '') + { + echo "<td class = 'even'>".$submitteruname; + } + else + { + echo "<td class = 'even'><a href='mailto:".$submitteremail."'>".$submitteruname."</a>"; + } + echo " + </td>\n + <td class='even' align='center'>" . formatTimestamp($reports[$i]->getVar('date'), $xoopsModuleConfig['dateformat']) . "</td>\n + <td align='center' class = 'even' nowrap>\n + $ingnore_link $edit_link $delete_link $ack_link $con_link + </td></tr>\n + "; + } + } + echo"</table>"; +} +xoops_cp_footer(); + +?> \ No newline at end of file Added: XoopsModules/wfdownloads/trunk/wfdownloads/admin/category.php =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/admin/category.php (rev 0) +++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/category.php 2012-07-31 22:38:46 UTC (rev 9965) @@ -0,0 +1,285 @@ +<?php +/** + * $Id: category.php,v 1.11 2007/09/30 12:39:13 m0nty_ Exp $ + * Module: WF-Downloads + * Version: v2.0.5a + * Release Date: 26 july 2004 + * Author: WF-Sections + * Licence: GNU + */ +include 'admin_header.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php'; +include_once XOOPS_ROOT_PATH . '/class/tree.php'; + +$op = ''; + +function createcat($cid = 0) +{ + include_once WFDOWNLOADS_ROOT_PATH.'class/wfd_lists.php'; + include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + + $category_handler = xoops_getmodulehandler('category'); + + $heading = _AM_WFD_CCATEGORY_CREATENEW; + + if ($cid > 0) + { + $category = $category_handler->get($cid); + $heading = _AM_WFD_CCATEGORY_MODIFY; + } else { + $category = $category_handler->create(); + } + + $sform = $category->getForm($heading); + $sform -> display(); +} + +$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : 'main'; + +switch ($op) +{ + case "move": + if (!isset($_POST['ok'])) + { + $cid = (isset($_POST['cid'])) ? intval($_POST['cid']) : intval($_GET['cid']); + + wfdownloads_xoops_cp_header(); + wfdownloads_adminMenu(2, _AM_WFD_MCATEGORY); + + include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + $sform = new XoopsThemeForm(_AM_WFD_CCATEGORY_MOVE, "move", xoops_getenv('PHP_SELF')); + + $category_handler = xoops_getmodulehandler('category'); + $categories = $category_handler->getObjects(); + $mytree = new XoopsObjectTree($categories, "cid", "pid"); + $sform->addElement(new XoopsFormLabel(_AM_WFD_BMODIFY, $mytree->makeSelBox('target', 'title'))); + + $create_tray = new XoopsFormElementTray('', ''); + $create_tray -> addElement(new XoopsFormHidden('source', $cid)); + $create_tray -> addElement(new XoopsFormHidden('ok', 1)); + $create_tray -> addElement(new XoopsFormHidden('op', 'move')); + $butt_save = new XoopsFormButton('', '', _AM_WFD_BMOVE, 'submit'); + $butt_save -> setExtra('onclick="this.form.elements.op.value=\'move\'"'); + $create_tray -> addElement($butt_save); + $butt_cancel = new XoopsFormButton('', '', _AM_WFD_BCANCEL, 'submit'); + $butt_cancel -> setExtra('onclick="this.form.elements.op.value=\'cancel\'"'); + $create_tray -> addElement($butt_cancel); + $sform -> addElement($create_tray); + $sform -> display(); + xoops_cp_footer(); + } + else + { + global $xoopsDB; + + $source = intval($_POST['source']); + $target = intval($_POST['target']); + if ($target == $source) + { + redirect_header(WFDOWNLOADS_URL.'admin/category.php?op=move&ok=0&cid=$source', 5, _AM_WFD_CCATEGORY_MODIFY_FAILED); + } + + if (!$target) + { + redirect_header(WFDOWNLOADS_URL.'admin/category.php?op=move&ok=0&cid=$source', 5, _AM_WFD_CCATEGORY_MODIFY_FAILEDT); + } + $download_handler = xoops_getmodulehandler('download'); + $result = $download_handler->updateAll("cid", $target, new Criteria("cid", intval($source)), true); + if (!$result) + { + $error = _AM_WFD_DBERROR; + trigger_error($error, E_USER_ERROR); + } + redirect_header(WFDOWNLOADS_URL.'admin/category.php?op=default', 1, _AM_WFD_CCATEGORY_MODIFY_MOVED); + exit(); + } + break; + + case "addCat": + + global $xoopsDB, $myts, $_FILES, $xoopsModuleConfig; + + $cid = (isset($_POST["cid"])) ? intval($_POST["cid"]) : 0; + $groups = isset($_POST['groups']) ? $_POST['groups'] : array(); + $pid = (isset($_POST["pid"])) ? intval($_POST["pid"]) : 0; + $weight = (isset($_POST["weight"]) && $_POST["weight"] > 0) ? intval($_POST["weight"]) : 0; + $spotlighthis = (isset($_POST["lid"])) ? intval($_POST["lid"]) : 0; + $spotlighttop = (isset($_POST["spotlighttop"]) && ($_POST["spotlighttop"] == 1)) ? 1 : 0; + $imgurl = ($_POST["imgurl"] && $_POST["imgurl"] != "blank.png") ? $myts -> addslashes($_POST["imgurl"]) : ""; + + $dohtml = isset($_POST['dohtml']); + $dosmiley = isset($_POST['dosmiley']); + $doxcode = isset($_POST['doxcode']); + $doimage = isset($_POST['doimage']); + $dobr = isset($_POST['dobr']); + + $category_handler = xoops_getmodulehandler('category'); + if (!$cid) + { + $category = $category_handler->create(); + } + else { + $category = $category_handler->get($cid); + $childcats = $category_handler->getChildCats($category); + if ($pid == $cid || in_array($pid, array_keys($childcats))) { + $category->setErrors(_AM_WFD_CCATEGORY_CHILDASPARENT); + } + } + + // added - start - March 4 2006 - jpc + $formulize_fid = (isset($_POST["formulize_fid"])) ? intval($_POST["formulize_fid"]) : 0; + // added - end - March 4 2006 - jpc + + $category->setVar('title', $_POST["title"]); + $category->setVar('description', $_POST["description"]); + $category->setVar('summary', $_POST["summary"]); + $category->setVar('dohtml', $dohtml); + $category->setVar('dosmiley', $dosmiley); + $category->setVar('doxcode', $doxcode); + $category->setVar('dobr', $dobr); + $category->setVar('doimage', $doimage); + $category->setVar('pid', $pid); + $category->setVar('weight', $weight); + $category->setVar('spotlighthis', $spotlighthis); + $category->setVar('spotlighttop', $spotlighttop); + $category->setVar('imgurl', $imgurl); + + // added - start - March 4 2006 - jpc + $category->setVar('formulize_fid', $formulize_fid); + // added - end - March 4 2006 - jpc + + $result = $category_handler->insert($category); + if (!$result) { + echo $category->getHtmlErrors(); + } + if (!$cid) + { + if ($cid == 0) { + $newid = intval($category->getVar('cid')); + } + wfd_save_Permissions($groups, $newid, 'WFDownCatPerm'); + /** + * Notify of new category + */ + global $xoopsModule; + $tags = array(); + $tags['CATEGORY_NAME'] = $_POST['title']; + $tags['CATEGORY_URL'] = WFDOWNLOADS_URL.'viewcat.php?cid=' . $newid; + $notification_handler = & xoops_gethandler('notification'); + $notification_handler -> triggerEvent('global', 0, 'new_category', $tags); + $database_mess = _AM_WFD_CCATEGORY_CREATED; + } + else + { + $database_mess = _AM_WFD_CCATEGORY_MODIFIED; + wfd_save_Permissions($groups, $cid, 'WFDownCatPerm'); + } + redirect_header(WFDOWNLOADS_URL.'admin/category.php', 1, $database_mess); + break; + + case "del": + + global $xoopsDB, $xoopsModule; + + $cid = (isset($_POST['cid']) && is_numeric($_POST['cid'])) ? intval($_POST['cid']) : intval($_GET['cid']); + $ok = (isset($_POST['ok']) && $_POST['ok'] == 1) ? intval($_POST['ok']) : 0; + $category_handler = xoops_getmodulehandler('category'); + $categories = $category_handler->getObjects(); + $mytree = new XoopsObjectTree($categories, "cid", "pid"); + + if ($ok == 1) + { + // get all subcategories under the specified category + $arr = $mytree -> getAllChild($cid); + + foreach($arr as $child) + { + // get all category ids + $cids[] = $child->getVar('cid'); + } + $cids[] = $cid; + + $criteria = new Criteria("cid", "(".implode(',', $cids).")", "IN"); + + $download_handler = xoops_getmodulehandler('download'); + //get list of downloads in these subcategories + $downloads = $download_handler->getList($criteria); + + $download_criteria = new Criteria("lid", "(".implode(',', array_keys($downloads)).")", "IN"); + + $rating_handler = xoops_getmodulehandler('rating'); + $report_handler = xoops_getmodulehandler('report'); + + // now for each download, delete the text data and vote data associated with the download + $rating_handler->deleteAll($download_criteria); + $report_handler->deleteAll($download_criteria); + $download_handler->deleteAll($download_criteria); + foreach (array_keys($downloads) as $lid) { + xoops_comment_delete($xoopsModule->getVar('mid'), intval($lid)); + } + + // all downloads for each category is deleted, now delete the category data + $category_handler->deleteAll($criteria); + $error = _AM_WFD_DBERROR; + + foreach ($cids as $cid) { + xoops_groupperm_deletebymoditem (intval($xoopsModule->getVar('mid')), 'WFDownCatPerm', $cid); + } + + redirect_header(WFDOWNLOADS_URL.'admin/category.php', 1, _AM_WFD_CCATEGORY_DELETED); + exit(); + } + else + { + wfdownloads_xoops_cp_header(); + xoops_confirm(array('op' => 'del', 'cid' => $cid, 'ok' => 1), 'category.php', _AM_WFD_CCATEGORY_AREUSURE); + xoops_cp_footer(); + } + break; + + case "modCat": + $cid = (isset($_POST['cid'])) ? intval($_POST['cid']) : 0; + wfdownloads_xoops_cp_header(); + wfdownloads_adminMenu(2, _AM_WFD_MCATEGORY); + createcat($cid); + xoops_cp_footer(); + break; + + case 'main': + default: + + wfdownloads_xoops_cp_header(); + wfdownloads_adminMenu(2, _AM_WFD_MCATEGORY); + + include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + $totalcats = wfd_totalcategory(); + + if ($totalcats > 0) + { + $sform = new XoopsThemeForm(_AM_WFD_CCATEGORY_MODIFY, "category", $_SERVER['REQUEST_URI']); + $category_handler = xoops_getmodulehandler('category'); + $categories = $category_handler->getObjects(); + $mytree = new XoopsObjectTree($categories, "cid", "pid"); + $sform->addElement(new XoopsFormLabel(_AM_WFD_CCATEGORY_MODIFY_TITLE, $mytree->makeSelBox('cid', 'title'))); + + $dup_tray = new XoopsFormElementTray('', ''); + $dup_tray -> addElement(new XoopsFormHidden('op', 'modCat')); + $butt_dup = new XoopsFormButton('', '', _AM_WFD_BMODIFY, 'submit'); + $butt_dup -> setExtra('onclick="this.form.elements.op.value=\'modCat\'"'); + $dup_tray -> addElement($butt_dup); + $butt_move = new XoopsFormButton('', '', _AM_WFD_BMOVE, 'submit'); + $butt_move -> setExtra('onclick="this.form.elements.op.value=\'move\'"'); + $dup_tray -> addElement($butt_move); + $butt_dupct = new XoopsFormButton('', '', _AM_WFD_BDELETE, 'submit'); + $butt_dupct -> setExtra('onclick="this.form.elements.op.value=\'del\'"'); + $dup_tray -> addElement($butt_dupct); + $sform -> addElement($dup_tray); + $sform -> display(); + } + + createcat(0); + xoops_cp_footer(); + break; +} + +?> \ No newline at end of file Added: XoopsModules/wfdownloads/trunk/wfdownloads/admin/cookies.js =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/admin/cookies.js (rev 0) +++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/cookies.js 2012-07-31 22:38:46 UTC (rev 9965) @@ -0,0 +1,73 @@ +/** + * Read the JavaScript cookies tutorial at: + * http://www.netspade.com/articles/javascript/cookies.xml + */ + +/** + * Sets a Cookie with the given name and value. + * + * name Name of the cookie + * value Value of the cookie + * [expires] Expiration date of the cookie (default: end of current session) + * [path] Path where the cookie is valid (default: path of calling document) + * [domain] Domain where the cookie is valid + * (default: domain of calling document) + * [secure] Boolean value indicating if the cookie transmission requires a + * secure transmission + */ +function setCookie(name, value, expires, path, domain, secure) +{ + document.cookie= name + "=" + escape(value) + + ((expires) ? "; expires=" + expires.toGMTString() : "") + + ((path) ? "; path=" + path : "") + + ((domain) ? "; domain=" + domain : "") + + ((secure) ? "; secure" : ""); +} + +/** + * Gets the value of the specified cookie. + * + * name Name of the desired cookie. + * + * Returns a string containing value of specified cookie, + * or null if cookie does not exist. + */ +function getCookie(name) +{ + var dc = document.cookie; + var prefix = name + "="; + var begin = dc.indexOf("; " + prefix); + if (begin == -1) + { + begin = dc.indexOf(prefix); + if (begin != 0) return null; + } + else + { + begin += 2; + } + var end = document.cookie.indexOf(";", begin); + if (end == -1) + { + end = dc.length; + } + return unescape(dc.substring(begin + prefix.length, end)); +} + +/** + * Deletes the specified cookie. + * + * name name of the cookie + * [path] path of the cookie (must be same as path used to create cookie) + * [domain] domain of the cookie (must be same as domain used to create cookie) + */ +function deleteCookie(name, path, domain) +{ + if (getCookie(name)) + { + document.cookie = name + "=" + + ((path) ? "; path=" + path : "") + + ((domain) ? "; domain=" + domain : "") + + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; + } +} Added: XoopsModules/wfdownloads/trunk/wfdownloads/admin/funcs.js =================================================================== --- XoopsModules/wfdownloads/trunk/wfdownloads/admin/funcs.js (rev 0) +++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/funcs.js 2012-07-31 22:38:46 UTC (rev 9965) @@ -0,0 +1,146 @@ +function smartsectionPageWrap(id, page) { + var revisedMessage; + var textareaDom = xoopsGetElementById(id); + xoopsInsertText(textareaDom, page); + textareaDom.focus(); + return; +} + +function addSelectedItemsToParent() { + self.opener.addToParentList(window.document.forms[0].destList); + window.close(); +} + +// Fill the selcted item list with the items already present in parent. +function fillInitialDestList() { + var destList = window.document.forms[0].destList; + var srcList = self.opener.window.document.forms[0].elements['moderators[]']; + for (var count = destList.options.length - 1; count >= 0; count--) { + destList.options[count] = null; + } + for(var i = 0; i < srcList.options.length; i++) { + if (srcList.options[i] != null) + destList.options[i] = new Option(srcList.options[i].text); + } +} + ... [truncated message content] |
From: <be...@us...> - 2012-07-31 22:33:57
|
Revision: 9964 http://xoops.svn.sourceforge.net/xoops/?rev=9964&view=rev Author: beckmi Date: 2012-07-31 22:33:51 +0000 (Tue, 31 Jul 2012) Log Message: ----------- Adding Wf-Downloads Added Paths: ----------- XoopsModules/wfdownloads/ XoopsModules/wfdownloads/branches/ XoopsModules/wfdownloads/releases/ XoopsModules/wfdownloads/releases/3.2/ XoopsModules/wfdownloads/trunk/ XoopsModules/wfdownloads/trunk/wfdownloads/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2012-07-31 13:13:15
|
Revision: 9963 http://xoops.svn.sourceforge.net/xoops/?rev=9963&view=rev Author: beckmi Date: 2012-07-31 13:13:02 +0000 (Tue, 31 Jul 2012) Log Message: ----------- Release 5.01 Beta 1 (conversion to XOOPS 2.5.5 GUI) Modified Paths: -------------- XoopsModules/shoutbox/trunk/shoutbox/admin/index.php XoopsModules/shoutbox/trunk/shoutbox/admin/menu.php XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxEdit.php XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxFile.php XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxList.php XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxRemove.php XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxSave.php XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxStatus.php XoopsModules/shoutbox/trunk/shoutbox/language/english/admin.php XoopsModules/shoutbox/trunk/shoutbox/xoops_version.php Added Paths: ----------- XoopsModules/shoutbox/trunk/shoutbox/admin/about.php XoopsModules/shoutbox/trunk/shoutbox/admin/admin_footer.php XoopsModules/shoutbox/trunk/shoutbox/admin/admin_header.php XoopsModules/shoutbox/trunk/shoutbox/admin/main.php XoopsModules/shoutbox/trunk/shoutbox/docs/ XoopsModules/shoutbox/trunk/shoutbox/docs/changelog.txt XoopsModules/shoutbox/trunk/shoutbox/docs/credits.txt XoopsModules/shoutbox/trunk/shoutbox/docs/index.html XoopsModules/shoutbox/trunk/shoutbox/docs/install.txt XoopsModules/shoutbox/trunk/shoutbox/docs/lang_diff.txt XoopsModules/shoutbox/trunk/shoutbox/docs/license.txt XoopsModules/shoutbox/trunk/shoutbox/docs/readme.txt XoopsModules/shoutbox/trunk/shoutbox/images/off.png XoopsModules/shoutbox/trunk/shoutbox/images/on.png XoopsModules/shoutbox/trunk/shoutbox/language/english/help/ XoopsModules/shoutbox/trunk/shoutbox/language/english/help/help.html XoopsModules/shoutbox/trunk/shoutbox/language/english/help/index.html Removed Paths: ------------- XoopsModules/shoutbox/trunk/shoutbox/readme.txt XoopsModules/shoutbox/trunk/shoutbox/readme_archive.txt Added: XoopsModules/shoutbox/trunk/shoutbox/admin/about.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/about.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/about.php 2012-07-31 13:13:02 UTC (rev 9963) @@ -0,0 +1,30 @@ +<?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/shoutbox/trunk/shoutbox/admin/admin_footer.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/admin_footer.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/admin_footer.php 2012-07-31 13:13:02 UTC (rev 9963) @@ -0,0 +1,28 @@ +<?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 $ + */ + +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 Added: XoopsModules/shoutbox/trunk/shoutbox/admin/admin_header.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/admin_header.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/admin_header.php 2012-07-31 13:13:02 UTC (rev 9963) @@ -0,0 +1,46 @@ +<?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'; + +global $xoopsModule; + +$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'); + +if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){ + include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'); + }else{ + redirect_header("../../../admin.php", 5, _AM_BIRTHDAY_MODULEADMIN_MISSING, false); + } \ No newline at end of file Modified: XoopsModules/shoutbox/trunk/shoutbox/admin/index.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/index.php 2012-07-31 13:11:37 UTC (rev 9962) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/index.php 2012-07-31 13:13:02 UTC (rev 9963) @@ -1,125 +1,57 @@ -<?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 XUUPS Project http://sourceforge.net/projects/xuups/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @package Shoutbox - * @author Alphalogic <alp...@ho...> - * @author tank <tan...@co...> - * @author trabis <lus...@gm...> - * @version $Id: index.php 0 2010-01-29 18:47:04Z trabis $ - */ -// Hello admin? -include '../../../include/cp_header.php'; -// Admin! - -function shoutboxDefault() -{ - global $xoopsModuleConfig; - - if($xoopsModuleConfig['storage_type'] == 'database') { - $database = '['._AM_SH_EDIT_INUSE.']'; - $file = ''; - } else if($xoopsModuleConfig['storage_type'] == 'file') { - $database = ''; - $file = '['._AM_SH_EDIT_INUSE.']'; - } - - echo " - <h1>"._AM_SH_CONFIG."</h1> - <br /> - "._AM_SH_CHOOSE." - <ul> - <li><a href='index.php?op=shoutboxList'>" . _AM_SH_EDIT_DB . "</a> $database</li> - <li><a href='index.php?op=shoutboxFile'>" . _AM_SH_EDIT_FILE . "</a> $file</li> - <li><a href='index.php?op=shoutboxStatus'>" . _AM_SH_STATUSOF . "</a></li> - </ul> - <br /> - "; -} - -function shoutboxList() -{ - global $xoopsDB; - include 'shoutboxList.php'; -} - -function shoutboxEdit() -{ - global $xoopsDB; - include 'shoutboxEdit.php'; -} - -function shoutboxSave() -{ - global $xoopsDB; - include 'shoutboxSave.php'; -} - -function shoutboxRemove() -{ - global $xoopsDB; - include 'shoutboxRemove.php'; -} - -function shoutboxFile() -{ - global $xoopsDB; - include 'shoutboxFile.php'; -} - -function shoutboxStatus() -{ - global $xoopsDB, $xoopsModuleConfig; - include 'shoutboxStatus.php'; -} - -$op = empty($_GET["op"]) ? '' : $_GET["op"]; - -switch ($op){ - case "shoutboxList": - xoops_cp_header(); - shoutboxList(); - break; - - case "shoutboxEdit": - xoops_cp_header(); - shoutboxEdit(); - break; - - case "shoutboxSave": - shoutboxSave(); - break; - - case "shoutboxRemove": - shoutboxRemove(); - break; - - case "shoutboxFile": - xoops_cp_header(); - shoutboxFile(); - break; - - case "shoutboxStatus": - xoops_cp_header(); - shoutboxStatus(); - break; - - default: - xoops_cp_header(); - shoutboxDefault(); - break; - -} - -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 $ + */ + + +require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; +include_once dirname(__FILE__) . '/admin_header.php'; + +xoops_cp_header(); + + $indexAdmin = new ModuleAdmin(); + + +global $xoopsModuleConfig; + +$indexAdmin->addInfoBox(_AM_SHOUTBOX_CURRENT_SELECTION); +if($xoopsModuleConfig['storage_type'] == 'database') { + $database = '['._AM_SH_EDIT_INUSE.']'; + $file = ''; + $imgDB="<img src='../images/on.png'>"; + $imgFile="<img src='../images/off.png'>"; + $indexAdmin->addInfoBoxLine(_AM_SHOUTBOX_CURRENT_SELECTION, + $imgDB."<a href='main.php?op=shoutboxList'>" . _AM_SH_EDIT_DB . "</a> $database", 0, 'Green' ); + $indexAdmin->addInfoBoxLine(_AM_SHOUTBOX_CURRENT_SELECTION, + $imgFile."<a href='main.php?op=shoutboxFile'>" . _AM_SH_EDIT_FILE . "</a> $file", 0, 'Green' ); +} else if($xoopsModuleConfig['storage_type'] == 'file') { + $database = ''; + $file = '['._AM_SH_EDIT_INUSE.']'; + $imgDB="<img src='../images/off.png'>"; + $imgFile="<img src='../images/on.png'>"; + $indexAdmin->addInfoBoxLine(_AM_SHOUTBOX_CURRENT_SELECTION, + $imgDB."<a href='main.php?op=shoutboxList'>" . _AM_SH_EDIT_DB . "</a> $database", 0, 'Green' ); + $indexAdmin->addInfoBoxLine(_AM_SHOUTBOX_CURRENT_SELECTION, + $imgFile."<a href='main.php?op=shoutboxFile'>" . _AM_SH_EDIT_FILE . "</a> $file", 0, 'Green' ); +} + + + echo $indexAdmin->addNavigation('index.php'); + echo $indexAdmin->renderIndex(); + +include "admin_footer.php"; \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/admin/main.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/main.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/main.php 2012-07-31 13:13:02 UTC (rev 9963) @@ -0,0 +1,139 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: main.php 0 2010-01-29 18:47:04Z trabis $ + */ +// Hello admin? +include '../../../include/cp_header.php'; +include_once 'admin_header.php'; +// Admin! + + + +function shoutboxDefault() +{ + global $xoopsModuleConfig; + + + if($xoopsModuleConfig['storage_type'] == 'database') { + $database = '['._AM_SH_EDIT_INUSE.']'; + $file = ''; + } else if($xoopsModuleConfig['storage_type'] == 'file') { + $database = ''; + $file = '['._AM_SH_EDIT_INUSE.']'; + } + + echo " + <h1>"._AM_SH_CONFIG."</h1> + <br /> + "._AM_SH_CHOOSE." + <ul> + <li><a href='main.php?op=shoutboxList'>" . _AM_SH_EDIT_DB . "</a> $database</li> + <li><a href='main.php?op=shoutboxFile'>" . _AM_SH_EDIT_FILE . "</a> $file</li> + <li><a href='main.php?op=shoutboxStatus'>" . _AM_SH_STATUSOF . "</a></li> + </ul> + <br /> + "; +} + +function shoutboxList() +{ + global $xoopsDB; + include 'shoutboxList.php'; +} + +function shoutboxEdit() +{ + global $xoopsDB; + include 'shoutboxEdit.php'; +} + +function shoutboxSave() +{ + global $xoopsDB; + include 'shoutboxSave.php'; +} + +function shoutboxRemove() +{ + global $xoopsDB; + include 'shoutboxRemove.php'; +} + +function shoutboxFile() +{ + global $xoopsDB; + include 'shoutboxFile.php'; +} + +function shoutboxStatus() +{ + global $xoopsDB, $xoopsModuleConfig; + include 'shoutboxStatus.php'; +} + +$op = empty($_GET["op"]) ? '' : $_GET["op"]; + +switch ($op){ + case "shoutboxList": + xoops_cp_header(); + $indexAdmin= new ModuleAdmin(); + echo $indexAdmin->addNavigation('main.php?op=shoutboxList'); + shoutboxList(); + break; + + case "shoutboxEdit": + xoops_cp_header(); + $indexAdmin= new ModuleAdmin(); + echo $indexAdmin->addNavigation('main.php'); + shoutboxEdit(); + break; + + case "shoutboxSave": + shoutboxSave(); + break; + + case "shoutboxRemove": + shoutboxRemove(); + break; + + case "shoutboxFile": + xoops_cp_header(); + $indexAdmin= new ModuleAdmin(); + echo $indexAdmin->addNavigation('main.php?op=shoutboxFile'); + shoutboxFile(); + break; + + case "shoutboxStatus": + xoops_cp_header(); + $indexAdmin= new ModuleAdmin(); + echo $indexAdmin->addNavigation('main.php?op=shoutboxStatus'); + shoutboxStatus(); + break; + + default: + xoops_cp_header(); + $indexAdmin= new ModuleAdmin(); + echo $indexAdmin->addNavigation('main.php'); + shoutboxDefault(); + break; + +} +include_once 'admin_footer.php'; +//xoops_cp_footer(); +//?> \ No newline at end of file Modified: XoopsModules/shoutbox/trunk/shoutbox/admin/menu.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/menu.php 2012-07-31 13:11:37 UTC (rev 9962) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/menu.php 2012-07-31 13:13:02 UTC (rev 9963) @@ -18,11 +18,47 @@ * @author trabis <lus...@gm...> * @version $Id: menu.php 0 2010-01-29 18:47:04Z trabis $ */ +defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined"); -$adminmenu[1]['title'] = _MI_SHOUTBOX_MENU_DB; -$adminmenu[1]['link'] = "admin/index.php?op=shoutboxList"; -$adminmenu[2]['title'] = _MI_SHOUTBOX_MENU_FILE; -$adminmenu[2]['link'] = "admin/index.php?op=shoutboxFile"; -$adminmenu[3]['title'] = _MI_SHOUTBOX_MENU_STATUS; -$adminmenu[3]['link'] = "admin/index.php?op=shoutboxStatus"; -?> \ No newline at end of file +$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=0; +$adminmenu[$i]["title"] = _AM_MODULEADMIN_HOME; +$adminmenu[$i]['link'] = "admin/index.php"; +$adminmenu[$i]["icon"] = $pathIcon32 . '/home.png'; +//$i++; +//$adminmenu[$i]['title'] = _AM_MODULEADMIN_HOME; +//$adminmenu[$i]['link'] = "admin/main.php"; +//$adminmenu[$i]["icon"] = $pathIcon32 . '/manage.png'; +$i++; +$adminmenu[$i]['title'] = _MI_SHOUTBOX_MENU_DB; +$adminmenu[$i]['link'] = "admin/main.php?op=shoutboxList"; +$adminmenu[$i]["icon"] = $pathIcon32 . '/list.png'; +$i++; +$adminmenu[$i]['title'] = _MI_SHOUTBOX_MENU_FILE; +$adminmenu[$i]['link'] = "admin/main.php?op=shoutboxFile"; +$adminmenu[$i]["icon"] = $pathIcon32 . '/index.png'; +$i++; +$adminmenu[$i]['title'] = _MI_SHOUTBOX_MENU_STATUS; +$adminmenu[$i]['link'] = "admin/main.php?op=shoutboxStatus"; +$adminmenu[$i]["icon"] = $pathIcon32 . '/search.png'; +$i++; +$adminmenu[$i]['title'] = _AM_MODULEADMIN_ABOUT; +$adminmenu[$i]["link"] = "admin/about.php"; +$adminmenu[$i]["icon"] = $pathIcon32 . '/about.png'; \ No newline at end of file Modified: XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxEdit.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxEdit.php 2012-07-31 13:11:37 UTC (rev 9962) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxEdit.php 2012-07-31 13:13:02 UTC (rev 9963) @@ -19,7 +19,7 @@ * @version $Id: shoutboxEdit.php 0 2010-01-29 18:47:04Z trabis $ */ -if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/index.php')) { +if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/main.php')) { exit(); } Modified: XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxFile.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxFile.php 2012-07-31 13:11:37 UTC (rev 9962) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxFile.php 2012-07-31 13:13:02 UTC (rev 9963) @@ -19,7 +19,7 @@ * @version $Id: shoutboxFile.php 0 2010-01-29 18:47:04Z trabis $ */ -if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/index.php')) { +if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/main.php')) { exit(); } Modified: XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxList.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxList.php 2012-07-31 13:11:37 UTC (rev 9962) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxList.php 2012-07-31 13:13:02 UTC (rev 9963) @@ -19,7 +19,7 @@ * @version $Id: shoutboxList.php 0 2010-01-29 18:47:04Z trabis $ */ -if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/index.php')) { +if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/main.php')) { exit(); } Modified: XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxRemove.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxRemove.php 2012-07-31 13:11:37 UTC (rev 9962) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxRemove.php 2012-07-31 13:13:02 UTC (rev 9963) @@ -18,7 +18,7 @@ * @author trabis <lus...@gm...> * @version $Id: shoutboxRemove.php 0 2010-01-29 18:47:04Z trabis $ */ -if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/index.php')) { +if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/main.php')) { exit(); } $id = intval($_REQUEST['id']); Modified: XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxSave.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxSave.php 2012-07-31 13:11:37 UTC (rev 9962) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxSave.php 2012-07-31 13:13:02 UTC (rev 9963) @@ -19,7 +19,7 @@ * @version $Id: shoutboxSave.php 0 2010-01-29 18:47:04Z trabis $ */ -if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/index.php')) { +if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/main.php')) { exit(); } Modified: XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxStatus.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxStatus.php 2012-07-31 13:11:37 UTC (rev 9962) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxStatus.php 2012-07-31 13:13:02 UTC (rev 9963) @@ -19,7 +19,7 @@ * @version $Id: shoutboxStatus.php 0 2010-01-29 18:47:04Z trabis $ */ -if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/index.php')) { +if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/main.php')) { exit(); } Added: XoopsModules/shoutbox/trunk/shoutbox/docs/changelog.txt =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/docs/changelog.txt (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/docs/changelog.txt 2012-07-31 13:13:02 UTC (rev 9963) @@ -0,0 +1,164 @@ +--------------------------------------- +5.01 Beta 1 2012-07-30 +--------------------------------------- + +- Converted to XOOPS 2.5.5 Admin GUI (Mamba) + +--------------------------------------- +5.00 Final 2010-01-24 +--------------------------------------- + +- Converted to Blue Move (Trabis) +- Classes were added and a lot of the code was rewritten. + +Database has changed so please do not upload this package over the old shoutbox. +- Unistall shoutbox +- Delete all files +- Upload new files +- Install Shoutbox + +**************************************************************************** + + Shoutbox v4.05 Release| Xoops Module by Tank | Dec 15, 2008 + Website: http://www.customvirtualdesigns.com + +**************************************************************************** + +Initial release 4.01 10/05/2008 + + - Posted messages can be stored in database table or csv file + - All components of message entry are routed through sanitizer prior to storage + - Dynamic resizing of pop-up window has been disabled until further testing + - Text entry field now contains options for single line text box or + multi-line text area with optional alerts when approaching message + length limit + - Display of registered user's avatar included in standard message block + - OnUpdate function provided so database table will be created (if + necessary) when updating from version 4.0 beta + + NOTE: If your current version of Shoutbox is earlier than v4.0 beta, it is + not known whether performing a module update will work properly. Our + recommendation would be to uninstall the current Shoutbox module and + perform a New Install. + +Update Release 4.02 11/01/2008 + + - Bug Fix: Typo in include/class.php causing some file storage processing + to be performed incorrectly + - Add guest avatar + - Popup window dynamic resizing re-designed using div tags and css + - Add captcha for guest posting with good guest mode + The module contains it's own copy of XOOPS 2.3.0 captcha class with + modifications to meet ShoutBox module requirements + - Add captcha enable/disable preference parameter + - Enable module style sheet so user can customize appearance + - Change Refresh and Popup from links to buttons in Shoutbox block + +Update Release 4.03 11/15/2008 + + - Bug Fix: Update text sanitizer functions to eliminate debug deprecated message + - Add wordwrap preference parameter for controlling message line display length + - Update style sheet to coincide with wordwrap feature so horizontal scroll bar + is automatically removed when not necessary + - Add display avatar preference parameter to enable/disable display of avatars + in the ShoutBox block. NOTE: This has no affect on Popup window. + - Remove local copy of captcha class. + - Add captcha support for Frameworks/captcha class. + +Update Release 4.04 12/01/2008 + + - Clean up some minor defects generating notices in debug mode + - Bug Fix: Add passing UID to template to correct page refresh problem + - Redefine how refresh works similar to the way it was in v4.02 + - Anytime an incorrect captcha code is entered the full page will refresh + regardless of the type of captcha class used + - If using Frameworks/captcha the full page will refresh for any message + entry performed by guest + - If using Core captcha only the message box, shout entry and captcha fields + will be refreshed when an entry is performed by guest + - Add word censoring support + - Add selectable guest avatars. If guest avatar is set to None then blank.gif + is placed in the avatar location. + - Add option for disable/enable sound on new message when using popup window + +Update Release 4.05 12/15/2008 + + - Add padding to sideboxcontent in module style sheet to provide some space + between avatars and message text + - Add javascript code in shoutframe and popupframe templates so URL's, when + selected, open in a new window. (target ="_blank") + NOTE: Special thanks to blueteen for this code + - Add comments to shoutbox.css style sheet to help users in making changes + - Add definitions in language files to eliminate all hard-coded text used + in templates + - Improve text sanitizing used in storing and retrieving messages + - Eliminate extra line feeds in text entry when stored as File type + +Credits: +======== +At the very beginning this module was developed for e-xoops aka runcms (XOOPS fork) but I ported it to XOOPS and never stopped porting... ;-) + +Thx for everything... +- Herko [herkocoomans.net]: Where would I be without his spiritual help? +- Shine aka Triangle [adoptietrefpunt.nl]: Without her guidance I wouldn't have been the same person! +- All the rest I now forget but couldn't live without! + +And those who helped developing me with shoutbox... +- Wizanda [wizanda.co.uk]: Kicking my ass for not following W3C guidelines... *shame* +- Masterprut [fueldump.de]: Helped me with those stupid javascript security measures (read: my scripting skills). +- Ackbarr: Small things, together big! + +Version 4.0 Beta +================ +* Fixed: Fixed XHTML so Tidy loves it (Thx to Wizanda [wizanda.co.uk] & Masterprut [fueldump.de]) +* Fixed: Javascript optimized so it isn't a mess anymore. + +* Added: You can now choose the storage method: file or database. Database is still experimental! +* Added: It's now possible to edit/remove shouts [database only] +* Added: You can now select the height and width of the popup. Popup stays resizeable! +* Added: The remove button now asks or you are sure you want to remove all posts. + +* Todo: CAPTCHA integration for guest users +* Todo: Make storage file moveable +* Todo: Fix known problem with popup for users that use crappy browser (aka IE) +* Todo: Fix unknown bugs :-) + +Version 3.2: +============ +* Fixed: Anonymous users could post when generating own form + +Version 3.1: +============ +* Fixed: Possible warning in popup. +* Fixed: Wrong variable selection in popupframe +* Fixed: Forgot ":" after anonymous name... + +* Changed: If you now deselect "guest" may post and block is visible to guests they will see the shouts but won't be able to add. This option gots now a logic! +* Changed: Almost all repeated actions are now packed in one class. This will speedy the conversion to a sql version. + +* Added: You got now a maxview function. This is seperated from the trim function. + +Install Notes: +============== +Deactivate, uninstall, remove folder if you upgrade from older version. Then upload new version and install. Be sure to set the Order of the Module to hide. (System Admin - Modules - Height -> '0') + +If you set the access rights be sure to change the rights for the block and the main - THIS IS NECESSARY -, if you just allow access to the Block, the groupmembers wont see the frame content, instead of this the shoutbox will load the non acess page and in the non access page there will be another shoutbox clone again and that will also display the no access page ... + +If you want to use a custom theme for the shoutbox, rename the the file style/shoutbox.temp.css to style/shoutbox.css and change it so it will fit your needs. + +Help: +===== +1. My database is really BIG even with trimming enabled? +-------------------------------------------------------- +Known problem. Shoutbox will ignore the trimming function when your select the database as your favorite storage method. This should be fixed in the next version. For now: live with or execute query "DELETE * FROM shoutbox WHERE time < ...". + +2. If I open main I get... +-------------------------- +You shouldn't open the mainpage of this module. Shoutbox exists as block and popup. Search for it in System Admin - Blocks. + +3. This module sucks! +--------------------- +Good for you. Move on! + + + Added: XoopsModules/shoutbox/trunk/shoutbox/docs/credits.txt =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/docs/credits.txt (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/docs/credits.txt 2012-07-31 13:13:02 UTC (rev 9963) @@ -0,0 +1,8 @@ +Credits +=============== + +Originally developed by Tank. + +Version 5.0 released by Trabis (Ricardo Costa). + +Version 5.01 was updated to XOOPS 2.5.5 Standard GUI by Michael Beck (Mamba) \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/docs/index.html =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/docs/index.html (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/docs/index.html 2012-07-31 13:13:02 UTC (rev 9963) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/docs/install.txt =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/docs/install.txt (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/docs/install.txt 2012-07-31 13:13:02 UTC (rev 9963) @@ -0,0 +1,14 @@ +INSTALL/UNISTALL +================= + +No special measures necessary, follow the standard installation process and extract the module folder into the ../modules directory. Install the module through Admin -> System Module -> Modules. + +Detailed instructions on installing modules are available in the XOOPS Operations Manual: http://goo.gl/adT2i + +UPGRADE WARNING for version 5.0+ + +Database has changed so please do not upload this package over the old shoutbox. +- Unistall shoutbox +- Delete all files +- Upload new files +- Install Shoutbox \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/docs/lang_diff.txt =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/docs/lang_diff.txt (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/docs/lang_diff.txt 2012-07-31 13:13:02 UTC (rev 9963) @@ -0,0 +1,14 @@ +LANGUAGE DIFFERENCES +===================== + +Below are language differences from a version to next version. + +Legend : ++ Added +- Removed +* Modified +x renamed + +--------------------------------------- +5.01 Beta 1 2012-07-30 +--------------------------------------- Added: XoopsModules/shoutbox/trunk/shoutbox/docs/license.txt =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/docs/license.txt (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/docs/license.txt 2012-07-31 13:13:02 UTC (rev 9963) @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + 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. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. Added: XoopsModules/shoutbox/trunk/shoutbox/docs/readme.txt =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/docs/readme.txt (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/docs/readme.txt 2012-07-31 13:13:02 UTC (rev 9963) @@ -0,0 +1,39 @@ +Shoutbox is an XOOPS module that provides an interactive block and pop-up +window for visitors to post and view messages. + +UPGRADE WARNING for version 5.0+ + +Database has changed so please do not upload this package over the old shoutbox. +- Unistall shoutbox +- Delete all files +- Upload new files +- Install Shoutbox + +FRESH Install Instructions: +1) After downloading, unzip the package +2) Upload the directory labeled 'shoutbox' to your server into the 'modules' subdirectory +3) Select Administration Menu >> System >> Modules +4) Scroll to bottom of screen and click the install icon associated with Shoutbox module +5) Don't forget to modify Shoutbox Preferences for desired features + +Using Word Censor +For word censoring go to Admin Menu -> System -> Preferences -> Word Censoring Options +enable word censoring and update the fields for bad words to censor and the replacement +phrase to be used. Visitors will see the replacement text wherever bad words are +detected. The original unaltered text entry can be viewed through the module admin +interface by selecting Database or File as applicable. + +Modifying Guest Avatars +You can replace the guest avatars supplied with the module release to your own +creations. The files are located in the shoutbox/images/guestavatars/ subdirectory. +The files are labeled: + guest1.gif + guest2.gif + guest3.gif + guest4.gif + guest5.gif +Each image is 80px wide by 80px high. + +For defining display attributes of your shoutbox a style sheet has been provided. +The file is /shoutbox/style/shoutbox.css +You can open this file and change tag attribute definitions to suit your needs. \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/images/off.png =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/trunk/shoutbox/images/off.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/trunk/shoutbox/images/on.png =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/trunk/shoutbox/images/on.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: XoopsModules/shoutbox/trunk/shoutbox/language/english/admin.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/language/english/admin.php 2012-07-31 13:11:37 UTC (rev 9962) +++ XoopsModules/shoutbox/trunk/shoutbox/language/english/admin.php 2012-07-31 13:13:02 UTC (rev 9963) @@ -45,4 +45,5 @@ define('_AM_SH_FILE_UPDATED','File updated'); define('_AM_SH_FILE_FAILED','Could not open file!'); -?> \ No newline at end of file +//5.01 +define('_AM_SHOUTBOX_CURRENT_SELECTION','Current Selection'); \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/language/english/help/help.html =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/language/english/help/help.html (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/language/english/help/help.html 2012-07-31 13:13:02 UTC (rev 9963) @@ -0,0 +1,34 @@ +<div id="help-template" class="outer"> + <h1 class="head">Help: + <a class="ui-corner-all tooltip" href="<{$xoops_url}>/modules/shoutbox/admin/index.php" + title="Back to the administration of Shoutbox"> Shoutbox + <img src="<{xoAdminIcons home.png}>" + alt="Back to the Administration of Shoutbox"/> + </a></h1> + + <h4 class="odd">Description</h4> + + <p class="even">Shoutbox is an XOOPS module that provides an interactive block and pop-up + window for visitors to post and view messages. .<br /> <br /> + </p> + + <h4 class="odd">Install/uninstall</h4> + + <p class="even">No special measures necessary, follow the standard installation process – + extract the module folder into the ../modules directory. Install the + module through Admin -> System Module -> Modules.<br /> <br /> + Detailed instructions on installing modules are available in the + <a href="http://goo.gl/adT2i">XOOPS Operations Manual</a> </p> + + + <h4 class="odd">Operating instructions</h4> + + This module and its operations are very simple.<br /> <br /> + Detailed instructions on configuring the access rights for user groups are available in the + <a href="http://goo.gl/adT2i">XOOPS Operations Manual</a><br /> <br /> + + <h4 class="odd">Tutorial</h4> + + <p class="even">There is no tutorial available at the moment.</p> + +</div> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/language/english/help/index.html =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/language/english/help/index.html (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/language/english/help/index.html 2012-07-31 13:13:02 UTC (rev 9963) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Deleted: XoopsModules/shoutbox/trunk/shoutbox/readme.txt =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/readme.txt 2012-07-31 13:11:37 UTC (rev 9962) +++ XoopsModules/shoutbox/trunk/shoutbox/readme.txt 2012-07-31 13:13:02 UTC (rev 9963) @@ -1,32 +0,0 @@ -Shoutbox is an XOOPS module that provides an interactive block and pop-up -window for visitors to post and view messages. For background info and -previous developer credits refer to "readme_archive.txt". - -Install Instructions: -1) After downloading, unzip the package -2) Upload the directory labeled 'shoutbox' to your server into the 'modules' subdirectory -3) Select Administration Menu >> System >> Modules -4) Scroll to bottom of screen and click the install icon associated with Shoutbox module -5) Don't forget to modify Shoutbox Preferences for desired features - -Using Word Censor -For word censoring go to Admin Menu -> System -> Preferences -> Word Censoring Options -enable word censoring and update the fields for bad words to censor and the replacement -phrase to be used. Visitors will see the replacement text wherever bad words are -detected. The original unaltered text entry can be viewed through the module admin -interface by selecting Database or File as applicable. - -Modifying Guest Avatars -You can replace the guest avatars supplied with the module release to your own -creations. The files are located in the shoutbox/images/guestavatars/ subdirectory. -The files are labeled: - guest1.gif - guest2.gif - guest3.gif - guest4.gif - guest5.gif -Each image is 80px wide by 80px high. - -For defining display attributes of your shoutbox a style sheet has been provided. -The file is /shoutbox/style/shoutbox.css -You can open this file and change tag attribute definitions to suit your needs. \ No newline at end of file Deleted: XoopsModules/shoutbox/trunk/shoutbox/readme_archive.txt =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/readme_archive.txt 2012-07-31 13:11:37 UTC (rev 9962) +++ XoopsModules/shoutbox/trunk/shoutbox/readme_archive.txt 2012-07-31 13:13:02 UTC (rev 9963) @@ -1,146 +0,0 @@ -**************************************************************************** - - Shoutbox v4.05 Release| Xoops Module by Tank | Dec 15, 2008 - Website: http://www.customvirtualdesigns.com - -**************************************************************************** - -Initial release 4.01 10/05/2008 - - - Posted messages can be stored in database table or csv file - - All components of message entry are routed through sanitizer prior to storage - - Dynamic resizing of pop-up window has been disabled until further testing - - Text entry field now contains options for single line text box or - multi-line text area with optional alerts when approaching message - length limit - - Display of registered user's avatar included in standard message block - - OnUpdate function provided so database table w... [truncated message content] |
From: <be...@us...> - 2012-07-31 13:11:51
|
Revision: 9962 http://xoops.svn.sourceforge.net/xoops/?rev=9962&view=rev Author: beckmi Date: 2012-07-31 13:11:37 +0000 (Tue, 31 Jul 2012) Log Message: ----------- Adding Release 5.0 Added Paths: ----------- XoopsModules/shoutbox/releases/5.0/ XoopsModules/shoutbox/releases/5.0/shoutbox/ XoopsModules/shoutbox/releases/5.0/shoutbox/admin/ XoopsModules/shoutbox/releases/5.0/shoutbox/admin/index.php XoopsModules/shoutbox/releases/5.0/shoutbox/admin/menu.php XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxEdit.php XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxFile.php XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxList.php XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxRemove.php XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxSave.php XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxStatus.php XoopsModules/shoutbox/releases/5.0/shoutbox/blocks/ XoopsModules/shoutbox/releases/5.0/shoutbox/blocks/index.html XoopsModules/shoutbox/releases/5.0/shoutbox/blocks/shoutbox.php XoopsModules/shoutbox/releases/5.0/shoutbox/class/ XoopsModules/shoutbox/releases/5.0/shoutbox/class/database.php XoopsModules/shoutbox/releases/5.0/shoutbox/class/file.php XoopsModules/shoutbox/releases/5.0/shoutbox/class/index.html XoopsModules/shoutbox/releases/5.0/shoutbox/class/shoutbox.php XoopsModules/shoutbox/releases/5.0/shoutbox/header.php XoopsModules/shoutbox/releases/5.0/shoutbox/images/ XoopsModules/shoutbox/releases/5.0/shoutbox/images/guestavatars/ XoopsModules/shoutbox/releases/5.0/shoutbox/images/guestavatars/guest1.gif XoopsModules/shoutbox/releases/5.0/shoutbox/images/guestavatars/guest2.gif XoopsModules/shoutbox/releases/5.0/shoutbox/images/guestavatars/guest3.gif XoopsModules/shoutbox/releases/5.0/shoutbox/images/guestavatars/guest4.gif XoopsModules/shoutbox/releases/5.0/shoutbox/images/guestavatars/guest5.gif XoopsModules/shoutbox/releases/5.0/shoutbox/images/index.html XoopsModules/shoutbox/releases/5.0/shoutbox/images/module_logo.png XoopsModules/shoutbox/releases/5.0/shoutbox/images/newlogoblank.png XoopsModules/shoutbox/releases/5.0/shoutbox/images/nonavatar.gif XoopsModules/shoutbox/releases/5.0/shoutbox/images/offline.gif XoopsModules/shoutbox/releases/5.0/shoutbox/images/online.gif XoopsModules/shoutbox/releases/5.0/shoutbox/include/ XoopsModules/shoutbox/releases/5.0/shoutbox/include/functions.php XoopsModules/shoutbox/releases/5.0/shoutbox/include/index.html XoopsModules/shoutbox/releases/5.0/shoutbox/include/module.php XoopsModules/shoutbox/releases/5.0/shoutbox/index.html XoopsModules/shoutbox/releases/5.0/shoutbox/language/ XoopsModules/shoutbox/releases/5.0/shoutbox/language/english/ XoopsModules/shoutbox/releases/5.0/shoutbox/language/english/admin.php XoopsModules/shoutbox/releases/5.0/shoutbox/language/english/blocks.php XoopsModules/shoutbox/releases/5.0/shoutbox/language/english/index.html XoopsModules/shoutbox/releases/5.0/shoutbox/language/english/main.php XoopsModules/shoutbox/releases/5.0/shoutbox/language/english/modinfo.php XoopsModules/shoutbox/releases/5.0/shoutbox/language/index.html XoopsModules/shoutbox/releases/5.0/shoutbox/new_shout.wav XoopsModules/shoutbox/releases/5.0/shoutbox/online.php XoopsModules/shoutbox/releases/5.0/shoutbox/popup.php XoopsModules/shoutbox/releases/5.0/shoutbox/readme.txt XoopsModules/shoutbox/releases/5.0/shoutbox/readme_archive.txt XoopsModules/shoutbox/releases/5.0/shoutbox/shoutframe.php XoopsModules/shoutbox/releases/5.0/shoutbox/shoutpopupframe.php XoopsModules/shoutbox/releases/5.0/shoutbox/sql/ XoopsModules/shoutbox/releases/5.0/shoutbox/sql/mysql.sql XoopsModules/shoutbox/releases/5.0/shoutbox/style/ XoopsModules/shoutbox/releases/5.0/shoutbox/style/index.html XoopsModules/shoutbox/releases/5.0/shoutbox/style/shoutbox2.css XoopsModules/shoutbox/releases/5.0/shoutbox/templates/ XoopsModules/shoutbox/releases/5.0/shoutbox/templates/blocks/ XoopsModules/shoutbox/releases/5.0/shoutbox/templates/blocks/index.html XoopsModules/shoutbox/releases/5.0/shoutbox/templates/blocks/shoutbox_block.html XoopsModules/shoutbox/releases/5.0/shoutbox/templates/index.html XoopsModules/shoutbox/releases/5.0/shoutbox/templates/shoutbox_online.html XoopsModules/shoutbox/releases/5.0/shoutbox/templates/shoutbox_popup.html XoopsModules/shoutbox/releases/5.0/shoutbox/templates/shoutbox_popupframe.html XoopsModules/shoutbox/releases/5.0/shoutbox/templates/shoutbox_popupheader.html XoopsModules/shoutbox/releases/5.0/shoutbox/templates/shoutbox_shoutframe.html XoopsModules/shoutbox/releases/5.0/shoutbox/xoops_version.php Added: XoopsModules/shoutbox/releases/5.0/shoutbox/admin/index.php =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/admin/index.php (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/admin/index.php 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1,125 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: index.php 0 2010-01-29 18:47:04Z trabis $ + */ +// Hello admin? +include '../../../include/cp_header.php'; +// Admin! + +function shoutboxDefault() +{ + global $xoopsModuleConfig; + + if($xoopsModuleConfig['storage_type'] == 'database') { + $database = '['._AM_SH_EDIT_INUSE.']'; + $file = ''; + } else if($xoopsModuleConfig['storage_type'] == 'file') { + $database = ''; + $file = '['._AM_SH_EDIT_INUSE.']'; + } + + echo " + <h1>"._AM_SH_CONFIG."</h1> + <br /> + "._AM_SH_CHOOSE." + <ul> + <li><a href='index.php?op=shoutboxList'>" . _AM_SH_EDIT_DB . "</a> $database</li> + <li><a href='index.php?op=shoutboxFile'>" . _AM_SH_EDIT_FILE . "</a> $file</li> + <li><a href='index.php?op=shoutboxStatus'>" . _AM_SH_STATUSOF . "</a></li> + </ul> + <br /> + "; +} + +function shoutboxList() +{ + global $xoopsDB; + include 'shoutboxList.php'; +} + +function shoutboxEdit() +{ + global $xoopsDB; + include 'shoutboxEdit.php'; +} + +function shoutboxSave() +{ + global $xoopsDB; + include 'shoutboxSave.php'; +} + +function shoutboxRemove() +{ + global $xoopsDB; + include 'shoutboxRemove.php'; +} + +function shoutboxFile() +{ + global $xoopsDB; + include 'shoutboxFile.php'; +} + +function shoutboxStatus() +{ + global $xoopsDB, $xoopsModuleConfig; + include 'shoutboxStatus.php'; +} + +$op = empty($_GET["op"]) ? '' : $_GET["op"]; + +switch ($op){ + case "shoutboxList": + xoops_cp_header(); + shoutboxList(); + break; + + case "shoutboxEdit": + xoops_cp_header(); + shoutboxEdit(); + break; + + case "shoutboxSave": + shoutboxSave(); + break; + + case "shoutboxRemove": + shoutboxRemove(); + break; + + case "shoutboxFile": + xoops_cp_header(); + shoutboxFile(); + break; + + case "shoutboxStatus": + xoops_cp_header(); + shoutboxStatus(); + break; + + default: + xoops_cp_header(); + shoutboxDefault(); + break; + +} + +xoops_cp_footer(); +?> \ No newline at end of file Added: XoopsModules/shoutbox/releases/5.0/shoutbox/admin/menu.php =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/admin/menu.php (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/admin/menu.php 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1,28 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: menu.php 0 2010-01-29 18:47:04Z trabis $ + */ + +$adminmenu[1]['title'] = _MI_SHOUTBOX_MENU_DB; +$adminmenu[1]['link'] = "admin/index.php?op=shoutboxList"; +$adminmenu[2]['title'] = _MI_SHOUTBOX_MENU_FILE; +$adminmenu[2]['link'] = "admin/index.php?op=shoutboxFile"; +$adminmenu[3]['title'] = _MI_SHOUTBOX_MENU_STATUS; +$adminmenu[3]['link'] = "admin/index.php?op=shoutboxStatus"; +?> \ No newline at end of file Added: XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxEdit.php =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxEdit.php (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxEdit.php 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1,98 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: shoutboxEdit.php 0 2010-01-29 18:47:04Z trabis $ + */ + +if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/index.php')) { + exit(); +} + +include_once XOOPS_ROOT_PATH.'/class/module.textsanitizer.php'; + +$sanitizer = new MyTextSanitizer; + +// Check or ID is a number +$id = intval($_GET['id']); + +$handler = xoops_getModuleHandler('database', 'shoutbox'); + +// Check or we got a shout +if (!$obj = $handler->get($id)) { + /** + * Or we got none, or something really strange happend here... + */ + redirect_header("index.php", 3, _AM_SH_INVALID_ID); +} + + +// Make code ready for preview +$shout = $obj->getValues(); +$shout['date'] = $obj->time(_DATESTRING); + +echo " +<form action='index.php?op=shoutboxSave' method='post'> +<table width='100%' class='outer' cellspacing='1'> +<tbody> +<tr> +<th colspan='2'>".sprintf(_AM_SH_EDIT_TITLE, $shout['date'])."</th> +</tr> +<tr valign='top' align='left'> +<td class='odd'> +<b>"._AM_SH_POSTER."</b> +</td> +<td class='even'>\n"; + +if($shout['uid'] != 0) { + echo "<input type='text' size='30' maxlength='30' name='shoutboxUname' value='$shout[uname]' readonly='readonly' />"; +} else { + echo "<input type='text' size='30' maxlength='30' name='shoutboxUname' value='$shout[uname]' />"; +} +echo " +</td> +</tr> +<tr valign='top' align='left'> +<td class='odd'> +<b>"._AM_SH_EDIT_FROM."</b> +</td> +<td class='even'> +<input type='text' size='30' maxlength='30' name='shoutboxIp' value='$shout[ip]' /> +</td> +</tr> +<tr valign='top' align='left'> +<td class='odd'> +<b>"._AM_SH_MESSAGE."</b> +</td> +<td class='even'> +<input type='text' name='shoutboxMessage' size='100' maxlength='200' value='$shout[message]' /> +</td> +</tr> +<tr class='foot'> +<td colspan='2' align='center'> +<input type='hidden' name='id' value='$shout[id]' /> +<input type='hidden' name='uid' value='$shout[uid]' /> + +<input type='submit' name='submit' value='"._SUBMIT."' /> +<input type='button' value='"._CANCEL."' onClick='location=\"index.php?op=shoutboxList\"' /> +</td> +</tr> +</tbody> +</table> +</form> +"; +?> \ No newline at end of file Added: XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxFile.php =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxFile.php (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxFile.php 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1,97 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: shoutboxFile.php 0 2010-01-29 18:47:04Z trabis $ + */ + +if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/index.php')) { + exit(); +} + +include_once XOOPS_ROOT_PATH . '/class/module.textsanitizer.php'; +$sanitizer =& MyTextSanitizer::getInstance(); + +$path = XOOPS_ROOT_PATH . '/uploads/shoutbox/shout.csv'; +$source = file_get_contents($path); +$source = $sanitizer->htmlSpecialChars($source); +$hash = sha1_file($path); +$invalidhash = false; + +if (!empty($_POST['action']) && $_POST['action'] == 'Update') { + if (empty($_POST['forceUpdate']) && $hash != $_POST['hash']) { + echo "<h1>" . _AM_SH_FILE_HASH_FAILED . "</h1>"; + $invalidhash = true; + $source = $sanitizer->stripSlashesGPC($_POST['shoutboxSource']); + $source = $sanitizer->htmlSpecialChars($source); + } else { + $source = $sanitizer->stripSlashesGPC($_POST['shoutboxSource']); + + if ($file = fopen($path, "w")) { + fwrite($file, $source); + fclose($file); + echo "<h1>"._AM_SH_FILE_UPDATED."</h1>"; + } else { + echo "<h1>"._AM_SH_FILE_FAILED."</h1>"; + } + } +} + +echo " +<form action='index.php?op=shoutboxFile' method='post'> +<table width='100%' class='outer' cellspacing='1'> +<tbody> +<tr> +<th colspan='2'>"._AM_SH_FILE_TITLE."</th> +</tr> +<tr valign='top' align='left'> +<td class='odd' width='20%'> +<b>"._AM_SH_FILE_SOURCE."</b><br /> +"._AM_SH_FILE_SOURCED." +</td> +<td class='even'> +<textarea name='shoutboxSource' rows='25' cols='98%'>$source</textarea> +</td> +</tr>"; + +if ($invalidhash == true) { + echo " + <tr valign='top' align='left'> + <td class='odd' width='20%'> + <b>"._AM_SH_FILE_HASH."</b><br /> + "._AM_SH_FILE_HASHD." + </td> + <td class='even'> + <input type='checkbox' name='forceUpdate' value='yes' checked='checked' /> + </td> + </tr> + "; +} + +echo " +<tr class='foot'> +<td colspan='2' align='center'> +<input type='hidden' name='hash' value='$hash' /> +<input type='hidden' name='action' value='Update' /> +<input type='submit' name='submit' value='"._SUBMIT."' /> +</td> +</tr> +<tbody> +</table> +</form>"; + +?> \ No newline at end of file Added: XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxList.php =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxList.php (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxList.php 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1,71 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: shoutboxList.php 0 2010-01-29 18:47:04Z trabis $ + */ + +if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/index.php')) { + exit(); +} + +include_once(XOOPS_ROOT_PATH.'/class/module.textsanitizer.php'); +$sanitizer = new MyTextSanitizer; + +echo "<h4 style='text-align: left;'>"._AM_SH_CONFIG."</h4>\n"; +echo " +<table class='outer' width='100%' cellpadding='4' cellspacing='1'> +<tr> +<th width='15%' align='left'>"._AM_SH_POSTER."</th> +<th width='15%' align='left'>"._AM_SH_LIST_TIME."</th> +<th width='55%' align='center'>"._AM_SH_MESSAGE."</th> +<th width='15%' align='right'>"._AM_SH_LIST_ACTION."</th> +</tr>\n"; + +$evodd = "even"; +$result = $xoopsDB->query("SELECT `id`, `uid`, `uname`, `time`, `ip`, `message` FROM ".$xoopsDB->prefix('shoutbox')." ORDER BY `time` DESC LIMIT 0, 50"); + +if(!$xoopsDB->getRowsNum($result)) { + echo "<tr class='even' align='center'><td colspan='4'>"._AM_SH_LIST_NOSHOUTS."</td></tr>"; +} + +while (list($msg_id, $user_id, $uname, $time, $ip, $message) = $xoopsDB->fetchRow($result)) { + + if ($evodd == "even") { + echo "<tr class='even' align='center' valign='top'>\n"; + } else { + echo "<tr class='even' align='center' valign='top'>\n"; + } + + echo "<td align='left'> + <div title='UID: $user_id | IP: $ip'>$uname"; if($user_id == 0) { echo '*'; } echo "</div> + </td> + <td align='left'> + ".formatTimestamp($time, _DATESTRING)." + </td> + <td align='center'> + $message + </td> + <td align='right'> + <a href='index.php?op=shoutboxEdit&id=$msg_id'>"._EDIT."</a> / <a href='index.php?op=shoutboxRemove&id=$msg_id'>"._DELETE."</a> + </td>"; + + echo "</tr>"; +} + +echo "<tr class='foot'><td colspan='4'> </td></tr></table>"; +?> \ No newline at end of file Added: XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxRemove.php =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxRemove.php (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxRemove.php 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1,93 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: shoutboxRemove.php 0 2010-01-29 18:47:04Z trabis $ + */ +if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/index.php')) { + exit(); +} +$id = intval($_REQUEST['id']); +$handler = xoops_getModuleHandler('database', 'shoutbox'); +// Request or confirmation? +if (!empty($_POST['confirm']) && $_POST['confirm'] == 'yes') { + // Sanitize inputs + $obj = $handler->get($id); + if (is_object($obj) && $handler->delete($obj)) { + redirect_header("index.php", 2, _AM_SH_REMOVE_SUCCES); + } else { + redirect_header("index.php", 4, _AM_SH_REMOVE_FAILURE); + } +} else { + xoops_cp_header(); + // Check or we got a shout + if (!$obj = $handler->get($id)) { + /** + * Or we got none, or something really strange happend here... + */ + redirect_header("index.php", 3, _AM_SH_INVALID_ID); + } + + // Make code ready for preview + $shout = $obj->getValues(); + $shout['date'] = $obj->time(_DATESTRING); + + echo " + <form action='index.php?op=shoutboxRemove' method='post'> + <table width='100%' class='outer' cellspacing='1'> + <tbody> + <tr> + <th colspan='2'>".sprintf(_AM_SH_REMOVE_TITLE, $shout['date'])."</th> + </tr> + <tr valign='top' align='left'> + <td class='odd'> + <b>"._AM_SH_POSTER."</b> + </td> + <td class='even'> + $shout[uname] + </td> + </tr> + <tr valign='top' align='left'> + <td class='odd'> + <b>"._AM_SH_REMOVE_FROM."</b> + </td> + <td class='even'> + $shout[ip] + </td> + </tr> + <tr valign='top' align='left'> + <td class='odd'> + <b>"._AM_SH_MESSAGE."</b> + </td> + <td class='even'> + $shout[message] + </td> + </tr> + <tr class='foot'> + <td colspan='2' align='center'> + <input type='hidden' name='id' value='$shout[id]' /> + <input type='hidden' name='confirm' value='yes' /> + <input type='submit' name='submit' value='"._DELETE."' /> + <input type='button' value='"._CANCEL."' onClick='location=\"index.php?op=shoutboxList\"' /> + </td> + </tr> + </tbody> + </table> + </form> + "; +} +?> \ No newline at end of file Added: XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxSave.php =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxSave.php (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxSave.php 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1,53 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: shoutboxSave.php 0 2010-01-29 18:47:04Z trabis $ + */ + +if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/index.php')) { + exit(); +} + +$handler = xoops_getModuleHandler('database', 'shoutbox'); + +$id = intval($_POST['id']); +if (!$obj = $handler->get($id)) { + /** + * Or we got none, or something really strange happend here... + */ + redirect_header("index.php", 3, _AM_SH_INVALID_ID); +} + +if (!preg_match("/^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$/", $_POST['shoutboxIp'])) { + // This check is far from perfect but... + exit('Whoops! [ERROR 24]'); +} + +$obj->setVar('uname', $_POST['shoutboxUname']); +$obj->setVar('ip', $_POST['shoutboxIp']); +$obj->setVar('message', $_POST['shoutboxMessage']); + + +// Execute query +if ($handler->insert($obj)) { + redirect_header("index.php", 2, "Shout updated!"); +} else { + redirect_header("index.php", 4, "Error - Could not execute query..."); +} + +?> \ No newline at end of file Added: XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxStatus.php =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxStatus.php (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/admin/shoutboxStatus.php 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1,111 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: shoutboxStatus.php 0 2010-01-29 18:47:04Z trabis $ + */ + +if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/index.php')) { + exit(); +} + +// Count shouts in database and file +// Database: +$query = $xoopsDB->query("SELECT count(*) FROM ".$xoopsDB->prefix("shoutbox")); +$query = $xoopsDB->fetchRow($query); +$count_database = $query[0]; +// File: +$path = XOOPS_ROOT_PATH.'/uploads/shoutbox/shout.csv'; +$count_file = count(file($path)); + +// Size +// Database: +// [Source: http://www.webmasterworld.com/forum88/2069.htm] +$rows = $xoopsDB->queryF("SHOW table STATUS"); +while ($row = $xoopsDB->fetchBoth($rows)) { + if($row['Name'] == $xoopsDB->prefix("shoutbox")) { + $size_database = $row['Data_length'] + $row['Index_length']; + } +} +// File: +$size_file = filesize($path); + +echo " +<table width='100%' class='outer' cellspacing='1'> +<tbody> +<tr> +<th colspan='2'>"._AM_SH_STATUS_TITLE."</th> +</tr> + + +<tr valign='top' align='left'> +<td class='odd'> +<b>"._AM_SH_STATUS_STORAGETYPE."</b> +</td> +<td class='even'> +$xoopsModuleConfig[storage_type] +</td> +</tr> +<tr valign='top' align='left'> +<td class='odd'> +<ul> +<li>"._AM_SH_STATUS_INDB."</li> +</ul> +</td> +<td class='even'> +$count_database +</td> +</tr> +<tr valign='top' align='left'> +<td class='odd'> +<ul> +<li>"._AM_SH_STATUS_INFILE."</li> +</ul> +</td> +<td class='even'> +$count_file +</td> +</tr> + + +<tr valign='top' align='left'> +<td class='odd'> +<b>"._AM_SH_STATUS_SIZEDB."</b> +</td> +<td class='even'> +$size_database bytes +</td> +</tr> +<tr valign='top' align='left'> +<td class='odd'> +<b>"._AM_SH_STATUS_SIZEFILE."</b> +</td> +<td class='even'> +$size_file bytes +</td> +</tr> + + +<tr class='foot'> +<td colspan='2' align='center'> + +</td> +</tr> +</tbody> +</table> +"; +?> \ No newline at end of file Added: XoopsModules/shoutbox/releases/5.0/shoutbox/blocks/index.html =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/blocks/index.html (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/blocks/index.html 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/shoutbox/releases/5.0/shoutbox/blocks/shoutbox.php =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/blocks/shoutbox.php (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/blocks/shoutbox.php 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1,68 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: shoutbox.php 0 2010-01-29 18:47:04Z trabis $ + */ + +function b_shoutbox_show($options) +{ + include_once XOOPS_ROOT_PATH . '/modules/shoutbox/include/functions.php'; + global $xoopsUser, $xoopsConfig; + + $module_handler =& xoops_gethandler('module'); + $module =& $module_handler->getByDirname('shoutbox'); + $config_handler =& xoops_gethandler('config'); + $block =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); + + if ($block['captcha_enable']) { + xoops_load('XoopsFormCaptcha'); + $shoutcaptcha = new XoopsFormCaptcha(); + $block['captcha_caption'] = $shoutcaptcha->getCaption(); + $block['captcha_render'] = $shoutcaptcha->render(); + } + + $block['shoutbox_access'] = false; + if (is_object($xoopsUser)) { + $block['shoutbox_access'] = true; + $block['shoutbox_uname'] = $xoopsUser->getVar('uname'); + $block['shoutbox_userid'] = $xoopsUser->getVar('uid'); + } else if ($block['guests_may_post']) { + $block['shoutbox_access'] = true; + $block['shoutbox_uname'] = shoutbox_makeGuestName(); + $block['shoutbox_uid'] = 0; + } + + $block['shoutbox_anonymous'] = $xoopsConfig['anonymous']; + + if ($block['show_smileybar']) { + ob_start(); + include_once XOOPS_ROOT_PATH . '/include/xoopscodes.php'; + xoopsSmilies('shoutfield'); + $block['shoutbox_smibar'] = ob_get_contents(); + ob_end_clean(); + $block['shoutbox_smibar'] = str_replace("<a href='#moresmiley' onmouseover='style.cursor=\"hand\"' alt=''","<a href='#moresmiley' onmouseover='style.cursor=\"hand\"' title='More'", $block['shoutbox_smibar']); + } + + if (!is_object($xoopsUser) && !$block['popup_guests']) { + $block['popup'] = false; + } + + return $block; +} + +?> \ No newline at end of file Added: XoopsModules/shoutbox/releases/5.0/shoutbox/class/database.php =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/class/database.php (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/class/database.php 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1,111 @@ +<?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. + */ + +/** + * Shoutbox class + * + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @since 5.0 + * @author trabis <lus...@gm...> + * @version $Id: db.php 0 2010-01-06 18:47:04Z trabis $ + */ + +defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined"); + +class ShoutboxDatabase extends XoopsObject +{ + /** + * constructor + */ + function ShoutboxDatabase() + { + $this->initVar("id", XOBJ_DTYPE_INT); + $this->initVar("uid", XOBJ_DTYPE_INT); + $this->initVar("uname", XOBJ_DTYPE_TXTBOX); + $this->initVar("time", XOBJ_DTYPE_STIME); + $this->initVar("ip", XOBJ_DTYPE_TXTBOX); + $this->initVar("message", XOBJ_DTYPE_TXTAREA); + + $this->initVar("dohtml", XOBJ_DTYPE_INT, 0); + $this->initVar("doxcode", XOBJ_DTYPE_INT, 0); + $this->initVar("dosmiley", XOBJ_DTYPE_INT, 1); + $this->initVar("doimage", XOBJ_DTYPE_INT, 1); + $this->initVar("dobr", XOBJ_DTYPE_INT, 0); + } + + function time($dateFormat = 's', $format = 'S') + { + return formatTimestamp($this->getVar('time', $format), $dateFormat); + } + +} + +class ShoutboxDatabaseHandler extends XoopsPersistableObjectHandler +{ + function ShoutboxDatabaseHandler(&$db) + { + $this->__construct($db); + } + + function __construct($db) + { + parent::__construct($db, 'shoutbox', 'ShoutboxDatabase', 'id', 'uid'); + } + + function createShout() + { + return $this->create(); + } + + function saveShout($obj) + { + return $this->insert($obj); + } + + function getShouts($limit) + { + $criteria = new CriteriaCompo(); + $criteria->setSort('time'); + $criteria->setOrder('DESC'); + $criteria->setStart(0); + $criteria->setLimit($limit); + return $this->getObjects($criteria); + } + + function pruneShouts($limit) + { + $criteria = new CriteriaCompo(); + $criteria->setSort('id'); + $criteria->setOrder('DESC'); + $criteria->setStart(0); + $criteria->setLimit($limit); + $objs = $this->getList($criteria, true); + unset($criteria); + $criteria = new Criteria('id', '(' . implode(',', array_keys($objs)) . ')', 'NOT IN'); + return $this->deleteAll($criteria); + } + + function deleteShouts() + { + return $this->deleteAll(); + } + + function shoutExists($message, $ip) + { + $myts =& MyTextSanitizer::getInstance(); + $criteria = new CriteriaCompo(new Criteria('message', $myts->addSlashes($message))); + $criteria->add(new Criteria('ip', $ip)); + return $this->getCount($criteria) ? true : false; + } +} +?> \ No newline at end of file Added: XoopsModules/shoutbox/releases/5.0/shoutbox/class/file.php =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/class/file.php (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/class/file.php 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1,150 @@ +<?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. + */ + +/** + * Shoutbox class + * + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @since 5.0 + * @author trabis <lus...@gm...> + * @version $Id: file.php 0 2010-01-06 18:47:04Z trabis $ + */ + +defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined"); + +class ShoutboxFile extends XoopsObject +{ + /** + * constructor + */ + function ShoutboxFile() + { + $this->initVar("id", XOBJ_DTYPE_INT); + $this->initVar("uid", XOBJ_DTYPE_INT); + $this->initVar("uname", XOBJ_DTYPE_TXTBOX); + $this->initVar("time", XOBJ_DTYPE_STIME); + $this->initVar("ip", XOBJ_DTYPE_TXTBOX); + $this->initVar("message", XOBJ_DTYPE_TXTAREA); + + $this->initVar("dohtml", XOBJ_DTYPE_INT, 0); + $this->initVar("doxcode", XOBJ_DTYPE_INT, 0); + $this->initVar("dosmiley", XOBJ_DTYPE_INT, 1); + $this->initVar("doimage", XOBJ_DTYPE_INT, 1); + $this->initVar("dobr", XOBJ_DTYPE_INT, 0); + } + + function time($dateFormat = 's', $format = 'S') + { + return formatTimestamp($this->getVar('time', $format), $dateFormat); + } + +} + +class ShoutboxFileHandler extends XoopsPersistableObjectHandler +{ + var $csvfile; + + function ShoutboxFileHandler(&$db) + { + $this->__construct($db); + } + + function __construct($db) + { + $this->csvfile = XOOPS_ROOT_PATH . '/uploads/shoutbox/shout.csv'; + parent::__construct($db, '', 'ShoutboxFile', 'id', 'uid'); + } + + function createShout() + { + return $this->create(); + } + + function saveShout($obj) + { + $f = fopen($this->csvfile, 'a'); + fwrite($f, $obj->getVar('uname', 'n') . '|' . + $obj->getVar('message', 'n') . '|' . + $obj->getVar('time', 'n') . '|' . + $obj->getVar('ip', 'n') . '|' . + $obj->getVar('uid', 'n') . "\n"); + fclose($f); + return true; + } + + function getShouts($limit) + { + $objs = array(); + $shouts = file($this->csvfile); + $count = count($shouts) - 1; + $i = 0; + for ($count; $count >= 0; $count--) { + if ($limit <= $i) { + break; + } + $oneline = array(); + $oneline = explode('|', $shouts[$count]); + + $obj = $this->create(); + $obj->setVar('uname', $oneline[0]); + $obj->setVar('message', $oneline[1]); + $obj->setVar('time', $oneline[2]); + $obj->setVar('ip' , $oneline[3]); + $obj->setVar('uid', $oneline[4]); + $objs[] =& $obj; + unset($obj); + $i++; + } + return $objs; + } + + function pruneShouts($limit) + { + $shouts = file($this->csvfile); + $totrim = count($shouts) - $limit; + if ($totrim > 0) { + for ($i = 0; $i < $totrim; $i++) { + array_shift($shouts); + } + $f = fopen($this->csvfile, 'w'); + foreach ($shouts as $i => $line) { + fputs($f, $line); + } + fclose($f); + } + return true; + } + + function deleteShouts() + { + $f = fopen($this->csvfile, 'w'); + fclose($f); + return true; + } + + function shoutExists($message, $ip) + { + $shouts = file($this->csvfile); + if (!empty($shouts)) { + $count = count($shouts) - 1; + $oneline = explode('|', $shouts[$count]); + if (count($oneline) != 0) { + if ($oneline[3] == $ip && $oneline[1] == $message) { + return true; + } + } + } + return false; + } +} +?> \ No newline at end of file Added: XoopsModules/shoutbox/releases/5.0/shoutbox/class/index.html =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/class/index.html (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/class/index.html 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/shoutbox/releases/5.0/shoutbox/class/shoutbox.php =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/class/shoutbox.php (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/class/shoutbox.php 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1,126 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: shoutbox.php 0 2010-01-29 18:47:04Z trabis $ + */ + +include_once dirname(dirname(__FILE__)) . '/include/functions.php'; + +class Shoutbox +{ + var $handler = ''; + + function Shoutbox($storage_type) + { + $this->handler =& xoops_getModuleHandler($storage_type, 'shoutbox'); + } + + function getDefaultAvatar() + { + if ($value = shoutbox_getOption('guest_avatar')) { + $avatar = XOOPS_URL . "/modules/shoutbox/images/guestavatars/guest" . $value . ".gif"; + } else { + $avatar = XOOPS_URL . '/uploags/blank.gif'; + } + return $avatar; + } + + function saveShout($uid, $uname, $message) + { + $myts =& MyTextSanitizer::getInstance(); + $obj = $this->handler->createShout(); + $obj->setVar('uid', $uid); + $obj->setVar('uname', $uname); + $obj->setVar('time', time()); + $obj->setVar('ip', getenv("REMOTE_ADDR")); + $obj->setVar('message', $message); + + if (!$this->handler->saveShout($obj)) { + return false; + } + + return true; + } + + function getShouts($online, $bbcode, $limit) + { + global $xoopsUser; + $shouts = array(); + $myts =& MyTextSanitizer::getInstance(); + $objs = $this->handler->getShouts($limit); + $i = 0; + foreach ($objs as $obj) { + $uid = $obj->getVar('uid'); + $shouts[$i]['uid'] = $uid; + $shouts[$i]['online'] = 0; + $shouts[$i]['url'] = ''; + $shouts[$i]['email'] = ''; + $shouts[$i]['avatar'] = $this->getDefaultAvatar(); + $shouts[$i]['uname'] = $obj->getVar('uname'); + $shouts[$i]['time'] = $obj->time(shoutbox_getOption('stamp_format')); + $shouts[$i]['ip'] = $obj->getVar('ip'); + + $obj->setVar('doxcode', $bbcode); + + $shouts[$i]['message'] = $myts->censorString($obj->getVar('message')); + if ($wordwrap = shoutbox_getOption('wordwrap_setting')) { + $shouts[$i]['message'] = wordwrap($shouts[$i]['message'], $wordwrap ,"\r\n", true); + } + + if ($uid != 0) { + $thisUser = new XoopsUser($uid); + if ($thisUser->isOnline()) { + $shouts[$i]['online'] = 1; + } + if ($thisUser->getVar("url") != "") { + $shouts[$i]['url'] = $thisUser->getVar("url"); + } + if ($thisUser->getVar("user_viewemail") == 1 || ($xoopsUser && $xoopsUser->isAdmin())) { + $shouts[$i]['email'] = $thisUser->getVar("email"); + } + $shouts[$i]['avatar'] = XOOPS_URL . '/uploads/' . $thisUser->getVar("user_avatar"); + } + $i++; + } + return $shouts; + } + + function pruneShouts($limit) + { + if ($limit > 0) { + return $this->handler->pruneShouts($limit); + } + return false; + } + + function deleteShouts() + { + global $xoopsUser; + if (!empty($xoopsUser) && $xoopsUser->isAdmin()) { + return $this->handler->deleteShouts(); + } + return false; + } + + function shoutExists($message) + { + return $this->handler->shoutExists($message, getenv("REMOTE_ADDR")); + } + +} +?> \ No newline at end of file Added: XoopsModules/shoutbox/releases/5.0/shoutbox/header.php =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/header.php (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/header.php 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1,49 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author trabis <lus...@gm...> + * @version $Id: header.php 0 2010-01-29 18:47:04Z trabis $ + */ + +include_once dirname(dirname(dirname(__FILE__))) . '/mainfile.php'; +include_once XOOPS_ROOT_PATH . '/class/template.php'; +error_reporting(0); +$GLOBALS['xoopsLogger']->activated = false; +$xoopsTpl = new XoopsTpl(); +$xoopsTpl->xoops_setCaching(0); + +$xoopsTpl->assign( +array( + 'xoops_theme' => $xoopsConfig['theme_set'], + 'xoops_imageurl' => XOOPS_THEME_URL.'/'.$xoopsConfig['theme_set'].'/', + 'xoops_themecss'=> xoops_getcss($xoopsConfig['theme_set']), + 'xoops_requesturi' => htmlspecialchars($GLOBALS['xoopsRequestUri'], ENT_QUOTES), + 'xoops_sitename' => htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES), + 'xoops_slogan' => htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES) +) +); +$xoopsTpl->assign('xoops_js', '<script type="text/javascript" src="'.XOOPS_URL.'/include/xoops.js"></script>'); +if (is_object($xoopsUser)) { + $xoopsTpl->assign(array('xoops_isuser' => true, 'xoops_userid' => $xoopsUser->getVar('uid'), 'xoops_uname' => $xoopsUser->getVar('uname'), 'xoops_isadmin' => $xoopsUserIsAdmin)); +} else { + $xoopsTpl->assign(array('xoops_isuser' => false, 'xoops_isadmin' => false)); +} + +if (is_file('style/shoutbox.css')) { + $xoopsTpl->assign('themecss', 'style/shoutbox.css'); +} else { + $xoopsTpl->assign('themecss', xoops_getcss()); +} +?> \ No newline at end of file Added: XoopsModules/shoutbox/releases/5.0/shoutbox/images/guestavatars/guest1.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/releases/5.0/shoutbox/images/guestavatars/guest1.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/releases/5.0/shoutbox/images/guestavatars/guest2.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/releases/5.0/shoutbox/images/guestavatars/guest2.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/releases/5.0/shoutbox/images/guestavatars/guest3.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/releases/5.0/shoutbox/images/guestavatars/guest3.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/releases/5.0/shoutbox/images/guestavatars/guest4.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/releases/5.0/shoutbox/images/guestavatars/guest4.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/releases/5.0/shoutbox/images/guestavatars/guest5.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/releases/5.0/shoutbox/images/guestavatars/guest5.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/releases/5.0/shoutbox/images/index.html =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/images/index.html (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/images/index.html 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/shoutbox/releases/5.0/shoutbox/images/module_logo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/releases/5.0/shoutbox/images/module_logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/releases/5.0/shoutbox/images/newlogoblank.png =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/releases/5.0/shoutbox/images/newlogoblank.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/releases/5.0/shoutbox/images/nonavatar.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/releases/5.0/shoutbox/images/nonavatar.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/releases/5.0/shoutbox/images/offline.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/releases/5.0/shoutbox/images/offline.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/releases/5.0/shoutbox/images/online.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/releases/5.0/shoutbox/images/online.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/releases/5.0/shoutbox/include/functions.php =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/include/functions.php (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/include/functions.php 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1,110 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: functions.php 0 2010-01-29 18:47:04Z trabis $ + */ + +function shoutbox_getOption($option, $dirname = 'shoutbox') +{ + static $modOptions = array(); + if (is_array($modOptions) && array_key_exists($option, $modOptions)) { + return $modOptions[$option]; + } + + $ret = null; + $module_handler =& xoops_gethandler('module'); + $module =& $module_handler->getByDirname($dirname); + $config_handler =& xoops_gethandler('config'); + if ($module) { + $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); + if (isset($moduleConfig[$option])) { + $ret = $moduleConfig[$option]; + } + } + $modOptions[$option] = $ret; + return $ret; +} + +function shoutbox_makeGuestName() +{ + global $xoopsConfig; + $ipadd = getenv('REMOTE_ADDR'); + $iparr = explode('.', $ipadd); + $ipadd = $iparr[0] + $iparr[1] + $iparr[2] + $iparr[3]; + $guestname = $xoopsConfig['anonymous'] . $ipadd; + return $guestname; +} + +function shoutbox_getUserName($uid = 0) +{ + xoops_load('XoopsUserUtility'); + $uname = XoopsUserUtility::getUnameFromId($uid, shoutbox_getOption('user_realname')); + return $uname; +} + +/** + * Most of these functions were written (originally) + * by Florian Solcher <e-xoops.alphalogic.org> + */ +function shoutbox_setCookie($timestamp) +{ + if (empty($_COOKIE['shoutcookie'])) { + setcookie("shoutcookie", $timestamp); + return false; + } + + if ($_COOKIE['shoutcookie'] < $timestamp) { + setcookie("shoutcookie", $timestamp); + return TRUE; + } else { + return FALSE; + } +} + +//irc like commands +function shoutbox_ircLike($command) +{ + global $xoopsModuleConfig, $xoopsUser, $special_stuff_head; + if ($command == "/quit") { + $special_stuff_head .= '<script language="javascript">'; + $special_stuff_head .= ' top.window.close();'; + $special_stuff_head .= '</script>'; + return true; + } + $commandlines=explode(' ',$command); + if (is_array($commandlines)) { + //general commands + //unregistered commands + if (!$xoopsUser) { + if (count($commandlines)==2) { + if (($commandlines[0]=='/nick') && ($commandlines[1]!='')) { + if($xoopsModuleConfig['guests_may_chname'] == 1) { + $special_stuff_head .= '<script language="javascript">'; + $special_stuff_head .= ' top.document.location.href="popup.php?username='.htmlentities($commandlines[1], ENT_QUOTES).'";'; + $special_stuff_head .= '</script>'; + return true; + } else { + return true; + } + } + } + } + } + return false; +} +?> \ No newline at end of file Added: XoopsModules/shoutbox/releases/5.0/shoutbox/include/index.html =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/include/index.html (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/include/index.html 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/shoutbox/releases/5.0/shoutbox/include/module.php =================================================================== --- XoopsModules/shoutbox/releases/5.0/shoutbox/include/module.php (rev 0) +++ XoopsModules/shoutbox/releases/5.0/shoutbox/include/module.php 2012-07-31 13:11:37 UTC (rev 9962) @@ -0,0 +1,151 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: module.php 0 2010-01-29 18:47:04Z trabis $ + */ + +function xoops_module_install_shoutbox(&$module) +{ + $newmid = $module->getVar('mid'); + $groups = array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS); + + // retrieve all block ids for this module + $blocks = XoopsBlock::getByModule($newmid, false); + $msgs[] = _MD_AM_GROUP_SETTINGS_ADD; + $gperm_handler =& xoops_gethandler('groupperm'); + foreach ($groups as $mygroup) { + if ($gperm_handler->checkRight('module_admin', 0, $mygroup)) { + $mperm =& $gperm_handler->create(); + $mperm->setVar('gperm_groupid', $mygroup); + $mperm->setVar('gperm_itemid', $newmid); + $mperm->setVar('gperm_name', 'module_admin'); + $mperm->setVar('gperm_modid', 1); + if (!$gperm_handler->insert($mperm)) { + $msgs[] = ' <span style="color:#ff0000;">' . sprintf(_MD_AM_ACCESS_ADMIN_ADD_ERROR, "<strong>" . $mygroup . "</strong>") . "</span>"; + } else { + $msgs[] = " " . sprintf(_MD_AM_ACCESS_ADMIN_ADD, "<strong>" . $mygroup . "</strong>"); + } + unset($mperm); + } + $mperm =& $gperm_handler->create(); + $mperm->setVar('gperm_groupid', $mygroup); + $mperm->setVar('gperm_itemid', $newmid); + $mperm->setVar('gperm_name', 'module_read'); + $mperm->setVar('gperm_modid', 1); + if (!$gperm_handler->insert($mperm)) { + $msgs[] = ' <span style="color:#ff0000;">' . sprintf(_MD_AM_ACCESS_USER_ADD_ERROR, "<strong>" . $mygroup . "</strong>") . "</span>"; + } else { + $msgs[] = ' ' . sprintf(_MD_AM_ACCESS_USER_ADD_ERROR, "<strong>" . $mygroup . "</strong>"); + } + unset($mperm); + foreach ($blocks as $blc) { + $bperm =& $gperm_handler->create(); + $bperm->setVar('gperm_groupid', $mygroup); + $bperm->setVar('gperm_itemid', $blc); + $bperm->setVar('gperm_name', 'block_read'); + $bperm->setVar('gperm_modid', 1); + if (!$gperm_handler->insert($bperm)) { + $msgs[] = ' <span style="color:#ff0000;">' . _MD_AM_BLOCK_ACCESS_ERROR . ' Block ID: <strong>' . $blc . '</strong> Group ID: <strong>' . $mygroup . '</strong></span>'; + } else { + $msgs[] = ' ' . _MD_AM_BLOCK_ACCESS . sprintf(_MD_AM_BLOCK_ID, "<strong>" . $blc . "</strong>") . sprintf(_MD_AM_GROUP_ID, "<strong>" . $mygroup . "</strong>"); + } + unset($bperm); + } + } + unset($blocks); + unset($groups); + + $cacheDir = XOOPS_ROOT_PATH . '/uploads/shoutbox'; + $cacheFile = $cacheDir . '/shout.csv'; + + if (!file_exists($cacheFile)) { + if (!is_dir($cacheDir)) { + if (!mkdir($cacheDir)) { + //$msgs[] = "Failed to create dir!"; + return false; + } else { + //$msgs[] = " Dir /uploads/shoutbox/ succesfully created!"; + chmod($cacheDir, 0777); + } + } + + if ($file = fopen($cacheFile, 'w')) { + if (!fwrite($file, "Shoutbox|Welcome to the Shoutbox v4.x for Xoops|1|111.111.111.111|guest\n")) { + //$msgs[] = " Could not put content in ... [truncated message content] |
From: <be...@us...> - 2012-07-31 12:58:07
|
Revision: 9961 http://xoops.svn.sourceforge.net/xoops/?rev=9961&view=rev Author: beckmi Date: 2012-07-31 12:57:55 +0000 (Tue, 31 Jul 2012) Log Message: ----------- Adding version 5.0 by Trabis Added Paths: ----------- XoopsModules/shoutbox/trunk/shoutbox/admin/ XoopsModules/shoutbox/trunk/shoutbox/admin/index.php XoopsModules/shoutbox/trunk/shoutbox/admin/menu.php XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxEdit.php XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxFile.php XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxList.php XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxRemove.php XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxSave.php XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxStatus.php XoopsModules/shoutbox/trunk/shoutbox/blocks/ XoopsModules/shoutbox/trunk/shoutbox/blocks/index.html XoopsModules/shoutbox/trunk/shoutbox/blocks/shoutbox.php XoopsModules/shoutbox/trunk/shoutbox/class/ XoopsModules/shoutbox/trunk/shoutbox/class/database.php XoopsModules/shoutbox/trunk/shoutbox/class/file.php XoopsModules/shoutbox/trunk/shoutbox/class/index.html XoopsModules/shoutbox/trunk/shoutbox/class/shoutbox.php XoopsModules/shoutbox/trunk/shoutbox/header.php XoopsModules/shoutbox/trunk/shoutbox/images/ XoopsModules/shoutbox/trunk/shoutbox/images/guestavatars/ XoopsModules/shoutbox/trunk/shoutbox/images/guestavatars/guest1.gif XoopsModules/shoutbox/trunk/shoutbox/images/guestavatars/guest2.gif XoopsModules/shoutbox/trunk/shoutbox/images/guestavatars/guest3.gif XoopsModules/shoutbox/trunk/shoutbox/images/guestavatars/guest4.gif XoopsModules/shoutbox/trunk/shoutbox/images/guestavatars/guest5.gif XoopsModules/shoutbox/trunk/shoutbox/images/index.html XoopsModules/shoutbox/trunk/shoutbox/images/module_logo.png XoopsModules/shoutbox/trunk/shoutbox/images/newlogoblank.png XoopsModules/shoutbox/trunk/shoutbox/images/nonavatar.gif XoopsModules/shoutbox/trunk/shoutbox/images/offline.gif XoopsModules/shoutbox/trunk/shoutbox/images/online.gif XoopsModules/shoutbox/trunk/shoutbox/include/ XoopsModules/shoutbox/trunk/shoutbox/include/functions.php XoopsModules/shoutbox/trunk/shoutbox/include/index.html XoopsModules/shoutbox/trunk/shoutbox/include/module.php XoopsModules/shoutbox/trunk/shoutbox/index.html XoopsModules/shoutbox/trunk/shoutbox/language/ XoopsModules/shoutbox/trunk/shoutbox/language/english/ XoopsModules/shoutbox/trunk/shoutbox/language/english/admin.php XoopsModules/shoutbox/trunk/shoutbox/language/english/blocks.php XoopsModules/shoutbox/trunk/shoutbox/language/english/index.html XoopsModules/shoutbox/trunk/shoutbox/language/english/main.php XoopsModules/shoutbox/trunk/shoutbox/language/english/modinfo.php XoopsModules/shoutbox/trunk/shoutbox/language/index.html XoopsModules/shoutbox/trunk/shoutbox/new_shout.wav XoopsModules/shoutbox/trunk/shoutbox/online.php XoopsModules/shoutbox/trunk/shoutbox/popup.php XoopsModules/shoutbox/trunk/shoutbox/readme.txt XoopsModules/shoutbox/trunk/shoutbox/readme_archive.txt XoopsModules/shoutbox/trunk/shoutbox/shoutframe.php XoopsModules/shoutbox/trunk/shoutbox/shoutpopupframe.php XoopsModules/shoutbox/trunk/shoutbox/sql/ XoopsModules/shoutbox/trunk/shoutbox/sql/mysql.sql XoopsModules/shoutbox/trunk/shoutbox/style/ XoopsModules/shoutbox/trunk/shoutbox/style/index.html XoopsModules/shoutbox/trunk/shoutbox/style/shoutbox2.css XoopsModules/shoutbox/trunk/shoutbox/templates/ XoopsModules/shoutbox/trunk/shoutbox/templates/blocks/ XoopsModules/shoutbox/trunk/shoutbox/templates/blocks/index.html XoopsModules/shoutbox/trunk/shoutbox/templates/blocks/shoutbox_block.html XoopsModules/shoutbox/trunk/shoutbox/templates/index.html XoopsModules/shoutbox/trunk/shoutbox/templates/shoutbox_online.html XoopsModules/shoutbox/trunk/shoutbox/templates/shoutbox_popup.html XoopsModules/shoutbox/trunk/shoutbox/templates/shoutbox_popupframe.html XoopsModules/shoutbox/trunk/shoutbox/templates/shoutbox_popupheader.html XoopsModules/shoutbox/trunk/shoutbox/templates/shoutbox_shoutframe.html XoopsModules/shoutbox/trunk/shoutbox/xoops_version.php Added: XoopsModules/shoutbox/trunk/shoutbox/admin/index.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/index.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/index.php 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1,125 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: index.php 0 2010-01-29 18:47:04Z trabis $ + */ +// Hello admin? +include '../../../include/cp_header.php'; +// Admin! + +function shoutboxDefault() +{ + global $xoopsModuleConfig; + + if($xoopsModuleConfig['storage_type'] == 'database') { + $database = '['._AM_SH_EDIT_INUSE.']'; + $file = ''; + } else if($xoopsModuleConfig['storage_type'] == 'file') { + $database = ''; + $file = '['._AM_SH_EDIT_INUSE.']'; + } + + echo " + <h1>"._AM_SH_CONFIG."</h1> + <br /> + "._AM_SH_CHOOSE." + <ul> + <li><a href='index.php?op=shoutboxList'>" . _AM_SH_EDIT_DB . "</a> $database</li> + <li><a href='index.php?op=shoutboxFile'>" . _AM_SH_EDIT_FILE . "</a> $file</li> + <li><a href='index.php?op=shoutboxStatus'>" . _AM_SH_STATUSOF . "</a></li> + </ul> + <br /> + "; +} + +function shoutboxList() +{ + global $xoopsDB; + include 'shoutboxList.php'; +} + +function shoutboxEdit() +{ + global $xoopsDB; + include 'shoutboxEdit.php'; +} + +function shoutboxSave() +{ + global $xoopsDB; + include 'shoutboxSave.php'; +} + +function shoutboxRemove() +{ + global $xoopsDB; + include 'shoutboxRemove.php'; +} + +function shoutboxFile() +{ + global $xoopsDB; + include 'shoutboxFile.php'; +} + +function shoutboxStatus() +{ + global $xoopsDB, $xoopsModuleConfig; + include 'shoutboxStatus.php'; +} + +$op = empty($_GET["op"]) ? '' : $_GET["op"]; + +switch ($op){ + case "shoutboxList": + xoops_cp_header(); + shoutboxList(); + break; + + case "shoutboxEdit": + xoops_cp_header(); + shoutboxEdit(); + break; + + case "shoutboxSave": + shoutboxSave(); + break; + + case "shoutboxRemove": + shoutboxRemove(); + break; + + case "shoutboxFile": + xoops_cp_header(); + shoutboxFile(); + break; + + case "shoutboxStatus": + xoops_cp_header(); + shoutboxStatus(); + break; + + default: + xoops_cp_header(); + shoutboxDefault(); + break; + +} + +xoops_cp_footer(); +?> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/admin/menu.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/menu.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/menu.php 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1,28 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: menu.php 0 2010-01-29 18:47:04Z trabis $ + */ + +$adminmenu[1]['title'] = _MI_SHOUTBOX_MENU_DB; +$adminmenu[1]['link'] = "admin/index.php?op=shoutboxList"; +$adminmenu[2]['title'] = _MI_SHOUTBOX_MENU_FILE; +$adminmenu[2]['link'] = "admin/index.php?op=shoutboxFile"; +$adminmenu[3]['title'] = _MI_SHOUTBOX_MENU_STATUS; +$adminmenu[3]['link'] = "admin/index.php?op=shoutboxStatus"; +?> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxEdit.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxEdit.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxEdit.php 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1,98 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: shoutboxEdit.php 0 2010-01-29 18:47:04Z trabis $ + */ + +if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/index.php')) { + exit(); +} + +include_once XOOPS_ROOT_PATH.'/class/module.textsanitizer.php'; + +$sanitizer = new MyTextSanitizer; + +// Check or ID is a number +$id = intval($_GET['id']); + +$handler = xoops_getModuleHandler('database', 'shoutbox'); + +// Check or we got a shout +if (!$obj = $handler->get($id)) { + /** + * Or we got none, or something really strange happend here... + */ + redirect_header("index.php", 3, _AM_SH_INVALID_ID); +} + + +// Make code ready for preview +$shout = $obj->getValues(); +$shout['date'] = $obj->time(_DATESTRING); + +echo " +<form action='index.php?op=shoutboxSave' method='post'> +<table width='100%' class='outer' cellspacing='1'> +<tbody> +<tr> +<th colspan='2'>".sprintf(_AM_SH_EDIT_TITLE, $shout['date'])."</th> +</tr> +<tr valign='top' align='left'> +<td class='odd'> +<b>"._AM_SH_POSTER."</b> +</td> +<td class='even'>\n"; + +if($shout['uid'] != 0) { + echo "<input type='text' size='30' maxlength='30' name='shoutboxUname' value='$shout[uname]' readonly='readonly' />"; +} else { + echo "<input type='text' size='30' maxlength='30' name='shoutboxUname' value='$shout[uname]' />"; +} +echo " +</td> +</tr> +<tr valign='top' align='left'> +<td class='odd'> +<b>"._AM_SH_EDIT_FROM."</b> +</td> +<td class='even'> +<input type='text' size='30' maxlength='30' name='shoutboxIp' value='$shout[ip]' /> +</td> +</tr> +<tr valign='top' align='left'> +<td class='odd'> +<b>"._AM_SH_MESSAGE."</b> +</td> +<td class='even'> +<input type='text' name='shoutboxMessage' size='100' maxlength='200' value='$shout[message]' /> +</td> +</tr> +<tr class='foot'> +<td colspan='2' align='center'> +<input type='hidden' name='id' value='$shout[id]' /> +<input type='hidden' name='uid' value='$shout[uid]' /> + +<input type='submit' name='submit' value='"._SUBMIT."' /> +<input type='button' value='"._CANCEL."' onClick='location=\"index.php?op=shoutboxList\"' /> +</td> +</tr> +</tbody> +</table> +</form> +"; +?> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxFile.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxFile.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxFile.php 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1,97 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: shoutboxFile.php 0 2010-01-29 18:47:04Z trabis $ + */ + +if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/index.php')) { + exit(); +} + +include_once XOOPS_ROOT_PATH . '/class/module.textsanitizer.php'; +$sanitizer =& MyTextSanitizer::getInstance(); + +$path = XOOPS_ROOT_PATH . '/uploads/shoutbox/shout.csv'; +$source = file_get_contents($path); +$source = $sanitizer->htmlSpecialChars($source); +$hash = sha1_file($path); +$invalidhash = false; + +if (!empty($_POST['action']) && $_POST['action'] == 'Update') { + if (empty($_POST['forceUpdate']) && $hash != $_POST['hash']) { + echo "<h1>" . _AM_SH_FILE_HASH_FAILED . "</h1>"; + $invalidhash = true; + $source = $sanitizer->stripSlashesGPC($_POST['shoutboxSource']); + $source = $sanitizer->htmlSpecialChars($source); + } else { + $source = $sanitizer->stripSlashesGPC($_POST['shoutboxSource']); + + if ($file = fopen($path, "w")) { + fwrite($file, $source); + fclose($file); + echo "<h1>"._AM_SH_FILE_UPDATED."</h1>"; + } else { + echo "<h1>"._AM_SH_FILE_FAILED."</h1>"; + } + } +} + +echo " +<form action='index.php?op=shoutboxFile' method='post'> +<table width='100%' class='outer' cellspacing='1'> +<tbody> +<tr> +<th colspan='2'>"._AM_SH_FILE_TITLE."</th> +</tr> +<tr valign='top' align='left'> +<td class='odd' width='20%'> +<b>"._AM_SH_FILE_SOURCE."</b><br /> +"._AM_SH_FILE_SOURCED." +</td> +<td class='even'> +<textarea name='shoutboxSource' rows='25' cols='98%'>$source</textarea> +</td> +</tr>"; + +if ($invalidhash == true) { + echo " + <tr valign='top' align='left'> + <td class='odd' width='20%'> + <b>"._AM_SH_FILE_HASH."</b><br /> + "._AM_SH_FILE_HASHD." + </td> + <td class='even'> + <input type='checkbox' name='forceUpdate' value='yes' checked='checked' /> + </td> + </tr> + "; +} + +echo " +<tr class='foot'> +<td colspan='2' align='center'> +<input type='hidden' name='hash' value='$hash' /> +<input type='hidden' name='action' value='Update' /> +<input type='submit' name='submit' value='"._SUBMIT."' /> +</td> +</tr> +<tbody> +</table> +</form>"; + +?> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxList.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxList.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxList.php 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1,71 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: shoutboxList.php 0 2010-01-29 18:47:04Z trabis $ + */ + +if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/index.php')) { + exit(); +} + +include_once(XOOPS_ROOT_PATH.'/class/module.textsanitizer.php'); +$sanitizer = new MyTextSanitizer; + +echo "<h4 style='text-align: left;'>"._AM_SH_CONFIG."</h4>\n"; +echo " +<table class='outer' width='100%' cellpadding='4' cellspacing='1'> +<tr> +<th width='15%' align='left'>"._AM_SH_POSTER."</th> +<th width='15%' align='left'>"._AM_SH_LIST_TIME."</th> +<th width='55%' align='center'>"._AM_SH_MESSAGE."</th> +<th width='15%' align='right'>"._AM_SH_LIST_ACTION."</th> +</tr>\n"; + +$evodd = "even"; +$result = $xoopsDB->query("SELECT `id`, `uid`, `uname`, `time`, `ip`, `message` FROM ".$xoopsDB->prefix('shoutbox')." ORDER BY `time` DESC LIMIT 0, 50"); + +if(!$xoopsDB->getRowsNum($result)) { + echo "<tr class='even' align='center'><td colspan='4'>"._AM_SH_LIST_NOSHOUTS."</td></tr>"; +} + +while (list($msg_id, $user_id, $uname, $time, $ip, $message) = $xoopsDB->fetchRow($result)) { + + if ($evodd == "even") { + echo "<tr class='even' align='center' valign='top'>\n"; + } else { + echo "<tr class='even' align='center' valign='top'>\n"; + } + + echo "<td align='left'> + <div title='UID: $user_id | IP: $ip'>$uname"; if($user_id == 0) { echo '*'; } echo "</div> + </td> + <td align='left'> + ".formatTimestamp($time, _DATESTRING)." + </td> + <td align='center'> + $message + </td> + <td align='right'> + <a href='index.php?op=shoutboxEdit&id=$msg_id'>"._EDIT."</a> / <a href='index.php?op=shoutboxRemove&id=$msg_id'>"._DELETE."</a> + </td>"; + + echo "</tr>"; +} + +echo "<tr class='foot'><td colspan='4'> </td></tr></table>"; +?> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxRemove.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxRemove.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxRemove.php 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1,93 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: shoutboxRemove.php 0 2010-01-29 18:47:04Z trabis $ + */ +if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/index.php')) { + exit(); +} +$id = intval($_REQUEST['id']); +$handler = xoops_getModuleHandler('database', 'shoutbox'); +// Request or confirmation? +if (!empty($_POST['confirm']) && $_POST['confirm'] == 'yes') { + // Sanitize inputs + $obj = $handler->get($id); + if (is_object($obj) && $handler->delete($obj)) { + redirect_header("index.php", 2, _AM_SH_REMOVE_SUCCES); + } else { + redirect_header("index.php", 4, _AM_SH_REMOVE_FAILURE); + } +} else { + xoops_cp_header(); + // Check or we got a shout + if (!$obj = $handler->get($id)) { + /** + * Or we got none, or something really strange happend here... + */ + redirect_header("index.php", 3, _AM_SH_INVALID_ID); + } + + // Make code ready for preview + $shout = $obj->getValues(); + $shout['date'] = $obj->time(_DATESTRING); + + echo " + <form action='index.php?op=shoutboxRemove' method='post'> + <table width='100%' class='outer' cellspacing='1'> + <tbody> + <tr> + <th colspan='2'>".sprintf(_AM_SH_REMOVE_TITLE, $shout['date'])."</th> + </tr> + <tr valign='top' align='left'> + <td class='odd'> + <b>"._AM_SH_POSTER."</b> + </td> + <td class='even'> + $shout[uname] + </td> + </tr> + <tr valign='top' align='left'> + <td class='odd'> + <b>"._AM_SH_REMOVE_FROM."</b> + </td> + <td class='even'> + $shout[ip] + </td> + </tr> + <tr valign='top' align='left'> + <td class='odd'> + <b>"._AM_SH_MESSAGE."</b> + </td> + <td class='even'> + $shout[message] + </td> + </tr> + <tr class='foot'> + <td colspan='2' align='center'> + <input type='hidden' name='id' value='$shout[id]' /> + <input type='hidden' name='confirm' value='yes' /> + <input type='submit' name='submit' value='"._DELETE."' /> + <input type='button' value='"._CANCEL."' onClick='location=\"index.php?op=shoutboxList\"' /> + </td> + </tr> + </tbody> + </table> + </form> + "; +} +?> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxSave.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxSave.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxSave.php 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1,53 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: shoutboxSave.php 0 2010-01-29 18:47:04Z trabis $ + */ + +if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/index.php')) { + exit(); +} + +$handler = xoops_getModuleHandler('database', 'shoutbox'); + +$id = intval($_POST['id']); +if (!$obj = $handler->get($id)) { + /** + * Or we got none, or something really strange happend here... + */ + redirect_header("index.php", 3, _AM_SH_INVALID_ID); +} + +if (!preg_match("/^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$/", $_POST['shoutboxIp'])) { + // This check is far from perfect but... + exit('Whoops! [ERROR 24]'); +} + +$obj->setVar('uname', $_POST['shoutboxUname']); +$obj->setVar('ip', $_POST['shoutboxIp']); +$obj->setVar('message', $_POST['shoutboxMessage']); + + +// Execute query +if ($handler->insert($obj)) { + redirect_header("index.php", 2, "Shout updated!"); +} else { + redirect_header("index.php", 4, "Error - Could not execute query..."); +} + +?> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxStatus.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxStatus.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/admin/shoutboxStatus.php 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1,111 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: shoutboxStatus.php 0 2010-01-29 18:47:04Z trabis $ + */ + +if (!defined("XOOPS_MAINFILE_INCLUDED") || !strstr($_SERVER['PHP_SELF'], 'admin/index.php')) { + exit(); +} + +// Count shouts in database and file +// Database: +$query = $xoopsDB->query("SELECT count(*) FROM ".$xoopsDB->prefix("shoutbox")); +$query = $xoopsDB->fetchRow($query); +$count_database = $query[0]; +// File: +$path = XOOPS_ROOT_PATH.'/uploads/shoutbox/shout.csv'; +$count_file = count(file($path)); + +// Size +// Database: +// [Source: http://www.webmasterworld.com/forum88/2069.htm] +$rows = $xoopsDB->queryF("SHOW table STATUS"); +while ($row = $xoopsDB->fetchBoth($rows)) { + if($row['Name'] == $xoopsDB->prefix("shoutbox")) { + $size_database = $row['Data_length'] + $row['Index_length']; + } +} +// File: +$size_file = filesize($path); + +echo " +<table width='100%' class='outer' cellspacing='1'> +<tbody> +<tr> +<th colspan='2'>"._AM_SH_STATUS_TITLE."</th> +</tr> + + +<tr valign='top' align='left'> +<td class='odd'> +<b>"._AM_SH_STATUS_STORAGETYPE."</b> +</td> +<td class='even'> +$xoopsModuleConfig[storage_type] +</td> +</tr> +<tr valign='top' align='left'> +<td class='odd'> +<ul> +<li>"._AM_SH_STATUS_INDB."</li> +</ul> +</td> +<td class='even'> +$count_database +</td> +</tr> +<tr valign='top' align='left'> +<td class='odd'> +<ul> +<li>"._AM_SH_STATUS_INFILE."</li> +</ul> +</td> +<td class='even'> +$count_file +</td> +</tr> + + +<tr valign='top' align='left'> +<td class='odd'> +<b>"._AM_SH_STATUS_SIZEDB."</b> +</td> +<td class='even'> +$size_database bytes +</td> +</tr> +<tr valign='top' align='left'> +<td class='odd'> +<b>"._AM_SH_STATUS_SIZEFILE."</b> +</td> +<td class='even'> +$size_file bytes +</td> +</tr> + + +<tr class='foot'> +<td colspan='2' align='center'> + +</td> +</tr> +</tbody> +</table> +"; +?> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/blocks/index.html =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/blocks/index.html (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/blocks/index.html 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/blocks/shoutbox.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/blocks/shoutbox.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/blocks/shoutbox.php 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1,68 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: shoutbox.php 0 2010-01-29 18:47:04Z trabis $ + */ + +function b_shoutbox_show($options) +{ + include_once XOOPS_ROOT_PATH . '/modules/shoutbox/include/functions.php'; + global $xoopsUser, $xoopsConfig; + + $module_handler =& xoops_gethandler('module'); + $module =& $module_handler->getByDirname('shoutbox'); + $config_handler =& xoops_gethandler('config'); + $block =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); + + if ($block['captcha_enable']) { + xoops_load('XoopsFormCaptcha'); + $shoutcaptcha = new XoopsFormCaptcha(); + $block['captcha_caption'] = $shoutcaptcha->getCaption(); + $block['captcha_render'] = $shoutcaptcha->render(); + } + + $block['shoutbox_access'] = false; + if (is_object($xoopsUser)) { + $block['shoutbox_access'] = true; + $block['shoutbox_uname'] = $xoopsUser->getVar('uname'); + $block['shoutbox_userid'] = $xoopsUser->getVar('uid'); + } else if ($block['guests_may_post']) { + $block['shoutbox_access'] = true; + $block['shoutbox_uname'] = shoutbox_makeGuestName(); + $block['shoutbox_uid'] = 0; + } + + $block['shoutbox_anonymous'] = $xoopsConfig['anonymous']; + + if ($block['show_smileybar']) { + ob_start(); + include_once XOOPS_ROOT_PATH . '/include/xoopscodes.php'; + xoopsSmilies('shoutfield'); + $block['shoutbox_smibar'] = ob_get_contents(); + ob_end_clean(); + $block['shoutbox_smibar'] = str_replace("<a href='#moresmiley' onmouseover='style.cursor=\"hand\"' alt=''","<a href='#moresmiley' onmouseover='style.cursor=\"hand\"' title='More'", $block['shoutbox_smibar']); + } + + if (!is_object($xoopsUser) && !$block['popup_guests']) { + $block['popup'] = false; + } + + return $block; +} + +?> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/class/database.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/class/database.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/class/database.php 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1,111 @@ +<?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. + */ + +/** + * Shoutbox class + * + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @since 5.0 + * @author trabis <lus...@gm...> + * @version $Id: db.php 0 2010-01-06 18:47:04Z trabis $ + */ + +defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined"); + +class ShoutboxDatabase extends XoopsObject +{ + /** + * constructor + */ + function ShoutboxDatabase() + { + $this->initVar("id", XOBJ_DTYPE_INT); + $this->initVar("uid", XOBJ_DTYPE_INT); + $this->initVar("uname", XOBJ_DTYPE_TXTBOX); + $this->initVar("time", XOBJ_DTYPE_STIME); + $this->initVar("ip", XOBJ_DTYPE_TXTBOX); + $this->initVar("message", XOBJ_DTYPE_TXTAREA); + + $this->initVar("dohtml", XOBJ_DTYPE_INT, 0); + $this->initVar("doxcode", XOBJ_DTYPE_INT, 0); + $this->initVar("dosmiley", XOBJ_DTYPE_INT, 1); + $this->initVar("doimage", XOBJ_DTYPE_INT, 1); + $this->initVar("dobr", XOBJ_DTYPE_INT, 0); + } + + function time($dateFormat = 's', $format = 'S') + { + return formatTimestamp($this->getVar('time', $format), $dateFormat); + } + +} + +class ShoutboxDatabaseHandler extends XoopsPersistableObjectHandler +{ + function ShoutboxDatabaseHandler(&$db) + { + $this->__construct($db); + } + + function __construct($db) + { + parent::__construct($db, 'shoutbox', 'ShoutboxDatabase', 'id', 'uid'); + } + + function createShout() + { + return $this->create(); + } + + function saveShout($obj) + { + return $this->insert($obj); + } + + function getShouts($limit) + { + $criteria = new CriteriaCompo(); + $criteria->setSort('time'); + $criteria->setOrder('DESC'); + $criteria->setStart(0); + $criteria->setLimit($limit); + return $this->getObjects($criteria); + } + + function pruneShouts($limit) + { + $criteria = new CriteriaCompo(); + $criteria->setSort('id'); + $criteria->setOrder('DESC'); + $criteria->setStart(0); + $criteria->setLimit($limit); + $objs = $this->getList($criteria, true); + unset($criteria); + $criteria = new Criteria('id', '(' . implode(',', array_keys($objs)) . ')', 'NOT IN'); + return $this->deleteAll($criteria); + } + + function deleteShouts() + { + return $this->deleteAll(); + } + + function shoutExists($message, $ip) + { + $myts =& MyTextSanitizer::getInstance(); + $criteria = new CriteriaCompo(new Criteria('message', $myts->addSlashes($message))); + $criteria->add(new Criteria('ip', $ip)); + return $this->getCount($criteria) ? true : false; + } +} +?> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/class/file.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/class/file.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/class/file.php 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1,150 @@ +<?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. + */ + +/** + * Shoutbox class + * + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @since 5.0 + * @author trabis <lus...@gm...> + * @version $Id: file.php 0 2010-01-06 18:47:04Z trabis $ + */ + +defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined"); + +class ShoutboxFile extends XoopsObject +{ + /** + * constructor + */ + function ShoutboxFile() + { + $this->initVar("id", XOBJ_DTYPE_INT); + $this->initVar("uid", XOBJ_DTYPE_INT); + $this->initVar("uname", XOBJ_DTYPE_TXTBOX); + $this->initVar("time", XOBJ_DTYPE_STIME); + $this->initVar("ip", XOBJ_DTYPE_TXTBOX); + $this->initVar("message", XOBJ_DTYPE_TXTAREA); + + $this->initVar("dohtml", XOBJ_DTYPE_INT, 0); + $this->initVar("doxcode", XOBJ_DTYPE_INT, 0); + $this->initVar("dosmiley", XOBJ_DTYPE_INT, 1); + $this->initVar("doimage", XOBJ_DTYPE_INT, 1); + $this->initVar("dobr", XOBJ_DTYPE_INT, 0); + } + + function time($dateFormat = 's', $format = 'S') + { + return formatTimestamp($this->getVar('time', $format), $dateFormat); + } + +} + +class ShoutboxFileHandler extends XoopsPersistableObjectHandler +{ + var $csvfile; + + function ShoutboxFileHandler(&$db) + { + $this->__construct($db); + } + + function __construct($db) + { + $this->csvfile = XOOPS_ROOT_PATH . '/uploads/shoutbox/shout.csv'; + parent::__construct($db, '', 'ShoutboxFile', 'id', 'uid'); + } + + function createShout() + { + return $this->create(); + } + + function saveShout($obj) + { + $f = fopen($this->csvfile, 'a'); + fwrite($f, $obj->getVar('uname', 'n') . '|' . + $obj->getVar('message', 'n') . '|' . + $obj->getVar('time', 'n') . '|' . + $obj->getVar('ip', 'n') . '|' . + $obj->getVar('uid', 'n') . "\n"); + fclose($f); + return true; + } + + function getShouts($limit) + { + $objs = array(); + $shouts = file($this->csvfile); + $count = count($shouts) - 1; + $i = 0; + for ($count; $count >= 0; $count--) { + if ($limit <= $i) { + break; + } + $oneline = array(); + $oneline = explode('|', $shouts[$count]); + + $obj = $this->create(); + $obj->setVar('uname', $oneline[0]); + $obj->setVar('message', $oneline[1]); + $obj->setVar('time', $oneline[2]); + $obj->setVar('ip' , $oneline[3]); + $obj->setVar('uid', $oneline[4]); + $objs[] =& $obj; + unset($obj); + $i++; + } + return $objs; + } + + function pruneShouts($limit) + { + $shouts = file($this->csvfile); + $totrim = count($shouts) - $limit; + if ($totrim > 0) { + for ($i = 0; $i < $totrim; $i++) { + array_shift($shouts); + } + $f = fopen($this->csvfile, 'w'); + foreach ($shouts as $i => $line) { + fputs($f, $line); + } + fclose($f); + } + return true; + } + + function deleteShouts() + { + $f = fopen($this->csvfile, 'w'); + fclose($f); + return true; + } + + function shoutExists($message, $ip) + { + $shouts = file($this->csvfile); + if (!empty($shouts)) { + $count = count($shouts) - 1; + $oneline = explode('|', $shouts[$count]); + if (count($oneline) != 0) { + if ($oneline[3] == $ip && $oneline[1] == $message) { + return true; + } + } + } + return false; + } +} +?> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/class/index.html =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/class/index.html (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/class/index.html 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/class/shoutbox.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/class/shoutbox.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/class/shoutbox.php 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1,126 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: shoutbox.php 0 2010-01-29 18:47:04Z trabis $ + */ + +include_once dirname(dirname(__FILE__)) . '/include/functions.php'; + +class Shoutbox +{ + var $handler = ''; + + function Shoutbox($storage_type) + { + $this->handler =& xoops_getModuleHandler($storage_type, 'shoutbox'); + } + + function getDefaultAvatar() + { + if ($value = shoutbox_getOption('guest_avatar')) { + $avatar = XOOPS_URL . "/modules/shoutbox/images/guestavatars/guest" . $value . ".gif"; + } else { + $avatar = XOOPS_URL . '/uploags/blank.gif'; + } + return $avatar; + } + + function saveShout($uid, $uname, $message) + { + $myts =& MyTextSanitizer::getInstance(); + $obj = $this->handler->createShout(); + $obj->setVar('uid', $uid); + $obj->setVar('uname', $uname); + $obj->setVar('time', time()); + $obj->setVar('ip', getenv("REMOTE_ADDR")); + $obj->setVar('message', $message); + + if (!$this->handler->saveShout($obj)) { + return false; + } + + return true; + } + + function getShouts($online, $bbcode, $limit) + { + global $xoopsUser; + $shouts = array(); + $myts =& MyTextSanitizer::getInstance(); + $objs = $this->handler->getShouts($limit); + $i = 0; + foreach ($objs as $obj) { + $uid = $obj->getVar('uid'); + $shouts[$i]['uid'] = $uid; + $shouts[$i]['online'] = 0; + $shouts[$i]['url'] = ''; + $shouts[$i]['email'] = ''; + $shouts[$i]['avatar'] = $this->getDefaultAvatar(); + $shouts[$i]['uname'] = $obj->getVar('uname'); + $shouts[$i]['time'] = $obj->time(shoutbox_getOption('stamp_format')); + $shouts[$i]['ip'] = $obj->getVar('ip'); + + $obj->setVar('doxcode', $bbcode); + + $shouts[$i]['message'] = $myts->censorString($obj->getVar('message')); + if ($wordwrap = shoutbox_getOption('wordwrap_setting')) { + $shouts[$i]['message'] = wordwrap($shouts[$i]['message'], $wordwrap ,"\r\n", true); + } + + if ($uid != 0) { + $thisUser = new XoopsUser($uid); + if ($thisUser->isOnline()) { + $shouts[$i]['online'] = 1; + } + if ($thisUser->getVar("url") != "") { + $shouts[$i]['url'] = $thisUser->getVar("url"); + } + if ($thisUser->getVar("user_viewemail") == 1 || ($xoopsUser && $xoopsUser->isAdmin())) { + $shouts[$i]['email'] = $thisUser->getVar("email"); + } + $shouts[$i]['avatar'] = XOOPS_URL . '/uploads/' . $thisUser->getVar("user_avatar"); + } + $i++; + } + return $shouts; + } + + function pruneShouts($limit) + { + if ($limit > 0) { + return $this->handler->pruneShouts($limit); + } + return false; + } + + function deleteShouts() + { + global $xoopsUser; + if (!empty($xoopsUser) && $xoopsUser->isAdmin()) { + return $this->handler->deleteShouts(); + } + return false; + } + + function shoutExists($message) + { + return $this->handler->shoutExists($message, getenv("REMOTE_ADDR")); + } + +} +?> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/header.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/header.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/header.php 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1,49 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author trabis <lus...@gm...> + * @version $Id: header.php 0 2010-01-29 18:47:04Z trabis $ + */ + +include_once dirname(dirname(dirname(__FILE__))) . '/mainfile.php'; +include_once XOOPS_ROOT_PATH . '/class/template.php'; +error_reporting(0); +$GLOBALS['xoopsLogger']->activated = false; +$xoopsTpl = new XoopsTpl(); +$xoopsTpl->xoops_setCaching(0); + +$xoopsTpl->assign( +array( + 'xoops_theme' => $xoopsConfig['theme_set'], + 'xoops_imageurl' => XOOPS_THEME_URL.'/'.$xoopsConfig['theme_set'].'/', + 'xoops_themecss'=> xoops_getcss($xoopsConfig['theme_set']), + 'xoops_requesturi' => htmlspecialchars($GLOBALS['xoopsRequestUri'], ENT_QUOTES), + 'xoops_sitename' => htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES), + 'xoops_slogan' => htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES) +) +); +$xoopsTpl->assign('xoops_js', '<script type="text/javascript" src="'.XOOPS_URL.'/include/xoops.js"></script>'); +if (is_object($xoopsUser)) { + $xoopsTpl->assign(array('xoops_isuser' => true, 'xoops_userid' => $xoopsUser->getVar('uid'), 'xoops_uname' => $xoopsUser->getVar('uname'), 'xoops_isadmin' => $xoopsUserIsAdmin)); +} else { + $xoopsTpl->assign(array('xoops_isuser' => false, 'xoops_isadmin' => false)); +} + +if (is_file('style/shoutbox.css')) { + $xoopsTpl->assign('themecss', 'style/shoutbox.css'); +} else { + $xoopsTpl->assign('themecss', xoops_getcss()); +} +?> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/images/guestavatars/guest1.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/trunk/shoutbox/images/guestavatars/guest1.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/trunk/shoutbox/images/guestavatars/guest2.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/trunk/shoutbox/images/guestavatars/guest2.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/trunk/shoutbox/images/guestavatars/guest3.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/trunk/shoutbox/images/guestavatars/guest3.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/trunk/shoutbox/images/guestavatars/guest4.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/trunk/shoutbox/images/guestavatars/guest4.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/trunk/shoutbox/images/guestavatars/guest5.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/trunk/shoutbox/images/guestavatars/guest5.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/trunk/shoutbox/images/index.html =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/images/index.html (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/images/index.html 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/images/module_logo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/trunk/shoutbox/images/module_logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/trunk/shoutbox/images/newlogoblank.png =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/trunk/shoutbox/images/newlogoblank.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/trunk/shoutbox/images/nonavatar.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/trunk/shoutbox/images/nonavatar.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/trunk/shoutbox/images/offline.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/trunk/shoutbox/images/offline.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/trunk/shoutbox/images/online.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/shoutbox/trunk/shoutbox/images/online.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/shoutbox/trunk/shoutbox/include/functions.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/include/functions.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/include/functions.php 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1,110 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: functions.php 0 2010-01-29 18:47:04Z trabis $ + */ + +function shoutbox_getOption($option, $dirname = 'shoutbox') +{ + static $modOptions = array(); + if (is_array($modOptions) && array_key_exists($option, $modOptions)) { + return $modOptions[$option]; + } + + $ret = null; + $module_handler =& xoops_gethandler('module'); + $module =& $module_handler->getByDirname($dirname); + $config_handler =& xoops_gethandler('config'); + if ($module) { + $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); + if (isset($moduleConfig[$option])) { + $ret = $moduleConfig[$option]; + } + } + $modOptions[$option] = $ret; + return $ret; +} + +function shoutbox_makeGuestName() +{ + global $xoopsConfig; + $ipadd = getenv('REMOTE_ADDR'); + $iparr = explode('.', $ipadd); + $ipadd = $iparr[0] + $iparr[1] + $iparr[2] + $iparr[3]; + $guestname = $xoopsConfig['anonymous'] . $ipadd; + return $guestname; +} + +function shoutbox_getUserName($uid = 0) +{ + xoops_load('XoopsUserUtility'); + $uname = XoopsUserUtility::getUnameFromId($uid, shoutbox_getOption('user_realname')); + return $uname; +} + +/** + * Most of these functions were written (originally) + * by Florian Solcher <e-xoops.alphalogic.org> + */ +function shoutbox_setCookie($timestamp) +{ + if (empty($_COOKIE['shoutcookie'])) { + setcookie("shoutcookie", $timestamp); + return false; + } + + if ($_COOKIE['shoutcookie'] < $timestamp) { + setcookie("shoutcookie", $timestamp); + return TRUE; + } else { + return FALSE; + } +} + +//irc like commands +function shoutbox_ircLike($command) +{ + global $xoopsModuleConfig, $xoopsUser, $special_stuff_head; + if ($command == "/quit") { + $special_stuff_head .= '<script language="javascript">'; + $special_stuff_head .= ' top.window.close();'; + $special_stuff_head .= '</script>'; + return true; + } + $commandlines=explode(' ',$command); + if (is_array($commandlines)) { + //general commands + //unregistered commands + if (!$xoopsUser) { + if (count($commandlines)==2) { + if (($commandlines[0]=='/nick') && ($commandlines[1]!='')) { + if($xoopsModuleConfig['guests_may_chname'] == 1) { + $special_stuff_head .= '<script language="javascript">'; + $special_stuff_head .= ' top.document.location.href="popup.php?username='.htmlentities($commandlines[1], ENT_QUOTES).'";'; + $special_stuff_head .= '</script>'; + return true; + } else { + return true; + } + } + } + } + } + return false; +} +?> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/include/index.html =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/include/index.html (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/include/index.html 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/shoutbox/trunk/shoutbox/include/module.php =================================================================== --- XoopsModules/shoutbox/trunk/shoutbox/include/module.php (rev 0) +++ XoopsModules/shoutbox/trunk/shoutbox/include/module.php 2012-07-31 12:57:55 UTC (rev 9961) @@ -0,0 +1,151 @@ +<?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 XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Shoutbox + * @author Alphalogic <alp...@ho...> + * @author tank <tan...@co...> + * @author trabis <lus...@gm...> + * @version $Id: module.php 0 2010-01-29 18:47:04Z trabis $ + */ + +function xoops_module_install_shoutbox(&$module) +{ + $newmid = $module->getVar('mid'); + $groups = array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS); + + // retrieve all block ids for this module + $blocks = XoopsBlock::getByModule($newmid, false); + $msgs[] = _MD_AM_GROUP_SETTINGS_ADD; + $gperm_handler =& xoops_gethandler('groupperm'); + foreach ($groups as $mygroup) { + if ($gperm_handler->checkRight('module_admin', 0, $mygroup)) { + $mperm =& $gperm_handler->create(); + $mperm->setVar('gperm_groupid', $mygroup); + $mperm->setVar('gperm_itemid', $newmid); + $mperm->setVar('gperm_name', 'module_admin'); + $mperm->setVar('gperm_modid', 1); + if (!$gperm_handler->insert($mperm)) { + $msgs[] = ' <span style="color:#ff0000;">' . sprintf(_MD_AM_ACCESS_ADMIN_ADD_ERROR, "<strong>" . $mygroup . "</strong>") . "</span>"; + } else { + $msgs[] = " " . sprintf(_MD_AM_ACCESS_ADMIN_ADD, "<strong>" . $mygroup . "</strong>"); + } + unset($mperm); + } + $mperm =& $gperm_handler->create(); + $mperm->setVar('gperm_groupid', $mygroup); + $mperm->setVar('gperm_itemid', $newmid); + $mperm->setVar('gperm_name', 'module_read'); + $mperm->setVar('gperm_modid', 1); + if (!$gperm_handler->insert($mperm)) { + $msgs[] = ' <span style="color:#ff0000;">' . sprintf(_MD_AM_ACCESS_USER_ADD_ERROR, "<strong>" . $mygroup . "</strong>") . "</span>"; + } else { + $msgs[] = ' ' . sprintf(_MD_AM_ACCESS_USER_ADD_ERROR, "<strong>" . $mygroup . "</strong>"); + } + unset($mperm); + foreach ($blocks as $blc) { + $bperm =& $gperm_handler->create(); + $bperm->setVar('gperm_groupid', $mygroup); + $bperm->setVar('gperm_itemid', $blc); + $bperm->setVar('gperm_name', 'block_read'); + $bperm->setVar('gperm_modid', 1); + if (!$gperm_handler->insert($bperm)) { + $msgs[] = ' <span style="color:#ff0000;">' . _MD_AM_BLOCK_ACCESS_ERROR . ' Block ID: <strong>' . $blc . '</strong> Group ID: <strong>' . $mygroup . '</strong></span>'; + } else { + $msgs[] = ' ' . _MD_AM_BLOCK_ACCESS . sprintf(_MD_AM_BLOCK_ID, "<strong>" . $blc . "</strong>") . sprintf(_MD_AM_GROUP_ID, "<strong>" . $mygroup . "</strong>"); + } + unset($bperm); + } + } + unset($blocks); + unset($groups); + + $cacheDir = XOOPS_ROOT_PATH . '/uploads/shoutbox'; + $cacheFile = $cacheDir . '/shout.csv'; + + if (!file_exists($cacheFile)) { + if (!is_dir($cacheDir)) { + if (!mkdir($cacheDir)) { + //$msgs[] = "Failed to create dir!"; + return false; + } else { + //$msgs[] = " Dir /uploads/shoutbox/ succesfully created!"; + chmod($cacheDir, 0777); + } + } + + if ($file = fopen($cacheFile, 'w')) { + if (!fwrite($file, "Shoutbox|Welcome to the Shoutbox v4.x for Xoops|1|111.111.111.111|guest\n")) { + //$msgs[] = " Could not put content in file /uploads/shoutbox/shout.cvs! Please create <i>manually</i>."; + } + fclose($file); + chmod($cacheFile, 0777); + //$msgs[] = " File /uploads/shoutbox/shout.cvs succesfully created!"; + return true; + } else { + //$msgs[] = " Could not create file /uploads/shoutbox/shout.cvs! Please create <i>manually</i>."; + return false; + } + } else { + return true; + } +} + +function xoops_module_uninstall_shoutbox(&$module) +{ + $cacheDir = XOOPS_ROOT_PATH . '/uploads/shoutbox'; + //Always check if a directory exists prior to creation + if (!is_dir($cacheDir)) { + return true; + } else { + return rmdirr($cacheDir); + } +} + +/** + * Delete a file, or a folder and its contents + * + * @author Aidan Lister <ai...@ph...> + * @version 1.0 + * @param string $dirname The directory to delete + * @return bool Returns true on success, false on failure + */ + +function rmdirr($dirname) +{ + // Simple de... [truncated message content] |
From: <be...@us...> - 2012-07-31 12:35:22
|
Revision: 9960 http://xoops.svn.sourceforge.net/xoops/?rev=9960&view=rev Author: beckmi Date: 2012-07-31 12:35:08 +0000 (Tue, 31 Jul 2012) Log Message: ----------- Release 1.01 Beta 1 (conversion to XOOPS 2.5.5 GUI) Modified Paths: -------------- XoopsModules/mypoints/trunk/mypoints/admin/about.php XoopsModules/mypoints/trunk/mypoints/admin/index.php XoopsModules/mypoints/trunk/mypoints/admin/menu.php XoopsModules/mypoints/trunk/mypoints/xoops_version.php Added Paths: ----------- XoopsModules/mypoints/releases/1.0/ XoopsModules/mypoints/releases/1.0/mypoints/ XoopsModules/mypoints/releases/1.0/mypoints/admin/ XoopsModules/mypoints/releases/1.0/mypoints/admin/about.php XoopsModules/mypoints/releases/1.0/mypoints/admin/functions.php XoopsModules/mypoints/releases/1.0/mypoints/admin/header.php XoopsModules/mypoints/releases/1.0/mypoints/admin/index.php XoopsModules/mypoints/releases/1.0/mypoints/admin/menu.php XoopsModules/mypoints/releases/1.0/mypoints/changelog.txt XoopsModules/mypoints/releases/1.0/mypoints/class/ XoopsModules/mypoints/releases/1.0/mypoints/class/about.php XoopsModules/mypoints/releases/1.0/mypoints/class/index.html XoopsModules/mypoints/releases/1.0/mypoints/class/plugin.php XoopsModules/mypoints/releases/1.0/mypoints/class/relation.php XoopsModules/mypoints/releases/1.0/mypoints/class/user.php XoopsModules/mypoints/releases/1.0/mypoints/images/ XoopsModules/mypoints/releases/1.0/mypoints/images/bg.png XoopsModules/mypoints/releases/1.0/mypoints/images/left_both.png XoopsModules/mypoints/releases/1.0/mypoints/images/right_both.png XoopsModules/mypoints/releases/1.0/mypoints/images/slogo.png XoopsModules/mypoints/releases/1.0/mypoints/images/xuupslogo.png XoopsModules/mypoints/releases/1.0/mypoints/include/ XoopsModules/mypoints/releases/1.0/mypoints/include/functions.php XoopsModules/mypoints/releases/1.0/mypoints/include/index.html XoopsModules/mypoints/releases/1.0/mypoints/index.php XoopsModules/mypoints/releases/1.0/mypoints/language/ XoopsModules/mypoints/releases/1.0/mypoints/language/english/ XoopsModules/mypoints/releases/1.0/mypoints/language/english/about.php XoopsModules/mypoints/releases/1.0/mypoints/language/english/admin.php XoopsModules/mypoints/releases/1.0/mypoints/language/english/blocks.php XoopsModules/mypoints/releases/1.0/mypoints/language/english/index.html XoopsModules/mypoints/releases/1.0/mypoints/language/english/main.php XoopsModules/mypoints/releases/1.0/mypoints/language/english/modinfo.php XoopsModules/mypoints/releases/1.0/mypoints/language/index.html XoopsModules/mypoints/releases/1.0/mypoints/mypoints.php XoopsModules/mypoints/releases/1.0/mypoints/plugins/ XoopsModules/mypoints/releases/1.0/mypoints/plugins/arms.php XoopsModules/mypoints/releases/1.0/mypoints/plugins/forum.php XoopsModules/mypoints/releases/1.0/mypoints/plugins/index.html XoopsModules/mypoints/releases/1.0/mypoints/plugins/myalbum.php XoopsModules/mypoints/releases/1.0/mypoints/plugins/mydownloads.php XoopsModules/mypoints/releases/1.0/mypoints/plugins/mylinks.php XoopsModules/mypoints/releases/1.0/mypoints/plugins/newbb.php XoopsModules/mypoints/releases/1.0/mypoints/plugins/news.php XoopsModules/mypoints/releases/1.0/mypoints/plugins/publisher.php XoopsModules/mypoints/releases/1.0/mypoints/plugins/system.php XoopsModules/mypoints/releases/1.0/mypoints/plugins/tutorials.php XoopsModules/mypoints/releases/1.0/mypoints/plugins/webshow.php XoopsModules/mypoints/releases/1.0/mypoints/plugins/wfsections.php XoopsModules/mypoints/releases/1.0/mypoints/plugins/xoopstube.php XoopsModules/mypoints/releases/1.0/mypoints/readme.txt XoopsModules/mypoints/releases/1.0/mypoints/sql/ XoopsModules/mypoints/releases/1.0/mypoints/sql/index.html XoopsModules/mypoints/releases/1.0/mypoints/sql/mysql.sql XoopsModules/mypoints/releases/1.0/mypoints/templates/ XoopsModules/mypoints/releases/1.0/mypoints/templates/index.html XoopsModules/mypoints/releases/1.0/mypoints/templates/mypoints_about.html XoopsModules/mypoints/releases/1.0/mypoints/templates/mypoints_mypoints.html XoopsModules/mypoints/releases/1.0/mypoints/templates/mypoints_showall.html XoopsModules/mypoints/releases/1.0/mypoints/xoops_version.php XoopsModules/mypoints/trunk/mypoints/admin/about2.php XoopsModules/mypoints/trunk/mypoints/admin/admin_footer.php XoopsModules/mypoints/trunk/mypoints/admin/admin_header.php XoopsModules/mypoints/trunk/mypoints/admin/main.php XoopsModules/mypoints/trunk/mypoints/docs/ XoopsModules/mypoints/trunk/mypoints/docs/changelog.txt XoopsModules/mypoints/trunk/mypoints/docs/credits.txt XoopsModules/mypoints/trunk/mypoints/docs/index.html XoopsModules/mypoints/trunk/mypoints/docs/install.txt XoopsModules/mypoints/trunk/mypoints/docs/lang_diff.txt XoopsModules/mypoints/trunk/mypoints/docs/license.txt XoopsModules/mypoints/trunk/mypoints/docs/readme.txt XoopsModules/mypoints/trunk/mypoints/language/english/help/ XoopsModules/mypoints/trunk/mypoints/language/english/help/help.html XoopsModules/mypoints/trunk/mypoints/language/english/help/index.html Removed Paths: ------------- XoopsModules/mypoints/trunk/mypoints/changelog.txt XoopsModules/mypoints/trunk/mypoints/readme.txt Added: XoopsModules/mypoints/releases/1.0/mypoints/admin/about.php =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/admin/about.php (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/admin/about.php 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1,30 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Mypoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: about.php 0 2009-11-14 18:47:04Z trabis $ + */ + +include_once dirname(__FILE__) . '/header.php'; + +include_once dirname(dirname(__FILE__)) . '/class/about.php'; +xoops_cp_header(); +mypoints_adminmenu(2); +$aboutObj = new MypointsAbout(); +$aboutObj->render(); +xoops_cp_footer(); + +?> \ No newline at end of file Added: XoopsModules/mypoints/releases/1.0/mypoints/admin/functions.php =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/admin/functions.php (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/admin/functions.php 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1,68 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Mytabs + * @since 1.0 + * @author trabis <lus...@gm...> + .* @author InstantZero http://xoops.instant-zero.com + * @version $Id: functions.php 0 2009-11-14 18:47:04Z trabis $ + */ + +defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); + +function mypoints_adminmenu($currentoption = 0, $breadcrumb = '') +{ + /* Nice buttons styles */ + echo " + <style type='text/css'> + #buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; } + #buttonbar { float:left; width:100%; background: #e7e7e7 url('" . XOOPS_URL . "/modules/mypoints/images/bg.png') repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; } + #buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; } + #buttonbar li { display:inline; margin:0; padding:0; } + #buttonbar a { float:left; background:url('" . XOOPS_URL . "/modules/mypoints/images/left_both.png') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; } + #buttonbar a span { float:left; display:block; background:url('" . XOOPS_URL . "/modules/mypoints/images/right_both.png') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; } + /* Commented Backslash Hack hides rule from IE5-Mac \*/ + #buttonbar a span {float:none;} + /* End IE5-Mac hack */ + #buttonbar a:hover span { color:#333; } + #buttonbar #current a { background-position:0 -150px; border-width:0; } + #buttonbar #current a span { background-position:100% -150px; padding-bottom:5px; color:#333; } + #buttonbar a:hover { background-position:0% -150px; } + #buttonbar a:hover span { background-position:100% -150px; } + </style> + "; + global $xoopsModule, $xoopsConfig; + + $tblColors = array('', '', ''); + if ($currentoption >= 0) { + $tblColors[$currentoption] = 'current'; + } + + xoops_loadLanguage('modinfo', 'mypoints'); + + echo "<div id='buttontop'>"; + echo "<table style=\"width: 100%; padding: 0; \" cellspacing=\"0\"><tr>"; + echo "<td style=\"width: 60%; font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;\"><a class=\"nobutton\" href=\"../../system/admin.php?fct=preferences&op=showmod&mod=" . $xoopsModule->getVar('mid') . "\">" . _AM_MYPOINTS_GENERALSET . "</a>"; + echo " | <a href=\"../index.php\">" . _AM_MYPOINTS_GOTOMOD . "</a></td>"; + echo "<td style=\"width: 40%; font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;\"><b>" . $xoopsModule->name() . " " . _AM_MYPOINTS_MODULEADMIN . "</b> " . $breadcrumb . "</td>"; + echo "</tr></table>"; + echo "</div>"; + + echo "<div id='buttonbar'>"; + echo "<ul>"; + echo "<li id='" . $tblColors[0] . "'><a href=\"index.php\"\"><span>" ._MI_MYPOINTS_ADMMENU1 . "</span></a></li>\n"; + echo "<li id='" . $tblColors[2] . "'><a href=\"about.php\"\"><span>" ._MI_MYPOINTS_ADMMENU2 . "</span></a></li>\n"; + echo "</ul></div><div> </div>"; +} +?> \ No newline at end of file Added: XoopsModules/mypoints/releases/1.0/mypoints/admin/header.php =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/admin/header.php (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/admin/header.php 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1,24 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package MyPoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: header.php 0 2009-11-14 18:47:04Z trabis $ + */ +include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; +include_once dirname(__FILE__) . '/functions.php'; +include_once dirname(dirname(__FILE__)) . '/include/functions.php'; + +?> \ No newline at end of file Added: XoopsModules/mypoints/releases/1.0/mypoints/admin/index.php =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/admin/index.php (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/admin/index.php 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1,205 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package MyPoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: index.php 0 2009-11-14 18:47:04Z trabis $ + */ +include_once dirname(__FILE__) . '/header.php'; + +$choice = isset($_REQUEST['op']) ? $_REQUEST['op'] : ''; + +function mypoints_index() +{ + global $xoopsUser, $xoopsModule, $xoopsModuleConfig; + + $plugin_handler = xoops_getmodulehandler('plugin'); + + xoops_cp_header(); + mypoints_adminmenu(0); + $module_handler = xoops_gethandler('module'); + $since = $xoopsModuleConfig['countsince']; + + $criteria = new CriteriaCompo(new Criteria('isactive', 1)); + $modules = $module_handler->getObjects($criteria, true); + unset($criteria); + //get list of useritems_count plugins + $items_plugins = array(); + foreach ($modules as $moduleid => $module) { + $info = array(); + $info = mypoints_getPluginInfo( $module->getVar('dirname') , 'useritems_count'); + if (is_array($info) && count($info) > 0) { + include_once $info['plugin_path']; + if (function_exists(@$info['func'])) { + $items_plugins[$moduleid] = $module; + } + } + unset($info); + } + + //get list of uservotes_count plugins + $votes_plugins = array(); + foreach ($modules as $moduleid=>$module) { + $info = array(); + $info = mypoints_getPluginInfo( $module->getVar('dirname') , 'uservotes_count'); + if (is_array($info) && count($info) > 0) { + include_once $info['plugin_path']; + if (function_exists(@$info['func'])) { + $votes_plugins[$moduleid] = $module; + } + } + unset($info); + } + + echo "<h3>" . _AM_MYPOINTS_PLUGINS . "</h3>"; + echo "<form action ='index.php?op=submit' method=post>"; + echo "<table border = '0' cellpadding = '2' cellspacing = '1' width=100% class = outer>"; + echo "<tr class = bg3><td>" . _AM_MYPOINTS_MODULENAME . "</td><td>" + . _AM_MYPOINTS_PLUGINTYPE . "</td><td>" + . _AM_MYPOINTS_PLUGINNAME . "</td><td>" + . _AM_MYPOINTS_STATUS . "</td><td> </td><td>" + . _AM_MYPOINTS_POINTS . "</td></tr>"; + + foreach ($items_plugins as $moduleid => $module) { + $plugin = $plugin_handler->getByModuleType($moduleid, 'items'); + $actif = is_object($plugin) ? $plugin->getVar('pluginisactive') : 0; + $multi = is_object($plugin) ? $plugin->getVar('pluginmulti') : 1; + $name = is_object($plugin) ? $plugin->getVar('pluginname') : $module->getVar('name'); + unset($plugin); + + echo "<tr>"; + echo "<td class = head>" . $module->getVar('name') . "</td>"; + echo "<td class = head>" . _AM_MYPOINTS_PLUGINITEMS . "</td>"; + echo "<td class = 'even'><input type='text' name='items_name[" . $module->getVar('mid') . "]' size=20 value='" . $name . "'></td>"; + echo "<td class = 'even'><select name=items_actif[" . $module->getVar('mid') . "]>"; + + $sel = ""; + if ($actif == "1") { + $sel = "SELECTED"; + } + echo "<option " . $sel . " value=\"1\">" . _AM_MYPOINTS_ACTIVE . "\n</option>\n"; + $sel = ""; + if ($actif == "0") { + $sel = "SELECTED"; + } + echo "<option " . $sel . " value=\"0\">" . _AM_MYPOINTS_INACTIVE . "\n</option>\n"; + echo "</select></td>"; + echo "<td class = 'even'>" . _AM_MYPOINTS_MULTI . "</td>"; + echo "<td class = 'even'><input type='text' name='items_multi[" . $module->getVar('mid')."]' size=2 value='" . $multi . "'></td>"; + echo "</tr>"; + } + + foreach ($votes_plugins as $moduleid => $module) { + $plugin = $plugin_handler->getByModuleType($moduleid, 'votes'); + $actif = is_object($plugin) ? $plugin->getVar('pluginisactive') : 0; + $multi = is_object($plugin) ? $plugin->getVar('pluginmulti') : 1; + $name = is_object($plugin) ? $plugin->getVar('pluginname') : $module->getVar('name'); + unset($plugin); + + echo "<tr>"; + echo "<td class = head>" . $module->getVar('name') . "</td>"; + echo "<td class = head>" . _AM_MYPOINTS_PLUGINVOTES . "</td>"; + echo "<td class = 'even'><input type='text' name='votes_name[" . $module->getVar('mid') . "]' size=20 value='" . $name . "'></td>"; + echo "<td class = 'even'><select name=votes_actif[" . $module->getVar('mid') . "]>"; + $sel = ""; + if ($actif == "1") { + $sel = "SELECTED"; + } + echo "<option " . $sel . " value=\"1\">" . _AM_MYPOINTS_ACTIVE . "\n</option>\n"; + $sel = ""; + if ($actif == "0") { + $sel = "SELECTED"; + } + echo "<option " . $sel . " value=\"0\">" . _AM_MYPOINTS_INACTIVE . "\n</option>\n"; + echo "</select></td>"; + echo "<td class = 'even'>" . _AM_MYPOINTS_MULTI . "</td>"; + echo "<td class = 'even'><input type='text' name='votes_multi[" . $module->getVar('mid') . "]' size=2 value='" . $multi . "'></td>"; + echo "</tr>"; + } + + echo "</table><p>"; + echo "<input type='hidden' name='ok' VALUE='1'>"; + echo "<input type='submit' value='" . _AM_MYPOINTS_GO . "'>"; + echo "</form>"; + + xoops_cp_footer(); +} + +function mypoints_update_plugins() +{ + global $xoopsUser, $xoopsDB; + $plugin_handler = xoops_getmodulehandler('plugin'); + if (sizeof($_POST) > 0) { + $plugin_handler->deleteAll(); + if (isset($_POST['items_actif'])) { + foreach ($_POST['items_actif'] as $moduleid => $value) { + $criteria = new CriteriaCompo(new Criteria('pluginmid', $moduleid)); + $criteria->add(new Criteria('plugintype', 'items'), 'AND'); + $criteria->setLimit(1); + $plugins =& $plugin_handler->getObjects($criteria); + unset($criteria); + $plugin = !empty($plugins) ? $plugins[0] : $plugin_handler->create(); + $plugin->setVar('plugintype', 'items'); + $plugin->setVar('pluginmid', $moduleid); + $plugin->setVar('pluginisactive', $value); + if (isset($_POST['items_multi'][$moduleid])) { + $plugin->setVar('pluginmulti', $_POST['items_multi'][$moduleid]); + } + if (isset($_POST['items_name'][$moduleid])) { + $plugin->setVar('pluginname', $_POST['items_name'][$moduleid]); + } + $plugin_handler->insert($plugin); + unset($plugin); + } + } + if (isset($_POST['votes_actif'])) { + foreach($_POST['votes_actif'] as $moduleid => $value) { + $criteria = new CriteriaCompo(new Criteria('pluginmid', $moduleid)); + $criteria->add(new Criteria('plugintype', 'votes'), 'AND'); + $criteria->setLimit(1); + $plugins = $plugin_handler->getObjects($criteria); + unset($criteria); + $plugin = !empty($plugins) ? $plugins[0] : $plugin_handler->create(); + $plugin->setVar('plugintype', 'votes'); + $plugin->setVar('pluginmid', $moduleid); + $plugin->setVar('pluginisactive', $value); + if (isset($_POST['votes_multi'][$moduleid])) { + $plugin->setVar('pluginmulti', $_POST['votes_multi'][$moduleid]); + } + if (isset($_POST['votes_name'][$moduleid])) { + $plugin->setVar('pluginname', $_POST['votes_name'][$moduleid]); + } + $plugin_handler->insert($plugin); + unset($plugin); + } + } + } + + mypoints_updatePoints(1); + redirect_header('index.php', 1, _AM_MYPOINTS_DONE); + exit; +} + +switch ($choice) { + case "submit": + mypoints_update_plugins(); + break; + + default: + mypoints_index(); + break; +} + +?> \ No newline at end of file Added: XoopsModules/mypoints/releases/1.0/mypoints/admin/menu.php =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/admin/menu.php (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/admin/menu.php 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1,25 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Mypoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: menu.php 0 2009-11-14 18:47:04Z trabis $ + */ +$adminmenu[0]['title'] = _MI_MYPOINTS_ADMMENU1; +$adminmenu[0]['link'] = "admin/index.php"; + +$adminmenu[1]['title'] = _MI_MYPOINTS_ADMMENU2; +$adminmenu[1]['link'] = "admin/about.php"; +?> \ No newline at end of file Added: XoopsModules/mypoints/releases/1.0/mypoints/changelog.txt =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/changelog.txt (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/changelog.txt 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1,13 @@ +<b><u>=> Version 1.0 (2009-11-14)</u></b> +- Xoops 2.4 compatible only + +<b><u>=> Version 1.0 RC (2009-06-05)</u></b> +- Fixed : Points were not auto updating +- Added : Plugin for publisher module + +<b><u>=> Version 1.0 Beta (2008-10-11)</u></b> +- Added : Templates +- Added : mypoints.php + +<b><u>=> Version 1.0 Alpha (2008-06-11)</u></b> +- First public release of the module. Added: XoopsModules/mypoints/releases/1.0/mypoints/class/about.php =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/class/about.php (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/class/about.php 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1,150 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Mypoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @author The SmartFactory http://www.smartfactory.ca + * @version $Id: about.php 0 2009-11-14 18:47:04Z trabis $ + */ + +defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); + +/** + * Class About is a simple class that lets you build an about page + * @author The SmartFactory <www.smartfactory.ca> + */ +class MypointsAbout +{ + var $_lang_aboutTitle; + var $_lang_author_info; + var $_lang_developer_lead; + var $_lang_developer_contributor; + var $_lang_developer_website; + var $_lang_developer_email; + var $_lang_developer_credits; + var $_lang_module_info; + var $_lang_module_status; + var $_lang_module_release_date; + var $_lang_module_demo; + var $_lang_module_support; + var $_lang_module_bug; + var $_lang_module_submit_bug; + var $_lang_module_feature; + var $_lang_module_submit_feature; + var $_lang_module_disclaimer; + var $_lang_author_word; + var $_lang_version_history; + var $_lang_by; + var $_tpl; + + function __construct($aboutTitle = 'About') + { + xoops_loadLanguage('about', 'mypoints'); + $this->_aboutTitle = $aboutTitle; + + $this->_lang_developer_contributor = _AB_MYPOINTS_DEVELOPER_CONTRIBUTOR; + $this->_lang_developer_website = _AB_MYPOINTS_DEVELOPER_WEBSITE; + $this->_lang_developer_email = _AB_MYPOINTS_DEVELOPER_EMAIL; + $this->_lang_developer_credits = _AB_MYPOINTS_DEVELOPER_CREDITS; + $this->_lang_module_info = _AB_MYPOINTS_MODULE_INFO; + $this->_lang_module_status = _AB_MYPOINTS_MODULE_STATUS; + $this->_lang_module_release_date =_AB_MYPOINTS_MODULE_RELEASE_DATE ; + $this->_lang_module_demo = _AB_MYPOINTS_MODULE_DEMO; + $this->_lang_module_support = _AB_MYPOINTS_MODULE_SUPPORT; + $this->_lang_module_bug = _AB_MYPOINTS_MODULE_BUG; + $this->_lang_module_submit_bug = _AB_MYPOINTS_MODULE_SUBMIT_BUG; + $this->_lang_module_feature = _AB_MYPOINTS_MODULE_FEATURE; + $this->_lang_module_submit_feature = _AB_MYPOINTS_MODULE_SUBMIT_FEATURE; + $this->_lang_module_disclaimer = _AB_MYPOINTS_MODULE_DISCLAIMER; + $this->_lang_author_word = _AB_MYPOINTS_AUTHOR_WORD; + $this->_lang_version_history = _AB_MYPOINTS_VERSION_HISTORY; + + } + + function sanitize($value) + { + $myts =& MyTextSanitizer::getInstance(); + return $myts->displayTarea($value, 1); + } + + function render() + { + global $xoopsModule; + $module_handler =& xoops_gethandler('module'); + $versioninfo =& $module_handler->get($xoopsModule->getVar('mid')); + + $this->_tpl = new XoopsTpl(); + $this->_tpl->assign('module_url', XOOPS_URL . "/modules/" . $xoopsModule->getVar('dirname') . "/"); + $this->_tpl->assign('module_image', $versioninfo->getInfo('image')); + $this->_tpl->assign('module_name', $versioninfo->getInfo('name')); + $this->_tpl->assign('module_version', $versioninfo->getInfo('version')); + $this->_tpl->assign('module_status_version', $versioninfo->getInfo('status_version')); + + // Left headings... + if ($versioninfo->getInfo('author_realname') != '') { + $author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")"; + } else { + $author_name = $versioninfo->getInfo('author'); + } + $this->_tpl->assign('module_author_name', $author_name); + $this->_tpl->assign('module_license', $versioninfo->getInfo('license')); + $this->_tpl->assign('module_credits', $versioninfo->getInfo('credits')); + + // Developers Information + $this->_tpl->assign('module_developer_lead', $versioninfo->getInfo('developer_lead')); + $this->_tpl->assign('module_developer_contributor', $versioninfo->getInfo('developer_contributor')); + $this->_tpl->assign('module_developer_website_url', $versioninfo->getInfo('developer_website_url')); + $this->_tpl->assign('module_developer_website_name', $versioninfo->getInfo('developer_website_name')); + $this->_tpl->assign('module_developer_email', $versioninfo->getInfo('developer_email')); + + $people = $versioninfo->getInfo('people'); + if ($people) { + $this->_tpl->assign('module_people_developers', isset($people['developers']) ? array_map(array($this, 'sanitize'), $people['developers']) : false); + $this->_tpl->assign('module_people_testers', isset($people['testers']) ? array_map(array($this, 'sanitize'), $people['testers']) : false); + $this->_tpl->assign('module_people_translaters', isset($people['translaters']) ? array_map(array($this, 'sanitize'), $people['translaters']) : false); + $this->_tpl->assign('module_people_documenters', isset($people['documenters']) ? array_map(array($this, 'sanitize'), $people['documenters']) : false); + $this->_tpl->assign('module_people_other', isset($people['other']) ? array_map(array($this, 'sanitize'), $people['other']) : false); + } + //$this->_tpl->assign('module_developers', $versioninfo->getInfo('developer_email')); + + // Module Development information + $this->_tpl->assign('module_date', $versioninfo->getInfo('date')); + $this->_tpl->assign('module_status', $versioninfo->getInfo('status')); + $this->_tpl->assign('module_demo_site_url', $versioninfo->getInfo('demo_site_url')); + $this->_tpl->assign('module_demo_site_name', $versioninfo->getInfo('demo_site_name')); + $this->_tpl->assign('module_support_site_url', $versioninfo->getInfo('support_site_url')); + $this->_tpl->assign('module_support_site_name', $versioninfo->getInfo('support_site_name')); + $this->_tpl->assign('module_submit_bug', $versioninfo->getInfo('submit_bug')); + $this->_tpl->assign('module_submit_feature', $versioninfo->getInfo('submit_feature')); + + // Warning + $this->_tpl->assign('module_warning', $this->sanitize($versioninfo->getInfo('warning'))); + + // Author's note + $this->_tpl->assign('module_author_word', $versioninfo->getInfo('author_word')); + + // For changelog thanks to 3Dev + if (file_exists($file = XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/changelog.txt')) { + $filesize = filesize($file); + $handle = fopen($file, 'r'); + $this->_tpl->assign('module_version_history', $this->sanitize(fread($handle, $filesize))); + fclose($handle); + } + + $this->_tpl->display('db:mypoints_about.html'); + } +} + +?> \ No newline at end of file Added: XoopsModules/mypoints/releases/1.0/mypoints/class/index.html =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/class/index.html (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/class/index.html 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/mypoints/releases/1.0/mypoints/class/plugin.php =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/class/plugin.php (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/class/plugin.php 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1,69 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package MyPoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: plugin.php 0 2009-11-14 18:47:04Z trabis $ + */ + +defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); + +class MypointsPlugin extends XoopsObject +{ + /** + * constructor + */ + function __construct() + { + $this->initVar("pluginid", XOBJ_DTYPE_INT); + $this->initVar("pluginmid", XOBJ_DTYPE_INT); + $this->initVar('pluginname', XOBJ_DTYPE_TXTBOX, ''); + $this->initVar('plugintype', XOBJ_DTYPE_TXTBOX, 'items'); + $this->initVar("pluginmulti", XOBJ_DTYPE_INT,1); + $this->initVar("pluginisactive", XOBJ_DTYPE_INT,1); + } +} + +class MypointspluginHandler extends XoopsPersistableObjectHandler +{ + /** + * constructor + */ + function __construct(&$db) + { + parent::__construct($db, "mypoints_plugin", 'MypointsPlugin', "pluginid", "pluginmid"); + } + + function getByModuleType($mid, $type) + { + $plugin = false; + $mid = intval($mid); + if ($mid > 0) { + $sql = 'SELECT * FROM '.$this->db->prefix('mypoints_plugin') + . ' WHERE pluginmid=' . $mid + .' AND plugintype=' . $this->db->quoteString($type); + if (!$result = $this->db->query($sql)) { + return $plugin; + } + $numrows = $this->db->getRowsNum($result); + if ($numrows == 1) { + $plugin = new Mypointsplugin(); + $plugin->assignVars($this->db->fetchArray($result)); + } + } + return $plugin; + } +} +?> \ No newline at end of file Added: XoopsModules/mypoints/releases/1.0/mypoints/class/relation.php =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/class/relation.php (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/class/relation.php 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1,66 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package MyPoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: relation.php 0 2009-11-14 18:47:04Z trabis $ + */ + +defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); + +class MypointsRelation extends XoopsObject +{ + /** + * constructor + */ + function __construct() + { + $this->initVar("relationid", XOBJ_DTYPE_INT); + $this->initVar("relationuid", XOBJ_DTYPE_INT); + $this->initVar("relationpid", XOBJ_DTYPE_INT); + $this->initVar("relationpoints", XOBJ_DTYPE_INT); + } +} + +class MypointsRelationHandler extends XoopsPersistableObjectHandler +{ + /** + * constructor + */ + function __construct(&$db) + { + parent::__construct($db, "mypoints_relation", 'MypointsRelation', "relationid", "relationpid"); + } + + function getByPluginUid($pid , $uid) + { + $relation = false; + $pid = intval($pid); + $uid = intval($uid); + $sql = 'SELECT * FROM '.$this->db->prefix('mypoints_relation') + . ' WHERE relationpid=' . $pid + . ' AND relationuid=' . $uid; + if (!$result = $this->db->query($sql)) { + return $relation; + } + $numrows = $this->db->getRowsNum($result); + if ($numrows == 1) { + $relation = new MypointsRelation(); + $relation->assignVars($this->db->fetchArray($result)); + } + return $relation; + } +} +?> \ No newline at end of file Added: XoopsModules/mypoints/releases/1.0/mypoints/class/user.php =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/class/user.php (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/class/user.php 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1,47 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package MyPoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: user.php 0 2009-11-14 18:47:04Z trabis $ + */ + +defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); + +class MypointsUser extends XoopsObject +{ + /** + * constructor + */ + function MypointsUser() + { + $this->initVar("useruid", XOBJ_DTYPE_INT, 0); + $this->initVar('useruname', XOBJ_DTYPE_TXTBOX, ''); + $this->initVar("userpoints", XOBJ_DTYPE_INT,0); + } +} + +class MypointsUserHandler extends XoopsPersistableObjectHandler +{ + /** + * constructor + */ + function __construct(&$db) + { + parent::__construct($db, "mypoints_user", 'MypointsUser', "useruid", "useruname"); + } + +} +?> \ No newline at end of file Added: XoopsModules/mypoints/releases/1.0/mypoints/images/bg.png =================================================================== (Binary files differ) Property changes on: XoopsModules/mypoints/releases/1.0/mypoints/images/bg.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/mypoints/releases/1.0/mypoints/images/left_both.png =================================================================== (Binary files differ) Property changes on: XoopsModules/mypoints/releases/1.0/mypoints/images/left_both.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/mypoints/releases/1.0/mypoints/images/right_both.png =================================================================== (Binary files differ) Property changes on: XoopsModules/mypoints/releases/1.0/mypoints/images/right_both.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/mypoints/releases/1.0/mypoints/images/slogo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/mypoints/releases/1.0/mypoints/images/slogo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/mypoints/releases/1.0/mypoints/images/xuupslogo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/mypoints/releases/1.0/mypoints/images/xuupslogo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/mypoints/releases/1.0/mypoints/include/functions.php =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/include/functions.php (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/include/functions.php 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1,160 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package MyPoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: functions.php 0 2009-11-14 18:47:04Z trabis $ + */ + +defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); + +function mypoints_pluginExecute($dirname, $items, $since, $func = 'useritems_count') +{ + global $xoopsUser, $xoopsConfig, $xoopsDB; + + $ret = array(); + $plugins_path = XOOPS_ROOT_PATH . '/modules/mypoints/plugins'; + $plugin_info = mypoints_getPluginInfo($dirname , $func) ; + + if (empty($plugin_info) || empty($plugin_info['plugin_path'])) { + return false; + } + + include_once $plugin_info['plugin_path']; + + // call the plugin + if (function_exists(@$plugin_info['func'])) { + // get the list of items + $ret = $plugin_info['func']($items, $since); + } + + return $ret; +} + +function mypoints_getPluginInfo($dirname , $func = 'useritems_count') +{ + global $xoopsConfig; + $language = $xoopsConfig['language']; + // get $mytrustdirname for D3 modules + $mytrustdirname = '' ; + if (defined('XOOPS_TRUST_PATH') && file_exists(XOOPS_ROOT_PATH . "/modules/{$dirname}/mytrustdirname.php")) { + @include XOOPS_ROOT_PATH . "/modules/{$dirname}/mytrustdirname.php"; + $d3module_plugin_file = XOOPS_TRUST_PATH . "/modules/{$mytrustdirname}/include/mypoints.plugin.php"; + } + + $module_plugin_file = XOOPS_ROOT_PATH . "/modules/{$dirname}/include/mypoints.plugin.php" ; + $builtin_plugin_file = XOOPS_ROOT_PATH . "/modules/mypoints/plugins/{$dirname}.php" ; + + if (file_exists($module_plugin_file)) { + // module side (1st priority) + $ret = array( + 'plugin_path' => $module_plugin_file, + 'func' => $dirname . '_' . $func, + 'type' => 'module'); + } else if (!empty($mytrustdirname) && file_exists($d3module_plugin_file)) { + // D3 module's plugin under xoops_trust_path (2nd priority) + $ret = array( + 'plugin_path' => $d3module_plugin_file, + 'func' => $mytrustdirname . '_' . $func, + 'type' => 'module (D3)'); + } else if (file_exists($builtin_plugin_file)) { + // built-in plugin under modules/mypoints (3rd priority) + $ret = array( + 'plugin_path' => $builtin_plugin_file, + 'func' => $dirname . '_' . $func, + 'type' => 'built-in'); + } else { + $ret = array(); + } + + return $ret; +} + +////// +// Update the Users Scores (refresh table) +////// +function mypoints_updatePoints($force = 0) +{ + global $xoopsDB, $xoopsModuleConfig; + + $module_handler = xoops_gethandler('module'); + $plugin_handler = xoops_getmodulehandler('plugin'); + $user_handler = xoops_getmodulehandler('user'); + $relation_handler = xoops_getmodulehandler('relation'); + + $refreshtime = $xoopsModuleConfig['refreshtime']; + $since = strtotime($xoopsModuleConfig['countsince']); + $countwebm = $xoopsModuleConfig['countadmin']; + + $user = $user_handler->get(0); + $timestamp = 0; + if (is_object($user)) { + $timestamp = $user->getVar('useruname'); + } + + if (((time() - $timestamp) >= $refreshtime) || $force == 1) { + // Timer expired, update table + // Set date of update + $user_handler->deleteAll(); + $relation_handler->deleteAll(); + + $user = $user_handler->create(); + $user->setVar('useruid', 0); + $user->setVar('useruname', time()); + $user->setVar('userpoints', 0); + $user_handler->insert($user); + + // Prep to calculate user points + if ($countwebm == 0) { + $query = $xoopsDB->query("SELECT uid, uname FROM " . $xoopsDB->prefix("users") . " WHERE rank = '0' ORDER BY uid"); + } else { + $query = $xoopsDB->query("SELECT uid, uname FROM " . $xoopsDB->prefix("users") . " ORDER BY uid"); + } + $users = array(); + while (list($uid,$uname) = $xoopsDB->fetchRow($query)) { + + // Calculate User Points + $points = 0; + $criteria = new CriteriaCompo(new Criteria('pluginisactive', 1)); + //$criteria->add(new Criteria('plugintype', 'items'), 'AND'); + $plugins = $plugin_handler->getObjects($criteria); + foreach ($plugins as $plugin) { + $moduleid = $plugin->getVar('pluginmid'); + $module = $module_handler->get($moduleid); + $count = mypoints_pluginExecute($module->getVar('dirname') , $uid, $since, 'user' . $plugin->getVar('plugintype') . '_count'); + if ($count > 0) { + $relation = $relation_handler->create(); + $relation->setVar('relationuid', $uid); + $relation->setVar('relationpid', $plugin->getVar('pluginid')); + $relation->setVar('relationpoints', $count); + $relation_handler->insert($relation); + unset($relation); + $points = $points + ($count * $plugin->getVar('pluginmulti')); + } + unset($module); + } + + if ($points > 0) { + $user = $user_handler->create(); + $user->setVar('useruid', $uid); + $user->setVar('useruname', $uname); + $user->setVar('userpoints', $points); + $user_handler->insert($user); + unset($user); + } + } + } +} +?> \ No newline at end of file Added: XoopsModules/mypoints/releases/1.0/mypoints/include/index.html =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/include/index.html (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/include/index.html 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/mypoints/releases/1.0/mypoints/index.php =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/index.php (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/index.php 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1,119 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Mypoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: index.php 0 2009-11-14 18:47:04Z trabis $ + */ + +include_once dirname(dirname(dirname(__FILE__))) . '/mainfile.php'; + +include_once XOOPS_ROOT_PATH . '/modules/mypoints/include/functions.php'; + +$xoopsOption['template_main'] = 'mypoints_showall.html'; +include_once XOOPS_ROOT_PATH . '/header.php'; + +$details = isset($_GET['det']) ? intval($_GET['det']) : 0; + +$plugin_handler = xoops_getmodulehandler('plugin'); +$relation_handler = xoops_getmodulehandler('relation'); +$user_handler = xoops_getmodulehandler('user'); + +$refreshtime = $xoopsModuleConfig['refreshtime']; +$since = strtotime($xoopsModuleConfig['countsince']); +$countwebm = $xoopsModuleConfig['countadmin']; +$limit = $xoopsModuleConfig['memberstoshow']; + +$xoopsTpl->assign('topmessage', sprintf(_MA_MYPOINTS_TOPMESSAGE, $limit, $xoopsConfig['sitename'])); + +if ($refreshtime < 60) { + $refreshtimes = $refreshtime ; + $message = $refreshtimes == 1 ? _MA_MYPOINTS_LSECOND : _MA_MYPOINTS_LSECONDS; +} else if ($refreshtime < 3600) { + $refreshtimes = intval($refreshtime / 60); + $message = $refreshtimes == 1 ? _MA_MYPOINTS_LMINUTE : _MA_MYPOINTS_LMINUTES; +} else if ($refreshtime < 86400) { + $refreshtimes = intval($refreshtime / 3600); + $message = $refreshtimes == 1 ? _MA_MYPOINTS_LHOUR : _MA_MYPOINTS_LHOURS; +} else { + $refreshtimes = intval($refreshtime / 86400); + $message = $refreshtimes == 1 ? _MA_MYPOINTS_LDAY : _MA_MYPOINTS_LDAYS; +} + +$xoopsTpl->assign('updatemessage', sprintf(_MA_MYPOINTS_UPDATEMESSAGE, $refreshtimes, $message)); +$xoopsTpl->assign('sincemessage', sprintf(_MA_MYPOINTS_SINCEMESSAGE, formatTimeStamp($since, "m", $xoopsConfig['server_TZ']))); + + +$criteria = new CriteriaCompo(new Criteria('pluginisactive', 1)); +//$criteria->add(new Criteria('plugintype', 'items'), 'AND'); +$criteria->setSort('pluginmulti'); +$criteria->setOrder('DESC'); +$plugins = $plugin_handler->getObjects($criteria); +unset($criteria); + +if ($details == 1) { + foreach ($plugins as $plugin) { + $myplugins[]['pluginname'] = $plugin->getVar('pluginname'); + } + $xoopsTpl->assign('plugins', $myplugins); +} + +$criteria = new CriteriaCompo(); +$criteria->setSort('userpoints'); +$criteria->setOrder('DESC'); +$criteria->setLimit($limit); +//$criteria->setStart($start); +$users = $user_handler->getObjects($criteria); +$myusers = array(); + +$i = 1; +foreach ($users as $user) { + if ($user->getVar('userpoints') > 0) { + $myusers[$i]['rank'] = $i; + $myusers[$i]['link'] = "<a href='" . XOOPS_URL . "/userinfo.php?uid=" . $user->getVar('useruid') . "'>" . $user->getVar('useruname') . "</a>"; + if ($details == 1) { + foreach ($plugins as $plugin){ + $relation = $relation_handler->getByPluginUid($plugin->getVar('pluginid'), $user->getVar('useruid')); + $points = is_object($relation) ? $relation->getVar('relationpoints') : 0; + $myusers[$i]['pluginpoints'][] = $points; + } + } + $myusers[$i]['points'] = $user->getVar('userpoints'); + $i++; + } +} + +$xoopsTpl->assign('users', $myusers); + +$detailslink = "<a href='index.php?det="; +if ($details == 1) { + $detailslink .= "0' title='" . _MA_MYPOINTS_MOREOFF . "'>" . _MA_MYPOINTS_MOREOFF . "</a>"; +} else { + $detailslink .= "1' title='" . _MA_MYPOINTS_MOREON . "'>" . _MA_MYPOINTS_MOREON . "</a>"; +} +$xoopsTpl->assign('detailslink', $detailslink); + +$message = ''; +foreach ($plugins as $plugin) { + $message .= $plugin->getVar('pluginname').' : '; + $points = $plugin->getVar('pluginmulti') == 1 ? _MA_MYPOINTS_LPOINT : _MA_MYPOINTS_LPOINTS; + $message .= $plugin->getVar('pluginmulti'). ' ' . $points . '<br />'; +} + +$xoopsTpl->assign('howtoearnmessage', $message); +mypoints_updatePoints(); + +include_once XOOPS_ROOT_PATH . '/footer.php'; +?> \ No newline at end of file Added: XoopsModules/mypoints/releases/1.0/mypoints/language/english/about.php =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/language/english/about.php (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/language/english/about.php 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1,25 @@ +<?php +define('_AB_MYPOINTS_AUTHOR_INFO', 'Contributors information'); +define('_AB_MYPOINTS_AUTHOR_WORD', "The Author's Word"); +define('_AB_MYPOINTS_BY', 'By'); +define('_AB_MYPOINTS_DEVELOPER_CONTRIBUTOR', 'Contributor(s)'); +define('_AB_MYPOINTS_DEVELOPER_CREDITS', 'Credits'); +define('_AB_MYPOINTS_DEVELOPER_EMAIL', 'Email'); +define('_AB_MYPOINTS_DEVELOPER_WEBSITE', 'Website'); +define('_AB_MYPOINTS_MODULE_BUG', 'Report a bug for this module'); +define('_AB_MYPOINTS_MODULE_DEMO', 'Demo Site'); +define('_AB_MYPOINTS_MODULE_DISCLAIMER', 'Disclaimer'); +define('_AB_MYPOINTS_MODULE_FEATURE', 'Suggest a new feature for this module'); +define('_AB_MYPOINTS_MODULE_INFO', 'Module Developpment Informations'); +define('_AB_MYPOINTS_MODULE_RELEASE_DATE', 'Release date'); +define('_AB_MYPOINTS_MODULE_STATUS', 'Status'); +define('_AB_MYPOINTS_MODULE_SUBMIT_BUG', 'Submit a bug'); +define('_AB_MYPOINTS_MODULE_SUBMIT_FEATURE', 'Request a feature'); +define('_AB_MYPOINTS_MODULE_SUPPORT', 'Official support site'); +define('_AB_MYPOINTS_PEOPLE_DEVELOPERS', 'Developers'); +define('_AB_MYPOINTS_PEOPLE_TESTERS', 'Testers'); +define('_AB_MYPOINTS_PEOPLE_DOCUMENTERS', 'Documenters'); +define('_AB_MYPOINTS_PEOPLE_TRANSLATERS', 'Translaters'); +define('_AB_MYPOINTS_PEOPLE_OTHER', 'Other contributors'); +define('_AB_MYPOINTS_VERSION_HISTORY', 'Version History'); +?> Added: XoopsModules/mypoints/releases/1.0/mypoints/language/english/admin.php =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/language/english/admin.php (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/language/english/admin.php 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1,21 @@ +<?php +define("_AM_MYPOINTS_MODULEADMIN", "module administration"); +define("_AM_MYPOINTS_GENERALSET", "General Settings"); +define("_AM_MYPOINTS_GOTOMOD", "Go to module"); + +define("_AM_MYPOINTS_PLUGINS", "Plugins administration"); +define("_AM_MYPOINTS_MODULENAME", "Module name"); +define("_AM_MYPOINTS_PLUGINNAME", "Plugin name"); +define("_AM_MYPOINTS_PLUGINTYPE", "Plugin type"); +define("_AM_MYPOINTS_PLUGINITEMS", "Items"); +define("_AM_MYPOINTS_PLUGINVOTES", "Votes"); +define("_AM_MYPOINTS_STATUS", "Status"); + +define("_AM_MYPOINTS_POINTS", "Points"); +define("_AM_MYPOINTS_ACTIVE", "Active"); +define("_AM_MYPOINTS_INACTIVE", "Inactive"); + +define("_AM_MYPOINTS_MULTI", "Multiply by"); +define("_AM_MYPOINTS_GO", "Save and Update"); +define("_AM_MYPOINTS_DONE", "Done!"); +?> Added: XoopsModules/mypoints/releases/1.0/mypoints/language/english/blocks.php =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/language/english/blocks.php (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/language/english/blocks.php 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1,6 @@ +<?php +// Author: Trabis +// URL: http://www.xuups.com +// E-Mail: lus...@gm... +define("_MB_MYPOINTS_DISPLAYC","Display %s comments"); +?> Added: XoopsModules/mypoints/releases/1.0/mypoints/language/english/index.html =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/language/english/index.html (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/language/english/index.html 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/mypoints/releases/1.0/mypoints/language/english/main.php =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/language/english/main.php (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/language/english/main.php 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1,37 @@ +<?php +// Author: Trabis +// URL: http://www.xuups.com +// E-Mail: lus...@gm... +define('_MA_MYPOINTS_TITLE','Title'); +define('_MA_MYPOINTS_TOPMESSAGE','The %s most active members of %s'); +define('_MA_MYPOINTS_USERTOPMESSAGE','Points earned by %s'); +define('_MA_MYPOINTS_UPDATEMESSAGE','All points are updated after %s %s'); +define('_MA_MYPOINTS_SINCEMESSAGE','Counting since : %s'); + +define('_MA_MYPOINTS_LHOURS','hours'); +define('_MA_MYPOINTS_LHOUR','hour'); +define('_MA_MYPOINTS_LDAYS','days'); +define('_MA_MYPOINTS_LDAY','day'); +define('_MA_MYPOINTS_LMINUTES','minutes'); +define('_MA_MYPOINTS_LMINUTE','minute'); +define('_MA_MYPOINTS_LSECONDS','seconds'); +define('_MA_MYPOINTS_LSECOND','second'); + +define('_MA_MYPOINTS_RANK','Rank'); +define('_MA_MYPOINTS_MEMBER','Member'); +define('_MA_MYPOINTS_TOTALPOINTS','Total points'); +define('_MA_MYPOINTS_MOREON','Details ON'); +define('_MA_MYPOINTS_MOREOFF','Details OFF'); +define('_MA_MYPOINTS_HOWEARNPOINTS','How can I earn Points?'); + +define('_MA_MYPOINTS_PLUGIN','Plugin'); +define('_MA_MYPOINTS_ITEMS','Items'); +define('_MA_MYPOINTS_MULTI','Multiply'); + +define('_MA_MYPOINTS_SVOTE','%s Vote'); +define('_MA_MYPOINTS_SSUBMISSION','%s Submission'); + +define('_MA_MYPOINTS_LPOINT','point'); +define('_MA_MYPOINTS_LPOINTS','points'); +define('_MA_MYPOINTS_SPOINTS','Points'); +?> Added: XoopsModules/mypoints/releases/1.0/mypoints/language/english/modinfo.php =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/language/english/modinfo.php (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/language/english/modinfo.php 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1,34 @@ +<?php +// Author: Trabis +// URL: http://www.xuups.com +// E-Mail: lus...@gm... + +//general +define("_MI_MYPOINTS_NAME","My points"); +define("_MI_MYPOINTS_DSC","Pluginable module that allows you to give your members points for each submission or vote"); +//blocks +define("_MI_MYPOINTS_BNAME1","Members points"); +//admin menu +define("_MI_MYPOINTS_ADMMENU1","Plugins"); +define("_MI_MYPOINTS_ADMMENU2","About"); +//menu +define("_MI_MYPOINTS_SHOWALL","Top members"); +define("_MI_MYPOINTS_MYPOINTS","My points"); +//configs +define("_MI_MYPOINTS_NAMEDISPLAY","Name display"); +define("_MI_MYPOINTS_NAMEDISPLAY_DSC","How would you like to display the members names?"); +define("_MI_MYPOINTS_DISPLAYNAME1","User name"); +define("_MI_MYPOINTS_DISPLAYNAME2","Real name"); + +define("_MI_MYPOINTS_MEMBERSTOSHOW","Members to show"); +define("_MI_MYPOINTS_MEMBERSTOSHOW_DSC","How many members you want to show in the top list?"); + +define("_MI_MYPOINTS_REFRESHTIME","Refresh time"); +define("_MI_MYPOINTS_REFRESHTIME_DSC","Time between points updates. Set this is seconds."); + +define("_MI_MYPOINTS_COUNTADMIN","Count point for admins"); +define("_MI_MYPOINTS_COUNTADMIN_DSC","Do you want to show admins in the top list?"); + +define("_MI_MYPOINTS_COUNTSINCE","Count since"); +define("_MI_MYPOINTS_COUNTSINCE_DSC","Count points since this date."); +?> Added: XoopsModules/mypoints/releases/1.0/mypoints/language/index.html =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/language/index.html (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/language/index.html 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/mypoints/releases/1.0/mypoints/mypoints.php =================================================================== --- XoopsModules/mypoints/releases/1.0/mypoints/mypoints.php (rev 0) +++ XoopsModules/mypoints/releases/1.0/mypoints/mypoints.php 2012-07-31 12:35:08 UTC (rev 9960) @@ -0,0 +1,116 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from thi... [truncated message content] |
From: <be...@us...> - 2012-07-31 12:33:00
|
Revision: 9959 http://xoops.svn.sourceforge.net/xoops/?rev=9959&view=rev Author: beckmi Date: 2012-07-31 12:32:51 +0000 (Tue, 31 Jul 2012) Log Message: ----------- Adding MyPoints (by Trabis) Added Paths: ----------- XoopsModules/mypoints/ XoopsModules/mypoints/branches/ XoopsModules/mypoints/releases/ XoopsModules/mypoints/trunk/ XoopsModules/mypoints/trunk/mypoints/ XoopsModules/mypoints/trunk/mypoints/admin/ XoopsModules/mypoints/trunk/mypoints/admin/about.php XoopsModules/mypoints/trunk/mypoints/admin/functions.php XoopsModules/mypoints/trunk/mypoints/admin/header.php XoopsModules/mypoints/trunk/mypoints/admin/index.php XoopsModules/mypoints/trunk/mypoints/admin/menu.php XoopsModules/mypoints/trunk/mypoints/changelog.txt XoopsModules/mypoints/trunk/mypoints/class/ XoopsModules/mypoints/trunk/mypoints/class/about.php XoopsModules/mypoints/trunk/mypoints/class/index.html XoopsModules/mypoints/trunk/mypoints/class/plugin.php XoopsModules/mypoints/trunk/mypoints/class/relation.php XoopsModules/mypoints/trunk/mypoints/class/user.php XoopsModules/mypoints/trunk/mypoints/images/ XoopsModules/mypoints/trunk/mypoints/images/bg.png XoopsModules/mypoints/trunk/mypoints/images/left_both.png XoopsModules/mypoints/trunk/mypoints/images/right_both.png XoopsModules/mypoints/trunk/mypoints/images/slogo.png XoopsModules/mypoints/trunk/mypoints/images/xuupslogo.png XoopsModules/mypoints/trunk/mypoints/include/ XoopsModules/mypoints/trunk/mypoints/include/functions.php XoopsModules/mypoints/trunk/mypoints/include/index.html XoopsModules/mypoints/trunk/mypoints/index.php XoopsModules/mypoints/trunk/mypoints/language/ XoopsModules/mypoints/trunk/mypoints/language/english/ XoopsModules/mypoints/trunk/mypoints/language/english/about.php XoopsModules/mypoints/trunk/mypoints/language/english/admin.php XoopsModules/mypoints/trunk/mypoints/language/english/blocks.php XoopsModules/mypoints/trunk/mypoints/language/english/index.html XoopsModules/mypoints/trunk/mypoints/language/english/main.php XoopsModules/mypoints/trunk/mypoints/language/english/modinfo.php XoopsModules/mypoints/trunk/mypoints/language/index.html XoopsModules/mypoints/trunk/mypoints/mypoints.php XoopsModules/mypoints/trunk/mypoints/plugins/ XoopsModules/mypoints/trunk/mypoints/plugins/arms.php XoopsModules/mypoints/trunk/mypoints/plugins/forum.php XoopsModules/mypoints/trunk/mypoints/plugins/index.html XoopsModules/mypoints/trunk/mypoints/plugins/myalbum.php XoopsModules/mypoints/trunk/mypoints/plugins/mydownloads.php XoopsModules/mypoints/trunk/mypoints/plugins/mylinks.php XoopsModules/mypoints/trunk/mypoints/plugins/newbb.php XoopsModules/mypoints/trunk/mypoints/plugins/news.php XoopsModules/mypoints/trunk/mypoints/plugins/publisher.php XoopsModules/mypoints/trunk/mypoints/plugins/system.php XoopsModules/mypoints/trunk/mypoints/plugins/tutorials.php XoopsModules/mypoints/trunk/mypoints/plugins/webshow.php XoopsModules/mypoints/trunk/mypoints/plugins/wfsections.php XoopsModules/mypoints/trunk/mypoints/plugins/xoopstube.php XoopsModules/mypoints/trunk/mypoints/readme.txt XoopsModules/mypoints/trunk/mypoints/sql/ XoopsModules/mypoints/trunk/mypoints/sql/index.html XoopsModules/mypoints/trunk/mypoints/sql/mysql.sql XoopsModules/mypoints/trunk/mypoints/templates/ XoopsModules/mypoints/trunk/mypoints/templates/index.html XoopsModules/mypoints/trunk/mypoints/templates/mypoints_about.html XoopsModules/mypoints/trunk/mypoints/templates/mypoints_mypoints.html XoopsModules/mypoints/trunk/mypoints/templates/mypoints_showall.html XoopsModules/mypoints/trunk/mypoints/xoops_version.php Added: XoopsModules/mypoints/trunk/mypoints/admin/about.php =================================================================== --- XoopsModules/mypoints/trunk/mypoints/admin/about.php (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/admin/about.php 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1,30 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Mypoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: about.php 0 2009-11-14 18:47:04Z trabis $ + */ + +include_once dirname(__FILE__) . '/header.php'; + +include_once dirname(dirname(__FILE__)) . '/class/about.php'; +xoops_cp_header(); +mypoints_adminmenu(2); +$aboutObj = new MypointsAbout(); +$aboutObj->render(); +xoops_cp_footer(); + +?> \ No newline at end of file Added: XoopsModules/mypoints/trunk/mypoints/admin/functions.php =================================================================== --- XoopsModules/mypoints/trunk/mypoints/admin/functions.php (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/admin/functions.php 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1,68 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Mytabs + * @since 1.0 + * @author trabis <lus...@gm...> + .* @author InstantZero http://xoops.instant-zero.com + * @version $Id: functions.php 0 2009-11-14 18:47:04Z trabis $ + */ + +defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); + +function mypoints_adminmenu($currentoption = 0, $breadcrumb = '') +{ + /* Nice buttons styles */ + echo " + <style type='text/css'> + #buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; } + #buttonbar { float:left; width:100%; background: #e7e7e7 url('" . XOOPS_URL . "/modules/mypoints/images/bg.png') repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; } + #buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; } + #buttonbar li { display:inline; margin:0; padding:0; } + #buttonbar a { float:left; background:url('" . XOOPS_URL . "/modules/mypoints/images/left_both.png') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; } + #buttonbar a span { float:left; display:block; background:url('" . XOOPS_URL . "/modules/mypoints/images/right_both.png') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; } + /* Commented Backslash Hack hides rule from IE5-Mac \*/ + #buttonbar a span {float:none;} + /* End IE5-Mac hack */ + #buttonbar a:hover span { color:#333; } + #buttonbar #current a { background-position:0 -150px; border-width:0; } + #buttonbar #current a span { background-position:100% -150px; padding-bottom:5px; color:#333; } + #buttonbar a:hover { background-position:0% -150px; } + #buttonbar a:hover span { background-position:100% -150px; } + </style> + "; + global $xoopsModule, $xoopsConfig; + + $tblColors = array('', '', ''); + if ($currentoption >= 0) { + $tblColors[$currentoption] = 'current'; + } + + xoops_loadLanguage('modinfo', 'mypoints'); + + echo "<div id='buttontop'>"; + echo "<table style=\"width: 100%; padding: 0; \" cellspacing=\"0\"><tr>"; + echo "<td style=\"width: 60%; font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;\"><a class=\"nobutton\" href=\"../../system/admin.php?fct=preferences&op=showmod&mod=" . $xoopsModule->getVar('mid') . "\">" . _AM_MYPOINTS_GENERALSET . "</a>"; + echo " | <a href=\"../index.php\">" . _AM_MYPOINTS_GOTOMOD . "</a></td>"; + echo "<td style=\"width: 40%; font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;\"><b>" . $xoopsModule->name() . " " . _AM_MYPOINTS_MODULEADMIN . "</b> " . $breadcrumb . "</td>"; + echo "</tr></table>"; + echo "</div>"; + + echo "<div id='buttonbar'>"; + echo "<ul>"; + echo "<li id='" . $tblColors[0] . "'><a href=\"index.php\"\"><span>" ._MI_MYPOINTS_ADMMENU1 . "</span></a></li>\n"; + echo "<li id='" . $tblColors[2] . "'><a href=\"about.php\"\"><span>" ._MI_MYPOINTS_ADMMENU2 . "</span></a></li>\n"; + echo "</ul></div><div> </div>"; +} +?> \ No newline at end of file Added: XoopsModules/mypoints/trunk/mypoints/admin/header.php =================================================================== --- XoopsModules/mypoints/trunk/mypoints/admin/header.php (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/admin/header.php 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1,24 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package MyPoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: header.php 0 2009-11-14 18:47:04Z trabis $ + */ +include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; +include_once dirname(__FILE__) . '/functions.php'; +include_once dirname(dirname(__FILE__)) . '/include/functions.php'; + +?> \ No newline at end of file Added: XoopsModules/mypoints/trunk/mypoints/admin/index.php =================================================================== --- XoopsModules/mypoints/trunk/mypoints/admin/index.php (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/admin/index.php 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1,205 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package MyPoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: index.php 0 2009-11-14 18:47:04Z trabis $ + */ +include_once dirname(__FILE__) . '/header.php'; + +$choice = isset($_REQUEST['op']) ? $_REQUEST['op'] : ''; + +function mypoints_index() +{ + global $xoopsUser, $xoopsModule, $xoopsModuleConfig; + + $plugin_handler = xoops_getmodulehandler('plugin'); + + xoops_cp_header(); + mypoints_adminmenu(0); + $module_handler = xoops_gethandler('module'); + $since = $xoopsModuleConfig['countsince']; + + $criteria = new CriteriaCompo(new Criteria('isactive', 1)); + $modules = $module_handler->getObjects($criteria, true); + unset($criteria); + //get list of useritems_count plugins + $items_plugins = array(); + foreach ($modules as $moduleid => $module) { + $info = array(); + $info = mypoints_getPluginInfo( $module->getVar('dirname') , 'useritems_count'); + if (is_array($info) && count($info) > 0) { + include_once $info['plugin_path']; + if (function_exists(@$info['func'])) { + $items_plugins[$moduleid] = $module; + } + } + unset($info); + } + + //get list of uservotes_count plugins + $votes_plugins = array(); + foreach ($modules as $moduleid=>$module) { + $info = array(); + $info = mypoints_getPluginInfo( $module->getVar('dirname') , 'uservotes_count'); + if (is_array($info) && count($info) > 0) { + include_once $info['plugin_path']; + if (function_exists(@$info['func'])) { + $votes_plugins[$moduleid] = $module; + } + } + unset($info); + } + + echo "<h3>" . _AM_MYPOINTS_PLUGINS . "</h3>"; + echo "<form action ='index.php?op=submit' method=post>"; + echo "<table border = '0' cellpadding = '2' cellspacing = '1' width=100% class = outer>"; + echo "<tr class = bg3><td>" . _AM_MYPOINTS_MODULENAME . "</td><td>" + . _AM_MYPOINTS_PLUGINTYPE . "</td><td>" + . _AM_MYPOINTS_PLUGINNAME . "</td><td>" + . _AM_MYPOINTS_STATUS . "</td><td> </td><td>" + . _AM_MYPOINTS_POINTS . "</td></tr>"; + + foreach ($items_plugins as $moduleid => $module) { + $plugin = $plugin_handler->getByModuleType($moduleid, 'items'); + $actif = is_object($plugin) ? $plugin->getVar('pluginisactive') : 0; + $multi = is_object($plugin) ? $plugin->getVar('pluginmulti') : 1; + $name = is_object($plugin) ? $plugin->getVar('pluginname') : $module->getVar('name'); + unset($plugin); + + echo "<tr>"; + echo "<td class = head>" . $module->getVar('name') . "</td>"; + echo "<td class = head>" . _AM_MYPOINTS_PLUGINITEMS . "</td>"; + echo "<td class = 'even'><input type='text' name='items_name[" . $module->getVar('mid') . "]' size=20 value='" . $name . "'></td>"; + echo "<td class = 'even'><select name=items_actif[" . $module->getVar('mid') . "]>"; + + $sel = ""; + if ($actif == "1") { + $sel = "SELECTED"; + } + echo "<option " . $sel . " value=\"1\">" . _AM_MYPOINTS_ACTIVE . "\n</option>\n"; + $sel = ""; + if ($actif == "0") { + $sel = "SELECTED"; + } + echo "<option " . $sel . " value=\"0\">" . _AM_MYPOINTS_INACTIVE . "\n</option>\n"; + echo "</select></td>"; + echo "<td class = 'even'>" . _AM_MYPOINTS_MULTI . "</td>"; + echo "<td class = 'even'><input type='text' name='items_multi[" . $module->getVar('mid')."]' size=2 value='" . $multi . "'></td>"; + echo "</tr>"; + } + + foreach ($votes_plugins as $moduleid => $module) { + $plugin = $plugin_handler->getByModuleType($moduleid, 'votes'); + $actif = is_object($plugin) ? $plugin->getVar('pluginisactive') : 0; + $multi = is_object($plugin) ? $plugin->getVar('pluginmulti') : 1; + $name = is_object($plugin) ? $plugin->getVar('pluginname') : $module->getVar('name'); + unset($plugin); + + echo "<tr>"; + echo "<td class = head>" . $module->getVar('name') . "</td>"; + echo "<td class = head>" . _AM_MYPOINTS_PLUGINVOTES . "</td>"; + echo "<td class = 'even'><input type='text' name='votes_name[" . $module->getVar('mid') . "]' size=20 value='" . $name . "'></td>"; + echo "<td class = 'even'><select name=votes_actif[" . $module->getVar('mid') . "]>"; + $sel = ""; + if ($actif == "1") { + $sel = "SELECTED"; + } + echo "<option " . $sel . " value=\"1\">" . _AM_MYPOINTS_ACTIVE . "\n</option>\n"; + $sel = ""; + if ($actif == "0") { + $sel = "SELECTED"; + } + echo "<option " . $sel . " value=\"0\">" . _AM_MYPOINTS_INACTIVE . "\n</option>\n"; + echo "</select></td>"; + echo "<td class = 'even'>" . _AM_MYPOINTS_MULTI . "</td>"; + echo "<td class = 'even'><input type='text' name='votes_multi[" . $module->getVar('mid') . "]' size=2 value='" . $multi . "'></td>"; + echo "</tr>"; + } + + echo "</table><p>"; + echo "<input type='hidden' name='ok' VALUE='1'>"; + echo "<input type='submit' value='" . _AM_MYPOINTS_GO . "'>"; + echo "</form>"; + + xoops_cp_footer(); +} + +function mypoints_update_plugins() +{ + global $xoopsUser, $xoopsDB; + $plugin_handler = xoops_getmodulehandler('plugin'); + if (sizeof($_POST) > 0) { + $plugin_handler->deleteAll(); + if (isset($_POST['items_actif'])) { + foreach ($_POST['items_actif'] as $moduleid => $value) { + $criteria = new CriteriaCompo(new Criteria('pluginmid', $moduleid)); + $criteria->add(new Criteria('plugintype', 'items'), 'AND'); + $criteria->setLimit(1); + $plugins =& $plugin_handler->getObjects($criteria); + unset($criteria); + $plugin = !empty($plugins) ? $plugins[0] : $plugin_handler->create(); + $plugin->setVar('plugintype', 'items'); + $plugin->setVar('pluginmid', $moduleid); + $plugin->setVar('pluginisactive', $value); + if (isset($_POST['items_multi'][$moduleid])) { + $plugin->setVar('pluginmulti', $_POST['items_multi'][$moduleid]); + } + if (isset($_POST['items_name'][$moduleid])) { + $plugin->setVar('pluginname', $_POST['items_name'][$moduleid]); + } + $plugin_handler->insert($plugin); + unset($plugin); + } + } + if (isset($_POST['votes_actif'])) { + foreach($_POST['votes_actif'] as $moduleid => $value) { + $criteria = new CriteriaCompo(new Criteria('pluginmid', $moduleid)); + $criteria->add(new Criteria('plugintype', 'votes'), 'AND'); + $criteria->setLimit(1); + $plugins = $plugin_handler->getObjects($criteria); + unset($criteria); + $plugin = !empty($plugins) ? $plugins[0] : $plugin_handler->create(); + $plugin->setVar('plugintype', 'votes'); + $plugin->setVar('pluginmid', $moduleid); + $plugin->setVar('pluginisactive', $value); + if (isset($_POST['votes_multi'][$moduleid])) { + $plugin->setVar('pluginmulti', $_POST['votes_multi'][$moduleid]); + } + if (isset($_POST['votes_name'][$moduleid])) { + $plugin->setVar('pluginname', $_POST['votes_name'][$moduleid]); + } + $plugin_handler->insert($plugin); + unset($plugin); + } + } + } + + mypoints_updatePoints(1); + redirect_header('index.php', 1, _AM_MYPOINTS_DONE); + exit; +} + +switch ($choice) { + case "submit": + mypoints_update_plugins(); + break; + + default: + mypoints_index(); + break; +} + +?> \ No newline at end of file Added: XoopsModules/mypoints/trunk/mypoints/admin/menu.php =================================================================== --- XoopsModules/mypoints/trunk/mypoints/admin/menu.php (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/admin/menu.php 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1,25 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Mypoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: menu.php 0 2009-11-14 18:47:04Z trabis $ + */ +$adminmenu[0]['title'] = _MI_MYPOINTS_ADMMENU1; +$adminmenu[0]['link'] = "admin/index.php"; + +$adminmenu[1]['title'] = _MI_MYPOINTS_ADMMENU2; +$adminmenu[1]['link'] = "admin/about.php"; +?> \ No newline at end of file Added: XoopsModules/mypoints/trunk/mypoints/changelog.txt =================================================================== --- XoopsModules/mypoints/trunk/mypoints/changelog.txt (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/changelog.txt 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1,13 @@ +<b><u>=> Version 1.0 (2009-11-14)</u></b> +- Xoops 2.4 compatible only + +<b><u>=> Version 1.0 RC (2009-06-05)</u></b> +- Fixed : Points were not auto updating +- Added : Plugin for publisher module + +<b><u>=> Version 1.0 Beta (2008-10-11)</u></b> +- Added : Templates +- Added : mypoints.php + +<b><u>=> Version 1.0 Alpha (2008-06-11)</u></b> +- First public release of the module. Added: XoopsModules/mypoints/trunk/mypoints/class/about.php =================================================================== --- XoopsModules/mypoints/trunk/mypoints/class/about.php (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/class/about.php 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1,150 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Mypoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @author The SmartFactory http://www.smartfactory.ca + * @version $Id: about.php 0 2009-11-14 18:47:04Z trabis $ + */ + +defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); + +/** + * Class About is a simple class that lets you build an about page + * @author The SmartFactory <www.smartfactory.ca> + */ +class MypointsAbout +{ + var $_lang_aboutTitle; + var $_lang_author_info; + var $_lang_developer_lead; + var $_lang_developer_contributor; + var $_lang_developer_website; + var $_lang_developer_email; + var $_lang_developer_credits; + var $_lang_module_info; + var $_lang_module_status; + var $_lang_module_release_date; + var $_lang_module_demo; + var $_lang_module_support; + var $_lang_module_bug; + var $_lang_module_submit_bug; + var $_lang_module_feature; + var $_lang_module_submit_feature; + var $_lang_module_disclaimer; + var $_lang_author_word; + var $_lang_version_history; + var $_lang_by; + var $_tpl; + + function __construct($aboutTitle = 'About') + { + xoops_loadLanguage('about', 'mypoints'); + $this->_aboutTitle = $aboutTitle; + + $this->_lang_developer_contributor = _AB_MYPOINTS_DEVELOPER_CONTRIBUTOR; + $this->_lang_developer_website = _AB_MYPOINTS_DEVELOPER_WEBSITE; + $this->_lang_developer_email = _AB_MYPOINTS_DEVELOPER_EMAIL; + $this->_lang_developer_credits = _AB_MYPOINTS_DEVELOPER_CREDITS; + $this->_lang_module_info = _AB_MYPOINTS_MODULE_INFO; + $this->_lang_module_status = _AB_MYPOINTS_MODULE_STATUS; + $this->_lang_module_release_date =_AB_MYPOINTS_MODULE_RELEASE_DATE ; + $this->_lang_module_demo = _AB_MYPOINTS_MODULE_DEMO; + $this->_lang_module_support = _AB_MYPOINTS_MODULE_SUPPORT; + $this->_lang_module_bug = _AB_MYPOINTS_MODULE_BUG; + $this->_lang_module_submit_bug = _AB_MYPOINTS_MODULE_SUBMIT_BUG; + $this->_lang_module_feature = _AB_MYPOINTS_MODULE_FEATURE; + $this->_lang_module_submit_feature = _AB_MYPOINTS_MODULE_SUBMIT_FEATURE; + $this->_lang_module_disclaimer = _AB_MYPOINTS_MODULE_DISCLAIMER; + $this->_lang_author_word = _AB_MYPOINTS_AUTHOR_WORD; + $this->_lang_version_history = _AB_MYPOINTS_VERSION_HISTORY; + + } + + function sanitize($value) + { + $myts =& MyTextSanitizer::getInstance(); + return $myts->displayTarea($value, 1); + } + + function render() + { + global $xoopsModule; + $module_handler =& xoops_gethandler('module'); + $versioninfo =& $module_handler->get($xoopsModule->getVar('mid')); + + $this->_tpl = new XoopsTpl(); + $this->_tpl->assign('module_url', XOOPS_URL . "/modules/" . $xoopsModule->getVar('dirname') . "/"); + $this->_tpl->assign('module_image', $versioninfo->getInfo('image')); + $this->_tpl->assign('module_name', $versioninfo->getInfo('name')); + $this->_tpl->assign('module_version', $versioninfo->getInfo('version')); + $this->_tpl->assign('module_status_version', $versioninfo->getInfo('status_version')); + + // Left headings... + if ($versioninfo->getInfo('author_realname') != '') { + $author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")"; + } else { + $author_name = $versioninfo->getInfo('author'); + } + $this->_tpl->assign('module_author_name', $author_name); + $this->_tpl->assign('module_license', $versioninfo->getInfo('license')); + $this->_tpl->assign('module_credits', $versioninfo->getInfo('credits')); + + // Developers Information + $this->_tpl->assign('module_developer_lead', $versioninfo->getInfo('developer_lead')); + $this->_tpl->assign('module_developer_contributor', $versioninfo->getInfo('developer_contributor')); + $this->_tpl->assign('module_developer_website_url', $versioninfo->getInfo('developer_website_url')); + $this->_tpl->assign('module_developer_website_name', $versioninfo->getInfo('developer_website_name')); + $this->_tpl->assign('module_developer_email', $versioninfo->getInfo('developer_email')); + + $people = $versioninfo->getInfo('people'); + if ($people) { + $this->_tpl->assign('module_people_developers', isset($people['developers']) ? array_map(array($this, 'sanitize'), $people['developers']) : false); + $this->_tpl->assign('module_people_testers', isset($people['testers']) ? array_map(array($this, 'sanitize'), $people['testers']) : false); + $this->_tpl->assign('module_people_translaters', isset($people['translaters']) ? array_map(array($this, 'sanitize'), $people['translaters']) : false); + $this->_tpl->assign('module_people_documenters', isset($people['documenters']) ? array_map(array($this, 'sanitize'), $people['documenters']) : false); + $this->_tpl->assign('module_people_other', isset($people['other']) ? array_map(array($this, 'sanitize'), $people['other']) : false); + } + //$this->_tpl->assign('module_developers', $versioninfo->getInfo('developer_email')); + + // Module Development information + $this->_tpl->assign('module_date', $versioninfo->getInfo('date')); + $this->_tpl->assign('module_status', $versioninfo->getInfo('status')); + $this->_tpl->assign('module_demo_site_url', $versioninfo->getInfo('demo_site_url')); + $this->_tpl->assign('module_demo_site_name', $versioninfo->getInfo('demo_site_name')); + $this->_tpl->assign('module_support_site_url', $versioninfo->getInfo('support_site_url')); + $this->_tpl->assign('module_support_site_name', $versioninfo->getInfo('support_site_name')); + $this->_tpl->assign('module_submit_bug', $versioninfo->getInfo('submit_bug')); + $this->_tpl->assign('module_submit_feature', $versioninfo->getInfo('submit_feature')); + + // Warning + $this->_tpl->assign('module_warning', $this->sanitize($versioninfo->getInfo('warning'))); + + // Author's note + $this->_tpl->assign('module_author_word', $versioninfo->getInfo('author_word')); + + // For changelog thanks to 3Dev + if (file_exists($file = XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/changelog.txt')) { + $filesize = filesize($file); + $handle = fopen($file, 'r'); + $this->_tpl->assign('module_version_history', $this->sanitize(fread($handle, $filesize))); + fclose($handle); + } + + $this->_tpl->display('db:mypoints_about.html'); + } +} + +?> \ No newline at end of file Added: XoopsModules/mypoints/trunk/mypoints/class/index.html =================================================================== --- XoopsModules/mypoints/trunk/mypoints/class/index.html (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/class/index.html 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/mypoints/trunk/mypoints/class/plugin.php =================================================================== --- XoopsModules/mypoints/trunk/mypoints/class/plugin.php (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/class/plugin.php 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1,69 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package MyPoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: plugin.php 0 2009-11-14 18:47:04Z trabis $ + */ + +defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); + +class MypointsPlugin extends XoopsObject +{ + /** + * constructor + */ + function __construct() + { + $this->initVar("pluginid", XOBJ_DTYPE_INT); + $this->initVar("pluginmid", XOBJ_DTYPE_INT); + $this->initVar('pluginname', XOBJ_DTYPE_TXTBOX, ''); + $this->initVar('plugintype', XOBJ_DTYPE_TXTBOX, 'items'); + $this->initVar("pluginmulti", XOBJ_DTYPE_INT,1); + $this->initVar("pluginisactive", XOBJ_DTYPE_INT,1); + } +} + +class MypointspluginHandler extends XoopsPersistableObjectHandler +{ + /** + * constructor + */ + function __construct(&$db) + { + parent::__construct($db, "mypoints_plugin", 'MypointsPlugin', "pluginid", "pluginmid"); + } + + function getByModuleType($mid, $type) + { + $plugin = false; + $mid = intval($mid); + if ($mid > 0) { + $sql = 'SELECT * FROM '.$this->db->prefix('mypoints_plugin') + . ' WHERE pluginmid=' . $mid + .' AND plugintype=' . $this->db->quoteString($type); + if (!$result = $this->db->query($sql)) { + return $plugin; + } + $numrows = $this->db->getRowsNum($result); + if ($numrows == 1) { + $plugin = new Mypointsplugin(); + $plugin->assignVars($this->db->fetchArray($result)); + } + } + return $plugin; + } +} +?> \ No newline at end of file Added: XoopsModules/mypoints/trunk/mypoints/class/relation.php =================================================================== --- XoopsModules/mypoints/trunk/mypoints/class/relation.php (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/class/relation.php 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1,66 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package MyPoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: relation.php 0 2009-11-14 18:47:04Z trabis $ + */ + +defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); + +class MypointsRelation extends XoopsObject +{ + /** + * constructor + */ + function __construct() + { + $this->initVar("relationid", XOBJ_DTYPE_INT); + $this->initVar("relationuid", XOBJ_DTYPE_INT); + $this->initVar("relationpid", XOBJ_DTYPE_INT); + $this->initVar("relationpoints", XOBJ_DTYPE_INT); + } +} + +class MypointsRelationHandler extends XoopsPersistableObjectHandler +{ + /** + * constructor + */ + function __construct(&$db) + { + parent::__construct($db, "mypoints_relation", 'MypointsRelation', "relationid", "relationpid"); + } + + function getByPluginUid($pid , $uid) + { + $relation = false; + $pid = intval($pid); + $uid = intval($uid); + $sql = 'SELECT * FROM '.$this->db->prefix('mypoints_relation') + . ' WHERE relationpid=' . $pid + . ' AND relationuid=' . $uid; + if (!$result = $this->db->query($sql)) { + return $relation; + } + $numrows = $this->db->getRowsNum($result); + if ($numrows == 1) { + $relation = new MypointsRelation(); + $relation->assignVars($this->db->fetchArray($result)); + } + return $relation; + } +} +?> \ No newline at end of file Added: XoopsModules/mypoints/trunk/mypoints/class/user.php =================================================================== --- XoopsModules/mypoints/trunk/mypoints/class/user.php (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/class/user.php 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1,47 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package MyPoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: user.php 0 2009-11-14 18:47:04Z trabis $ + */ + +defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); + +class MypointsUser extends XoopsObject +{ + /** + * constructor + */ + function MypointsUser() + { + $this->initVar("useruid", XOBJ_DTYPE_INT, 0); + $this->initVar('useruname', XOBJ_DTYPE_TXTBOX, ''); + $this->initVar("userpoints", XOBJ_DTYPE_INT,0); + } +} + +class MypointsUserHandler extends XoopsPersistableObjectHandler +{ + /** + * constructor + */ + function __construct(&$db) + { + parent::__construct($db, "mypoints_user", 'MypointsUser', "useruid", "useruname"); + } + +} +?> \ No newline at end of file Added: XoopsModules/mypoints/trunk/mypoints/images/bg.png =================================================================== (Binary files differ) Property changes on: XoopsModules/mypoints/trunk/mypoints/images/bg.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/mypoints/trunk/mypoints/images/left_both.png =================================================================== (Binary files differ) Property changes on: XoopsModules/mypoints/trunk/mypoints/images/left_both.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/mypoints/trunk/mypoints/images/right_both.png =================================================================== (Binary files differ) Property changes on: XoopsModules/mypoints/trunk/mypoints/images/right_both.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/mypoints/trunk/mypoints/images/slogo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/mypoints/trunk/mypoints/images/slogo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/mypoints/trunk/mypoints/images/xuupslogo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/mypoints/trunk/mypoints/images/xuupslogo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/mypoints/trunk/mypoints/include/functions.php =================================================================== --- XoopsModules/mypoints/trunk/mypoints/include/functions.php (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/include/functions.php 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1,160 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package MyPoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: functions.php 0 2009-11-14 18:47:04Z trabis $ + */ + +defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); + +function mypoints_pluginExecute($dirname, $items, $since, $func = 'useritems_count') +{ + global $xoopsUser, $xoopsConfig, $xoopsDB; + + $ret = array(); + $plugins_path = XOOPS_ROOT_PATH . '/modules/mypoints/plugins'; + $plugin_info = mypoints_getPluginInfo($dirname , $func) ; + + if (empty($plugin_info) || empty($plugin_info['plugin_path'])) { + return false; + } + + include_once $plugin_info['plugin_path']; + + // call the plugin + if (function_exists(@$plugin_info['func'])) { + // get the list of items + $ret = $plugin_info['func']($items, $since); + } + + return $ret; +} + +function mypoints_getPluginInfo($dirname , $func = 'useritems_count') +{ + global $xoopsConfig; + $language = $xoopsConfig['language']; + // get $mytrustdirname for D3 modules + $mytrustdirname = '' ; + if (defined('XOOPS_TRUST_PATH') && file_exists(XOOPS_ROOT_PATH . "/modules/{$dirname}/mytrustdirname.php")) { + @include XOOPS_ROOT_PATH . "/modules/{$dirname}/mytrustdirname.php"; + $d3module_plugin_file = XOOPS_TRUST_PATH . "/modules/{$mytrustdirname}/include/mypoints.plugin.php"; + } + + $module_plugin_file = XOOPS_ROOT_PATH . "/modules/{$dirname}/include/mypoints.plugin.php" ; + $builtin_plugin_file = XOOPS_ROOT_PATH . "/modules/mypoints/plugins/{$dirname}.php" ; + + if (file_exists($module_plugin_file)) { + // module side (1st priority) + $ret = array( + 'plugin_path' => $module_plugin_file, + 'func' => $dirname . '_' . $func, + 'type' => 'module'); + } else if (!empty($mytrustdirname) && file_exists($d3module_plugin_file)) { + // D3 module's plugin under xoops_trust_path (2nd priority) + $ret = array( + 'plugin_path' => $d3module_plugin_file, + 'func' => $mytrustdirname . '_' . $func, + 'type' => 'module (D3)'); + } else if (file_exists($builtin_plugin_file)) { + // built-in plugin under modules/mypoints (3rd priority) + $ret = array( + 'plugin_path' => $builtin_plugin_file, + 'func' => $dirname . '_' . $func, + 'type' => 'built-in'); + } else { + $ret = array(); + } + + return $ret; +} + +////// +// Update the Users Scores (refresh table) +////// +function mypoints_updatePoints($force = 0) +{ + global $xoopsDB, $xoopsModuleConfig; + + $module_handler = xoops_gethandler('module'); + $plugin_handler = xoops_getmodulehandler('plugin'); + $user_handler = xoops_getmodulehandler('user'); + $relation_handler = xoops_getmodulehandler('relation'); + + $refreshtime = $xoopsModuleConfig['refreshtime']; + $since = strtotime($xoopsModuleConfig['countsince']); + $countwebm = $xoopsModuleConfig['countadmin']; + + $user = $user_handler->get(0); + $timestamp = 0; + if (is_object($user)) { + $timestamp = $user->getVar('useruname'); + } + + if (((time() - $timestamp) >= $refreshtime) || $force == 1) { + // Timer expired, update table + // Set date of update + $user_handler->deleteAll(); + $relation_handler->deleteAll(); + + $user = $user_handler->create(); + $user->setVar('useruid', 0); + $user->setVar('useruname', time()); + $user->setVar('userpoints', 0); + $user_handler->insert($user); + + // Prep to calculate user points + if ($countwebm == 0) { + $query = $xoopsDB->query("SELECT uid, uname FROM " . $xoopsDB->prefix("users") . " WHERE rank = '0' ORDER BY uid"); + } else { + $query = $xoopsDB->query("SELECT uid, uname FROM " . $xoopsDB->prefix("users") . " ORDER BY uid"); + } + $users = array(); + while (list($uid,$uname) = $xoopsDB->fetchRow($query)) { + + // Calculate User Points + $points = 0; + $criteria = new CriteriaCompo(new Criteria('pluginisactive', 1)); + //$criteria->add(new Criteria('plugintype', 'items'), 'AND'); + $plugins = $plugin_handler->getObjects($criteria); + foreach ($plugins as $plugin) { + $moduleid = $plugin->getVar('pluginmid'); + $module = $module_handler->get($moduleid); + $count = mypoints_pluginExecute($module->getVar('dirname') , $uid, $since, 'user' . $plugin->getVar('plugintype') . '_count'); + if ($count > 0) { + $relation = $relation_handler->create(); + $relation->setVar('relationuid', $uid); + $relation->setVar('relationpid', $plugin->getVar('pluginid')); + $relation->setVar('relationpoints', $count); + $relation_handler->insert($relation); + unset($relation); + $points = $points + ($count * $plugin->getVar('pluginmulti')); + } + unset($module); + } + + if ($points > 0) { + $user = $user_handler->create(); + $user->setVar('useruid', $uid); + $user->setVar('useruname', $uname); + $user->setVar('userpoints', $points); + $user_handler->insert($user); + unset($user); + } + } + } +} +?> \ No newline at end of file Added: XoopsModules/mypoints/trunk/mypoints/include/index.html =================================================================== --- XoopsModules/mypoints/trunk/mypoints/include/index.html (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/include/index.html 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/mypoints/trunk/mypoints/index.php =================================================================== --- XoopsModules/mypoints/trunk/mypoints/index.php (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/index.php 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1,119 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Mypoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: index.php 0 2009-11-14 18:47:04Z trabis $ + */ + +include_once dirname(dirname(dirname(__FILE__))) . '/mainfile.php'; + +include_once XOOPS_ROOT_PATH . '/modules/mypoints/include/functions.php'; + +$xoopsOption['template_main'] = 'mypoints_showall.html'; +include_once XOOPS_ROOT_PATH . '/header.php'; + +$details = isset($_GET['det']) ? intval($_GET['det']) : 0; + +$plugin_handler = xoops_getmodulehandler('plugin'); +$relation_handler = xoops_getmodulehandler('relation'); +$user_handler = xoops_getmodulehandler('user'); + +$refreshtime = $xoopsModuleConfig['refreshtime']; +$since = strtotime($xoopsModuleConfig['countsince']); +$countwebm = $xoopsModuleConfig['countadmin']; +$limit = $xoopsModuleConfig['memberstoshow']; + +$xoopsTpl->assign('topmessage', sprintf(_MA_MYPOINTS_TOPMESSAGE, $limit, $xoopsConfig['sitename'])); + +if ($refreshtime < 60) { + $refreshtimes = $refreshtime ; + $message = $refreshtimes == 1 ? _MA_MYPOINTS_LSECOND : _MA_MYPOINTS_LSECONDS; +} else if ($refreshtime < 3600) { + $refreshtimes = intval($refreshtime / 60); + $message = $refreshtimes == 1 ? _MA_MYPOINTS_LMINUTE : _MA_MYPOINTS_LMINUTES; +} else if ($refreshtime < 86400) { + $refreshtimes = intval($refreshtime / 3600); + $message = $refreshtimes == 1 ? _MA_MYPOINTS_LHOUR : _MA_MYPOINTS_LHOURS; +} else { + $refreshtimes = intval($refreshtime / 86400); + $message = $refreshtimes == 1 ? _MA_MYPOINTS_LDAY : _MA_MYPOINTS_LDAYS; +} + +$xoopsTpl->assign('updatemessage', sprintf(_MA_MYPOINTS_UPDATEMESSAGE, $refreshtimes, $message)); +$xoopsTpl->assign('sincemessage', sprintf(_MA_MYPOINTS_SINCEMESSAGE, formatTimeStamp($since, "m", $xoopsConfig['server_TZ']))); + + +$criteria = new CriteriaCompo(new Criteria('pluginisactive', 1)); +//$criteria->add(new Criteria('plugintype', 'items'), 'AND'); +$criteria->setSort('pluginmulti'); +$criteria->setOrder('DESC'); +$plugins = $plugin_handler->getObjects($criteria); +unset($criteria); + +if ($details == 1) { + foreach ($plugins as $plugin) { + $myplugins[]['pluginname'] = $plugin->getVar('pluginname'); + } + $xoopsTpl->assign('plugins', $myplugins); +} + +$criteria = new CriteriaCompo(); +$criteria->setSort('userpoints'); +$criteria->setOrder('DESC'); +$criteria->setLimit($limit); +//$criteria->setStart($start); +$users = $user_handler->getObjects($criteria); +$myusers = array(); + +$i = 1; +foreach ($users as $user) { + if ($user->getVar('userpoints') > 0) { + $myusers[$i]['rank'] = $i; + $myusers[$i]['link'] = "<a href='" . XOOPS_URL . "/userinfo.php?uid=" . $user->getVar('useruid') . "'>" . $user->getVar('useruname') . "</a>"; + if ($details == 1) { + foreach ($plugins as $plugin){ + $relation = $relation_handler->getByPluginUid($plugin->getVar('pluginid'), $user->getVar('useruid')); + $points = is_object($relation) ? $relation->getVar('relationpoints') : 0; + $myusers[$i]['pluginpoints'][] = $points; + } + } + $myusers[$i]['points'] = $user->getVar('userpoints'); + $i++; + } +} + +$xoopsTpl->assign('users', $myusers); + +$detailslink = "<a href='index.php?det="; +if ($details == 1) { + $detailslink .= "0' title='" . _MA_MYPOINTS_MOREOFF . "'>" . _MA_MYPOINTS_MOREOFF . "</a>"; +} else { + $detailslink .= "1' title='" . _MA_MYPOINTS_MOREON . "'>" . _MA_MYPOINTS_MOREON . "</a>"; +} +$xoopsTpl->assign('detailslink', $detailslink); + +$message = ''; +foreach ($plugins as $plugin) { + $message .= $plugin->getVar('pluginname').' : '; + $points = $plugin->getVar('pluginmulti') == 1 ? _MA_MYPOINTS_LPOINT : _MA_MYPOINTS_LPOINTS; + $message .= $plugin->getVar('pluginmulti'). ' ' . $points . '<br />'; +} + +$xoopsTpl->assign('howtoearnmessage', $message); +mypoints_updatePoints(); + +include_once XOOPS_ROOT_PATH . '/footer.php'; +?> \ No newline at end of file Added: XoopsModules/mypoints/trunk/mypoints/language/english/about.php =================================================================== --- XoopsModules/mypoints/trunk/mypoints/language/english/about.php (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/language/english/about.php 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1,25 @@ +<?php +define('_AB_MYPOINTS_AUTHOR_INFO', 'Contributors information'); +define('_AB_MYPOINTS_AUTHOR_WORD', "The Author's Word"); +define('_AB_MYPOINTS_BY', 'By'); +define('_AB_MYPOINTS_DEVELOPER_CONTRIBUTOR', 'Contributor(s)'); +define('_AB_MYPOINTS_DEVELOPER_CREDITS', 'Credits'); +define('_AB_MYPOINTS_DEVELOPER_EMAIL', 'Email'); +define('_AB_MYPOINTS_DEVELOPER_WEBSITE', 'Website'); +define('_AB_MYPOINTS_MODULE_BUG', 'Report a bug for this module'); +define('_AB_MYPOINTS_MODULE_DEMO', 'Demo Site'); +define('_AB_MYPOINTS_MODULE_DISCLAIMER', 'Disclaimer'); +define('_AB_MYPOINTS_MODULE_FEATURE', 'Suggest a new feature for this module'); +define('_AB_MYPOINTS_MODULE_INFO', 'Module Developpment Informations'); +define('_AB_MYPOINTS_MODULE_RELEASE_DATE', 'Release date'); +define('_AB_MYPOINTS_MODULE_STATUS', 'Status'); +define('_AB_MYPOINTS_MODULE_SUBMIT_BUG', 'Submit a bug'); +define('_AB_MYPOINTS_MODULE_SUBMIT_FEATURE', 'Request a feature'); +define('_AB_MYPOINTS_MODULE_SUPPORT', 'Official support site'); +define('_AB_MYPOINTS_PEOPLE_DEVELOPERS', 'Developers'); +define('_AB_MYPOINTS_PEOPLE_TESTERS', 'Testers'); +define('_AB_MYPOINTS_PEOPLE_DOCUMENTERS', 'Documenters'); +define('_AB_MYPOINTS_PEOPLE_TRANSLATERS', 'Translaters'); +define('_AB_MYPOINTS_PEOPLE_OTHER', 'Other contributors'); +define('_AB_MYPOINTS_VERSION_HISTORY', 'Version History'); +?> Added: XoopsModules/mypoints/trunk/mypoints/language/english/admin.php =================================================================== --- XoopsModules/mypoints/trunk/mypoints/language/english/admin.php (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/language/english/admin.php 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1,21 @@ +<?php +define("_AM_MYPOINTS_MODULEADMIN", "module administration"); +define("_AM_MYPOINTS_GENERALSET", "General Settings"); +define("_AM_MYPOINTS_GOTOMOD", "Go to module"); + +define("_AM_MYPOINTS_PLUGINS", "Plugins administration"); +define("_AM_MYPOINTS_MODULENAME", "Module name"); +define("_AM_MYPOINTS_PLUGINNAME", "Plugin name"); +define("_AM_MYPOINTS_PLUGINTYPE", "Plugin type"); +define("_AM_MYPOINTS_PLUGINITEMS", "Items"); +define("_AM_MYPOINTS_PLUGINVOTES", "Votes"); +define("_AM_MYPOINTS_STATUS", "Status"); + +define("_AM_MYPOINTS_POINTS", "Points"); +define("_AM_MYPOINTS_ACTIVE", "Active"); +define("_AM_MYPOINTS_INACTIVE", "Inactive"); + +define("_AM_MYPOINTS_MULTI", "Multiply by"); +define("_AM_MYPOINTS_GO", "Save and Update"); +define("_AM_MYPOINTS_DONE", "Done!"); +?> Added: XoopsModules/mypoints/trunk/mypoints/language/english/blocks.php =================================================================== --- XoopsModules/mypoints/trunk/mypoints/language/english/blocks.php (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/language/english/blocks.php 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1,6 @@ +<?php +// Author: Trabis +// URL: http://www.xuups.com +// E-Mail: lus...@gm... +define("_MB_MYPOINTS_DISPLAYC","Display %s comments"); +?> Added: XoopsModules/mypoints/trunk/mypoints/language/english/index.html =================================================================== --- XoopsModules/mypoints/trunk/mypoints/language/english/index.html (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/language/english/index.html 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/mypoints/trunk/mypoints/language/english/main.php =================================================================== --- XoopsModules/mypoints/trunk/mypoints/language/english/main.php (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/language/english/main.php 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1,37 @@ +<?php +// Author: Trabis +// URL: http://www.xuups.com +// E-Mail: lus...@gm... +define('_MA_MYPOINTS_TITLE','Title'); +define('_MA_MYPOINTS_TOPMESSAGE','The %s most active members of %s'); +define('_MA_MYPOINTS_USERTOPMESSAGE','Points earned by %s'); +define('_MA_MYPOINTS_UPDATEMESSAGE','All points are updated after %s %s'); +define('_MA_MYPOINTS_SINCEMESSAGE','Counting since : %s'); + +define('_MA_MYPOINTS_LHOURS','hours'); +define('_MA_MYPOINTS_LHOUR','hour'); +define('_MA_MYPOINTS_LDAYS','days'); +define('_MA_MYPOINTS_LDAY','day'); +define('_MA_MYPOINTS_LMINUTES','minutes'); +define('_MA_MYPOINTS_LMINUTE','minute'); +define('_MA_MYPOINTS_LSECONDS','seconds'); +define('_MA_MYPOINTS_LSECOND','second'); + +define('_MA_MYPOINTS_RANK','Rank'); +define('_MA_MYPOINTS_MEMBER','Member'); +define('_MA_MYPOINTS_TOTALPOINTS','Total points'); +define('_MA_MYPOINTS_MOREON','Details ON'); +define('_MA_MYPOINTS_MOREOFF','Details OFF'); +define('_MA_MYPOINTS_HOWEARNPOINTS','How can I earn Points?'); + +define('_MA_MYPOINTS_PLUGIN','Plugin'); +define('_MA_MYPOINTS_ITEMS','Items'); +define('_MA_MYPOINTS_MULTI','Multiply'); + +define('_MA_MYPOINTS_SVOTE','%s Vote'); +define('_MA_MYPOINTS_SSUBMISSION','%s Submission'); + +define('_MA_MYPOINTS_LPOINT','point'); +define('_MA_MYPOINTS_LPOINTS','points'); +define('_MA_MYPOINTS_SPOINTS','Points'); +?> Added: XoopsModules/mypoints/trunk/mypoints/language/english/modinfo.php =================================================================== --- XoopsModules/mypoints/trunk/mypoints/language/english/modinfo.php (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/language/english/modinfo.php 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1,34 @@ +<?php +// Author: Trabis +// URL: http://www.xuups.com +// E-Mail: lus...@gm... + +//general +define("_MI_MYPOINTS_NAME","My points"); +define("_MI_MYPOINTS_DSC","Pluginable module that allows you to give your members points for each submission or vote"); +//blocks +define("_MI_MYPOINTS_BNAME1","Members points"); +//admin menu +define("_MI_MYPOINTS_ADMMENU1","Plugins"); +define("_MI_MYPOINTS_ADMMENU2","About"); +//menu +define("_MI_MYPOINTS_SHOWALL","Top members"); +define("_MI_MYPOINTS_MYPOINTS","My points"); +//configs +define("_MI_MYPOINTS_NAMEDISPLAY","Name display"); +define("_MI_MYPOINTS_NAMEDISPLAY_DSC","How would you like to display the members names?"); +define("_MI_MYPOINTS_DISPLAYNAME1","User name"); +define("_MI_MYPOINTS_DISPLAYNAME2","Real name"); + +define("_MI_MYPOINTS_MEMBERSTOSHOW","Members to show"); +define("_MI_MYPOINTS_MEMBERSTOSHOW_DSC","How many members you want to show in the top list?"); + +define("_MI_MYPOINTS_REFRESHTIME","Refresh time"); +define("_MI_MYPOINTS_REFRESHTIME_DSC","Time between points updates. Set this is seconds."); + +define("_MI_MYPOINTS_COUNTADMIN","Count point for admins"); +define("_MI_MYPOINTS_COUNTADMIN_DSC","Do you want to show admins in the top list?"); + +define("_MI_MYPOINTS_COUNTSINCE","Count since"); +define("_MI_MYPOINTS_COUNTSINCE_DSC","Count points since this date."); +?> Added: XoopsModules/mypoints/trunk/mypoints/language/index.html =================================================================== --- XoopsModules/mypoints/trunk/mypoints/language/index.html (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/language/index.html 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/mypoints/trunk/mypoints/mypoints.php =================================================================== --- XoopsModules/mypoints/trunk/mypoints/mypoints.php (rev 0) +++ XoopsModules/mypoints/trunk/mypoints/mypoints.php 2012-07-31 12:32:51 UTC (rev 9959) @@ -0,0 +1,116 @@ +<?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 XUUPS Project http://www.xuups.com + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Mypoints + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: mypoints.php 0 2009-11-14 18:47:04Z trabis $ + */ + +include_once dirname(dirname(dirname(__FILE__))) . '/mainfile.php'; + +$uid = 0; + +if (is_object($xoopsUser) && $xoopsUser->getVar('uid') > 0) { + $uid = $xoopsUser->getVar('uid'); + $thisUser =& $xoopsUser; +} + +if (isset($_GET['uid'])){ + $getuid = intval($_GET['uid']); + $getUser = new xoopsUser($getuid); + if (is_object($getUser) && $getUser->isactive()) { + $uid = $getuid; + $thisUser =& $getUser; + } else { + $uid = 0; + } +} + +if ($uid == 0) { + redirect_header(XOOPS_URL . '/modules/mypoints/index.php', 2, _NOPERM); + exit(); +} + +include_once XOOPS_ROOT_PATH . '/modules/mypoints/include/functions.php'; + +$xoopsOption['template_main'] = 'mypoints_mypoints.html'; +include_once XOOPS_ROOT_PATH . '/header.php'; + +$plugin_handler = xoops_getmodulehandler('plugin'); +$relation_handler = xoops_getmodulehandler('relation'); +$user_handler = xoops_getmodulehandler('user'); + +$refreshtime = $xoopsModuleConfig['refreshtime']; +$since = strtotime($xoopsModuleConfig['countsince']); +$countwebm = $xoopsModuleConfig['countadmin']; +$limit = $xoopsModuleConfig['memberstoshow']; + +$xoopsTpl->assign('topmessage', sprintf(_MA_MYPOINTS_USERTOPMESSAGE, $thisUser->getVar('uname'))); + +if ($refreshtime < 60) { + $refreshtimes = $refreshtime ; + $message = $refreshtimes == 1 ? _MA_MYPOINTS_LSECOND : _MA_MYPOINTS_LSECONDS; +} else if ($refreshtime < 3600) { + $refreshtimes = intval($refreshtime / 60); + $message = $refreshtimes == 1 ? _MA_MYPOINTS_LMI... [truncated message content] |
From: <be...@us...> - 2012-07-31 12:26:07
|
Revision: 9958 http://xoops.svn.sourceforge.net/xoops/?rev=9958&view=rev Author: beckmi Date: 2012-07-31 12:26:00 +0000 (Tue, 31 Jul 2012) Log Message: ----------- Release 1.01 Beta 1 (conversion to XOOPS 2.5.5 GUI) Modified Paths: -------------- XoopsModules/mycomments/trunk/mycomments/images/slogo.png XoopsModules/mycomments/trunk/mycomments/xoops_version.php Added Paths: ----------- XoopsModules/mycomments/trunk/mycomments/admin/ XoopsModules/mycomments/trunk/mycomments/admin/about.php XoopsModules/mycomments/trunk/mycomments/admin/admin_footer.php XoopsModules/mycomments/trunk/mycomments/admin/admin_header.php XoopsModules/mycomments/trunk/mycomments/admin/index.php XoopsModules/mycomments/trunk/mycomments/admin/menu.php XoopsModules/mycomments/trunk/mycomments/docs/ XoopsModules/mycomments/trunk/mycomments/docs/changelog.txt XoopsModules/mycomments/trunk/mycomments/docs/credits.txt XoopsModules/mycomments/trunk/mycomments/docs/index.html XoopsModules/mycomments/trunk/mycomments/docs/install.txt XoopsModules/mycomments/trunk/mycomments/docs/lang_diff.txt XoopsModules/mycomments/trunk/mycomments/docs/license.txt XoopsModules/mycomments/trunk/mycomments/docs/readme.txt XoopsModules/mycomments/trunk/mycomments/language/english/help/ XoopsModules/mycomments/trunk/mycomments/language/english/help/help.html XoopsModules/mycomments/trunk/mycomments/language/english/help/index.html Removed Paths: ------------- XoopsModules/mycomments/trunk/mycomments/readme.txt Added: XoopsModules/mycomments/trunk/mycomments/admin/about.php =================================================================== --- XoopsModules/mycomments/trunk/mycomments/admin/about.php (rev 0) +++ XoopsModules/mycomments/trunk/mycomments/admin/about.php 2012-07-31 12:26:00 UTC (rev 9958) @@ -0,0 +1,30 @@ +<?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/mycomments/trunk/mycomments/admin/admin_footer.php =================================================================== --- XoopsModules/mycomments/trunk/mycomments/admin/admin_footer.php (rev 0) +++ XoopsModules/mycomments/trunk/mycomments/admin/admin_footer.php 2012-07-31 12:26:00 UTC (rev 9958) @@ -0,0 +1,28 @@ +<?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 $ + */ + +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 Added: XoopsModules/mycomments/trunk/mycomments/admin/admin_header.php =================================================================== --- XoopsModules/mycomments/trunk/mycomments/admin/admin_header.php (rev 0) +++ XoopsModules/mycomments/trunk/mycomments/admin/admin_header.php 2012-07-31 12:26:00 UTC (rev 9958) @@ -0,0 +1,46 @@ +<?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'; + +global $xoopsModule; + +$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'); + +if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){ + include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'); + }else{ + redirect_header("../../../admin.php", 5, _AM_BIRTHDAY_MODULEADMIN_MISSING, false); + } \ No newline at end of file Added: XoopsModules/mycomments/trunk/mycomments/admin/index.php =================================================================== --- XoopsModules/mycomments/trunk/mycomments/admin/index.php (rev 0) +++ XoopsModules/mycomments/trunk/mycomments/admin/index.php 2012-07-31 12:26:00 UTC (rev 9958) @@ -0,0 +1,32 @@ +<?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 $ + */ + + +require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; +include_once dirname(__FILE__) . '/admin_header.php'; + +xoops_cp_header(); + + $indexAdmin = new ModuleAdmin(); + + echo $indexAdmin->addNavigation('index.php'); + echo $indexAdmin->renderIndex(); + +include "admin_footer.php"; \ No newline at end of file Added: XoopsModules/mycomments/trunk/mycomments/admin/menu.php =================================================================== --- XoopsModules/mycomments/trunk/mycomments/admin/menu.php (rev 0) +++ XoopsModules/mycomments/trunk/mycomments/admin/menu.php 2012-07-31 12:26:00 UTC (rev 9958) @@ -0,0 +1,52 @@ +<?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 $ + */ +defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined"); + +$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=0; +$adminmenu[$i]["title"] = _AM_MODULEADMIN_HOME; +$adminmenu[$i]['link'] = "admin/index.php"; +$adminmenu[$i]["icon"] = $pathIcon32 . '/home.png'; +//$i++; +//$adminmenu[$i]['title'] = _MI_OLEDRION_ADMENU10; +//$adminmenu[$i]['link'] = "admin/main.php?op=dashboard"; +//$adminmenu[$i]["icon"] = $pathIcon32 . '/home.png'; + +$i++; +$adminmenu[$i]['title'] = _AM_MODULEADMIN_ABOUT; +$adminmenu[$i]["link"] = "admin/about.php"; +$adminmenu[$i]["icon"] = $pathIcon32 . '/about.png'; \ No newline at end of file Added: XoopsModules/mycomments/trunk/mycomments/docs/changelog.txt =================================================================== --- XoopsModules/mycomments/trunk/mycomments/docs/changelog.txt (rev 0) +++ XoopsModules/mycomments/trunk/mycomments/docs/changelog.txt 2012-07-31 12:26:00 UTC (rev 9958) @@ -0,0 +1,11 @@ +--------------------------------------- +1.01 Beta 1 2012-07-23 +--------------------------------------- + +- Converted to XOOPS 2.5.5 Admin GUI (Mamba) + +--------------------------------------- +1.00 Final 2008-05-01 +--------------------------------------- + +- Original release (Trabis) Added: XoopsModules/mycomments/trunk/mycomments/docs/credits.txt =================================================================== --- XoopsModules/mycomments/trunk/mycomments/docs/credits.txt (rev 0) +++ XoopsModules/mycomments/trunk/mycomments/docs/credits.txt 2012-07-31 12:26:00 UTC (rev 9958) @@ -0,0 +1,6 @@ +Credits +=============== + +Originally developed by Trabis (Ricardo Costa) + +Version 1.01 was updated to XOOPS 2.5.0 Standard GUI by Michael Beck (Mamba) \ No newline at end of file Added: XoopsModules/mycomments/trunk/mycomments/docs/index.html =================================================================== --- XoopsModules/mycomments/trunk/mycomments/docs/index.html (rev 0) +++ XoopsModules/mycomments/trunk/mycomments/docs/index.html 2012-07-31 12:26:00 UTC (rev 9958) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/mycomments/trunk/mycomments/docs/install.txt =================================================================== --- XoopsModules/mycomments/trunk/mycomments/docs/install.txt (rev 0) +++ XoopsModules/mycomments/trunk/mycomments/docs/install.txt 2012-07-31 12:26:00 UTC (rev 9958) @@ -0,0 +1,6 @@ +INSTALL/UNISTALL +================= + +No special measures necessary, follow the standard installation process and extract the module folder into the ../modules directory. Install the module through Admin -> System Module -> Modules. + +Detailed instructions on installing modules are available in the XOOPS Operations Manual: http://goo.gl/adT2i \ No newline at end of file Added: XoopsModules/mycomments/trunk/mycomments/docs/lang_diff.txt =================================================================== --- XoopsModules/mycomments/trunk/mycomments/docs/lang_diff.txt (rev 0) +++ XoopsModules/mycomments/trunk/mycomments/docs/lang_diff.txt 2012-07-31 12:26:00 UTC (rev 9958) @@ -0,0 +1,16 @@ +LANGUAGE DIFFERENCES +===================== + +Below are language differences from a version to next version. + +Legend : ++ Added +- Removed +* Modified +x renamed + +--------------------------------------- +1.01 Beta 1 2012-07-30 +--------------------------------------- + +New file to translate : Added: XoopsModules/mycomments/trunk/mycomments/docs/license.txt =================================================================== --- XoopsModules/mycomments/trunk/mycomments/docs/license.txt (rev 0) +++ XoopsModules/mycomments/trunk/mycomments/docs/license.txt 2012-07-31 12:26:00 UTC (rev 9958) @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + 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. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. Added: XoopsModules/mycomments/trunk/mycomments/docs/readme.txt =================================================================== --- XoopsModules/mycomments/trunk/mycomments/docs/readme.txt (rev 0) +++ XoopsModules/mycomments/trunk/mycomments/docs/readme.txt 2012-07-31 12:26:00 UTC (rev 9958) @@ -0,0 +1,43 @@ +What is Mycomments Module ? +====================== + +With this Xoops module, your users can keep a track of they received and sent comments. + +The module can : +. display received comments by user +. display sent comments by user +. display the above per module +. include comments on your site search +. display a block with the last commented items (not last comments) +. etc + + +How to install Mycomments +==================== + +Copy mycomments folder into the /modules directory of your website. Then log in +to your site as administrator, go to System Admin > Modules, look for the Mycomments +icon in the list of uninstalled modules and click in the install icon. Follow +the directions in the screen and you'll be ready to go. + +This module makes use of plugins. Without plugins there will be nothing to see. +Available plugins are located at mycomments/plugins. + + +Developing plugins +==================== + +Plugins are based on the "What's new" module plugins. With little effort you can adpat them to work with my comments. +If you are a module developer you can include your plugins under yourmodule/include/mycomments.plugin.php +The plugin should also work for modules that use XOOPS_TRUST_PATH. + +You can send your plugin to lus...@gm... if you want me to add it to mycomments/plugins folder. + + +Feedback +======== + +Please use www.xoops.org forums. +Later I\xB4ll give support at www.xuups.com (xoops user utilities) + + Modified: XoopsModules/mycomments/trunk/mycomments/images/slogo.png =================================================================== (Binary files differ) Added: XoopsModules/mycomments/trunk/mycomments/language/english/help/help.html =================================================================== --- XoopsModules/mycomments/trunk/mycomments/language/english/help/help.html (rev 0) +++ XoopsModules/mycomments/trunk/mycomments/language/english/help/help.html 2012-07-31 12:26:00 UTC (rev 9958) @@ -0,0 +1,50 @@ +<div id="help-template" class="outer"> + <h1 class="head">Help: + <a class="ui-corner-all tooltip" href="<{$xoops_url}>/modules/mycomments/admin/index.php" + title="Back to the administration of My Comments"> My Comments + <img src="<{xoAdminIcons home.png}>" + alt="Back to the Administration of My Comments"/> + </a></h1> + + <h4 class="odd">Description</h4> + + <p class="even">With this Xoops module, your users can keep a track of they received and sent comments.<br /> <br /> + The module can :<br /> <br /> + . display received comments by user<br /> <br /> + . display sent comments by user<br /> <br /> + . display the above per module<br /> <br /> + . include comments on your site search<br /> <br /> + . display a block with the last commented items (not last comments)<br /> <br /> + . etc + + </p> + + <h4 class="odd">Install/uninstall</h4> + + <p class="even">No special measures necessary, follow the standard installation process – + extract the module folder into the ../modules directory. Install the + module through Admin -> System Module -> Modules.<br /> <br /> + Detailed instructions on installing modules are available in the + <a href="http://goo.gl/adT2i">XOOPS Operations Manual</a> <br /> <br /> + + This module makes use of plugins. Without plugins there will be nothing to see. + Available plugins are located at /mycomments/plugins.<br /> <br /> + </p> + + <h4 class="odd">Developing plugins</h4> + + <p class="even">Plugins are based on the "What's new" module plugins. With little effort you can adpat them to work with my comments. + If you are a module developer you can include your plugins under yourmodule/include/mycomments.plugin.php<br /> <br /> + The plugin should also work for modules that use XOOPS_TRUST_PATH.<br /> <br /> + + You can send your plugin to lus...@gm... if you want me to add it to mycomments/plugins folder.<br /> <br /></p> + + <h4 class="odd">Feedback</h4> + + <p class="even">Please use <a href="http://www.xoops.org/modules/newbb">XOOPS Forums</a></p> + + <h4 class="odd">Tutorial</h4> + + <p class="even">There is no tutorial available at the moment.</p> + +</div> \ No newline at end of file Added: XoopsModules/mycomments/trunk/mycomments/language/english/help/index.html =================================================================== --- XoopsModules/mycomments/trunk/mycomments/language/english/help/index.html (rev 0) +++ XoopsModules/mycomments/trunk/mycomments/language/english/help/index.html 2012-07-31 12:26:00 UTC (rev 9958) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Deleted: XoopsModules/mycomments/trunk/mycomments/readme.txt =================================================================== --- XoopsModules/mycomments/trunk/mycomments/readme.txt 2012-07-31 12:24:26 UTC (rev 9957) +++ XoopsModules/mycomments/trunk/mycomments/readme.txt 2012-07-31 12:26:00 UTC (rev 9958) @@ -1,43 +0,0 @@ -What is Mycomments Module ? -====================== - -With this Xoops module, your users can keep a track of they recieved and sent comments. - -The module can : -. display recieved comments by user -. display sent comments by user -. display the above per module -. include comments on your site search -. display a block with the last commented items (not last comments) -. etc - - -How to install Mycomments -==================== - -Copy mycomments folder into the /modules directory of your website. Then log in -to your site as administrator, go to System Admin > Modules, look for the Mycomments -icon in the list of uninstalled modules and click in the install icon. Follow -the directions in the screen and you'll be ready to go. - -This module makes use of plugins. Without plugins there will be nothing to see. -Available plugins are located at mycomments/plugins. - - -Developing plugins -==================== - -Plugins are based on the "What's new" module plugins. With little effort you can adpat them to work with my comments. -If you are a module developer you can include your plugins under yourmodule/include/mycomments.plugin.php -The plugin should also work for modules that use XOOPS_TRUST_PATH. - -You can send your plugin to lus...@gm... if you want me to add it to mycomments/plugins folder. - - -Feedback -======== - -Please use xoops.org or impresscms.org forums. -Latter I\xB4ll give suport at xuups.com (xoops user utilities) - - Modified: XoopsModules/mycomments/trunk/mycomments/xoops_version.php =================================================================== --- XoopsModules/mycomments/trunk/mycomments/xoops_version.php 2012-07-31 12:24:26 UTC (rev 9957) +++ XoopsModules/mycomments/trunk/mycomments/xoops_version.php 2012-07-31 12:26:00 UTC (rev 9958) @@ -4,22 +4,40 @@ // E-Mail: lus...@gm... $modversion['name'] = _MI_MYCOM_NAME; -$modversion['version'] = "1.00"; +$modversion['version'] = "1.01"; $modversion['description'] = _MI_MYCOM_DSC; $modversion['author'] = "www.xuups.com"; $modversion['credits'] = "Trabis"; -$modversion['help'] = ""; -$modversion['license'] = "GPL see LICENSE"; +$modversion['help'] = 'page=help'; +$modversion['license'] = 'GNU GPL 2.0 or later'; +$modversion['license_url'] = "www.gnu.org/licenses/gpl-2.0.html/"; $modversion['official'] = 0; $modversion['image'] = "images/slogo.png"; $modversion['dirname'] = "mycomments"; +$modversion['dirmoduleadmin'] = '/Frameworks/moduleclasses/moduleadmin'; +$modversion['icons16'] = '../../Frameworks/moduleclasses/icons/16'; +$modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32'; +//about +$modversion['release_date'] = '2012/07/30'; +$modversion["module_website_url"] = "http://www.xoops.org/"; +$modversion["module_website_name"] = "XOOPS"; +$modversion["module_status"] = "Beta 1"; +$modversion['min_php'] = '5.2'; +$modversion['min_xoops'] = "2.5.5"; +$modversion['min_admin'] = '1.1'; +$modversion['min_db'] = array( + 'mysql' => '5.0.7', + 'mysqli' => '5.0.7' +); // Admin things $modversion['hasAdmin'] = 1; -$modversion['adminindex'] = ""; +$modversion['adminindex'] = "admin/index.php"; +$modversion['adminmenu'] = "admin/menu.php"; // Menu $modversion['hasMain'] = 1; +$modversion['system_menu'] = 1; //Search $modversion['hasSearch'] = 1; @@ -93,6 +111,4 @@ $modversion['config'][$i]['formtype'] = 'select'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 10; -$modversion['config'][$i]['options'] = array('5' => 5, '10' => 10, '20' => 20, '50' => 50, '100' => 100); - -?> +$modversion['config'][$i]['options'] = array('5' => 5, '10' => 10, '20' => 20, '50' => 50, '100' => 100); \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2012-07-31 12:24:40
|
Revision: 9957 http://xoops.svn.sourceforge.net/xoops/?rev=9957&view=rev Author: beckmi Date: 2012-07-31 12:24:26 +0000 (Tue, 31 Jul 2012) Log Message: ----------- Adding MyComments (by Trabis) Added Paths: ----------- XoopsModules/mycomments/ XoopsModules/mycomments/branches/ XoopsModules/mycomments/releases/ XoopsModules/mycomments/releases/1.0/ XoopsModules/mycomments/releases/1.0/mycomments/ XoopsModules/mycomments/releases/1.0/mycomments/blocks/ XoopsModules/mycomments/releases/1.0/mycomments/blocks/index.html XoopsModules/mycomments/releases/1.0/mycomments/blocks/mycomments_blocks.php XoopsModules/mycomments/releases/1.0/mycomments/class/ XoopsModules/mycomments/releases/1.0/mycomments/class/comment.php XoopsModules/mycomments/releases/1.0/mycomments/class/commentrenderer.php XoopsModules/mycomments/releases/1.0/mycomments/class/index.html XoopsModules/mycomments/releases/1.0/mycomments/images/ XoopsModules/mycomments/releases/1.0/mycomments/images/img.gif XoopsModules/mycomments/releases/1.0/mycomments/images/slogo.png XoopsModules/mycomments/releases/1.0/mycomments/images/xuupslogo.png XoopsModules/mycomments/releases/1.0/mycomments/include/ XoopsModules/mycomments/releases/1.0/mycomments/include/comment_constants.php XoopsModules/mycomments/releases/1.0/mycomments/include/functions.php XoopsModules/mycomments/releases/1.0/mycomments/include/index.html XoopsModules/mycomments/releases/1.0/mycomments/include/search.inc.php XoopsModules/mycomments/releases/1.0/mycomments/index.php XoopsModules/mycomments/releases/1.0/mycomments/language/ XoopsModules/mycomments/releases/1.0/mycomments/language/english/ XoopsModules/mycomments/releases/1.0/mycomments/language/english/blocks.php XoopsModules/mycomments/releases/1.0/mycomments/language/english/index.html XoopsModules/mycomments/releases/1.0/mycomments/language/english/main.php XoopsModules/mycomments/releases/1.0/mycomments/language/english/modinfo.php XoopsModules/mycomments/releases/1.0/mycomments/language/index.html XoopsModules/mycomments/releases/1.0/mycomments/language/portugues/ XoopsModules/mycomments/releases/1.0/mycomments/language/portugues/blocks.php XoopsModules/mycomments/releases/1.0/mycomments/language/portugues/index.html XoopsModules/mycomments/releases/1.0/mycomments/language/portugues/main.php XoopsModules/mycomments/releases/1.0/mycomments/language/portugues/modinfo.php XoopsModules/mycomments/releases/1.0/mycomments/plugins/ XoopsModules/mycomments/releases/1.0/mycomments/plugins/index.html XoopsModules/mycomments/releases/1.0/mycomments/plugins/mydownloads.php XoopsModules/mycomments/releases/1.0/mycomments/plugins/mylinks.php XoopsModules/mycomments/releases/1.0/mycomments/plugins/news.php XoopsModules/mycomments/releases/1.0/mycomments/plugins/publisher.php XoopsModules/mycomments/releases/1.0/mycomments/plugins/webshow.php XoopsModules/mycomments/releases/1.0/mycomments/plugins/xoopstube.php XoopsModules/mycomments/releases/1.0/mycomments/readme.txt XoopsModules/mycomments/releases/1.0/mycomments/templates/ XoopsModules/mycomments/releases/1.0/mycomments/templates/blocks/ XoopsModules/mycomments/releases/1.0/mycomments/templates/blocks/index.html XoopsModules/mycomments/releases/1.0/mycomments/templates/blocks/mycomments_block_comments.html XoopsModules/mycomments/releases/1.0/mycomments/templates/index.html XoopsModules/mycomments/releases/1.0/mycomments/templates/mycomments_comments.html XoopsModules/mycomments/releases/1.0/mycomments/templates/mycomments_navigation.html XoopsModules/mycomments/releases/1.0/mycomments/xoops_version.php XoopsModules/mycomments/trunk/ XoopsModules/mycomments/trunk/mycomments/ XoopsModules/mycomments/trunk/mycomments/blocks/ XoopsModules/mycomments/trunk/mycomments/blocks/index.html XoopsModules/mycomments/trunk/mycomments/blocks/mycomments_blocks.php XoopsModules/mycomments/trunk/mycomments/class/ XoopsModules/mycomments/trunk/mycomments/class/comment.php XoopsModules/mycomments/trunk/mycomments/class/commentrenderer.php XoopsModules/mycomments/trunk/mycomments/class/index.html XoopsModules/mycomments/trunk/mycomments/images/ XoopsModules/mycomments/trunk/mycomments/images/img.gif XoopsModules/mycomments/trunk/mycomments/images/slogo.png XoopsModules/mycomments/trunk/mycomments/images/xuupslogo.png XoopsModules/mycomments/trunk/mycomments/include/ XoopsModules/mycomments/trunk/mycomments/include/comment_constants.php XoopsModules/mycomments/trunk/mycomments/include/functions.php XoopsModules/mycomments/trunk/mycomments/include/index.html XoopsModules/mycomments/trunk/mycomments/include/search.inc.php XoopsModules/mycomments/trunk/mycomments/index.php XoopsModules/mycomments/trunk/mycomments/language/ XoopsModules/mycomments/trunk/mycomments/language/english/ XoopsModules/mycomments/trunk/mycomments/language/english/blocks.php XoopsModules/mycomments/trunk/mycomments/language/english/index.html XoopsModules/mycomments/trunk/mycomments/language/english/main.php XoopsModules/mycomments/trunk/mycomments/language/english/modinfo.php XoopsModules/mycomments/trunk/mycomments/language/index.html XoopsModules/mycomments/trunk/mycomments/language/portugues/ XoopsModules/mycomments/trunk/mycomments/language/portugues/blocks.php XoopsModules/mycomments/trunk/mycomments/language/portugues/index.html XoopsModules/mycomments/trunk/mycomments/language/portugues/main.php XoopsModules/mycomments/trunk/mycomments/language/portugues/modinfo.php XoopsModules/mycomments/trunk/mycomments/plugins/ XoopsModules/mycomments/trunk/mycomments/plugins/index.html XoopsModules/mycomments/trunk/mycomments/plugins/mydownloads.php XoopsModules/mycomments/trunk/mycomments/plugins/mylinks.php XoopsModules/mycomments/trunk/mycomments/plugins/news.php XoopsModules/mycomments/trunk/mycomments/plugins/publisher.php XoopsModules/mycomments/trunk/mycomments/plugins/webshow.php XoopsModules/mycomments/trunk/mycomments/plugins/xoopstube.php XoopsModules/mycomments/trunk/mycomments/readme.txt XoopsModules/mycomments/trunk/mycomments/templates/ XoopsModules/mycomments/trunk/mycomments/templates/blocks/ XoopsModules/mycomments/trunk/mycomments/templates/blocks/index.html XoopsModules/mycomments/trunk/mycomments/templates/blocks/mycomments_block_comments.html XoopsModules/mycomments/trunk/mycomments/templates/index.html XoopsModules/mycomments/trunk/mycomments/templates/mycomments_comments.html XoopsModules/mycomments/trunk/mycomments/templates/mycomments_navigation.html XoopsModules/mycomments/trunk/mycomments/xoops_version.php Added: XoopsModules/mycomments/releases/1.0/mycomments/blocks/index.html =================================================================== --- XoopsModules/mycomments/releases/1.0/mycomments/blocks/index.html (rev 0) +++ XoopsModules/mycomments/releases/1.0/mycomments/blocks/index.html 2012-07-31 12:24:26 UTC (rev 9957) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/mycomments/releases/1.0/mycomments/blocks/mycomments_blocks.php =================================================================== --- XoopsModules/mycomments/releases/1.0/mycomments/blocks/mycomments_blocks.php (rev 0) +++ XoopsModules/mycomments/releases/1.0/mycomments/blocks/mycomments_blocks.php 2012-07-31 12:24:26 UTC (rev 9957) @@ -0,0 +1,155 @@ +<?php +// Author: Trabis +// URL: http://www.xuups.com +// E-Mail: lus...@gm... + +function b_mycomments_show($options) +{ + $block = array(); + include_once XOOPS_ROOT_PATH.'/modules/mycomments/include/comment_constants.php'; + $comment_handler =& xoops_getmodulehandler('comment','mycomments'); + $criteria = new CriteriaCompo(new Criteria('com_status', MYCOM_ACTIVE)); + $criteria->setLimit(intval($options[0])); + $criteria->setSort('com_created'); + $criteria->setOrder('DESC'); + + // Check modules permissions + global $xoopsUser; + $moduleperm_handler =& xoops_gethandler('groupperm'); + $gperm_groupid = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS); + $criteria1 = new CriteriaCompo(new Criteria('gperm_name','module_read','=')); + $criteria1->add(new Criteria('gperm_groupid', '('.implode(',', $gperm_groupid).')', 'IN')); + $perms = $moduleperm_handler->getObjects($criteria1, true); + $modIds = array(); + foreach($perms as $item) { + $modIds[] = $item->getVar('gperm_itemid'); + } + if(count($modIds) > 0 ) { + $modIds = array_unique($modIds); + $criteria->add(new Criteria('com_modid', '('.implode(',', $modIds).')', 'IN')); + } + // Check modules permissions + + $comments = $comment_handler->getObjects($criteria, true); + $member_handler =& xoops_gethandler('member'); + $module_handler =& xoops_gethandler('module'); + $modules = $module_handler->getObjects(new Criteria('hascomments', 1), true); + $comment_config = array(); + foreach (array_keys($comments) as $i) { + $mid = $comments[$i]->getVar('com_modid'); + $com['module'] = '<a href="'.XOOPS_URL.'/modules/'.$modules[$mid]->getVar('dirname').'/">'.$modules[$mid]->getVar('name').'</a>'; + if (!isset($comment_config[$mid])) { + $comment_config[$mid] = $modules[$mid]->getInfo('comments'); + } + $com['id'] = $i; + $com['title'] = '<a href="'.XOOPS_URL.'/modules/'.$modules[$mid]->getVar('dirname').'/'.$comment_config[$mid]['pageName'].'?'.$comment_config[$mid]['itemName'].'='.$comments[$i]->getVar('com_itemid').'&com_id='.$i.'&com_rootid='.$comments[$i]->getVar('com_rootid').'&'.htmlspecialchars($comments[$i]->getVar('com_exparams')).'#comment'.$i.'">'.$comments[$i]->getVar('com_title').'</a>'; + $com['icon'] = htmlspecialchars( $comments[$i]->getVar('com_icon'), ENT_QUOTES ); + $com['icon'] = ($com['icon'] != '') ? $com['icon'] : 'icon1.gif'; + $com['time'] = formatTimestamp($comments[$i]->getVar('com_created'),'m'); + if ($comments[$i]->getVar('com_uid') > 0) { + $poster =& $member_handler->getUser($comments[$i]->getVar('com_uid')); + if (is_object($poster)) { + $com['poster'] = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$comments[$i]->getVar('com_uid').'">'.$poster->getVar('uname').'</a>'; + } else { + $com['poster'] = $GLOBALS['xoopsConfig']['anonymous']; + } + } else { + $com['poster'] = $GLOBALS['xoopsConfig']['anonymous']; + } + $block['comments'][] =& $com; + unset($com); + } + return $block; +} + + +function b_mycomments_edit($options) +{ + $inputtag = "<input type='text' name='options[]' value='".intval($options[0])."' />"; + $form = sprintf(_MB_MYCOM_DISPLAYC, $inputtag); + return $form; +} + +function b_mycomments2_show($options) +{ + global $xoopsUser; + include_once XOOPS_ROOT_PATH.'/modules/mycomments/include/comment_constants.php'; + $limit = 10; // If you are not getting suficient results, please increase a little more this number + $block = $comment_config = $trackedItems = array(); + + $comment_handler =& xoops_getmodulehandler('comment','mycomments'); + $moduleperm_handler =& xoops_gethandler('groupperm'); + $member_handler =& xoops_gethandler('member'); + $module_handler =& xoops_gethandler('module'); + + $criteria = new CriteriaCompo(new Criteria('com_status', MYCOM_ACTIVE)); + $criteria->setLimit(intval($options[0] * $limit)); + $criteria->setSort('com_created'); + $criteria->setOrder('DESC'); + + $comments = $comment_handler->getObjects($criteria, true); + $modules = $module_handler->getObjects(new Criteria('hascomments', 1), true); + + $count = 0; + foreach (array_keys($comments) as $i) { + if ( $count == $options[0]) continue; + $mid = $comments[$i]->getVar('com_modid'); + + if ($xoopsUser) { + if (!$moduleperm_handler->checkRight('module_read', $mid, $xoopsUser->getGroups())) { + continue; + } + } else { + if (!$moduleperm_handler->checkRight('module_read', $mid, XOOPS_GROUP_ANONYMOUS)) { + continue; + } + } + + $com['module'] = '<a href="'.XOOPS_URL.'/modules/'.$modules[$mid]->getVar('dirname').'/">'.$modules[$mid]->getVar('name').'</a>'; + if (!isset($comment_config[$mid])) { + $comment_config[$mid] = $modules[$mid]->getInfo('comments'); + } + $com['id'] = $i; + $com['title'] = '<a href="'.XOOPS_URL.'/modules/'.$modules[$mid]->getVar('dirname').'/'.$comment_config[$mid]['pageName'].'?'.$comment_config[$mid]['itemName'].'='.$comments[$i]->getVar('com_itemid').'&com_id='.$i.'&com_rootid='.$comments[$i]->getVar('com_rootid').'&'.htmlspecialchars($comments[$i]->getVar('com_exparams')).'#comment'.$i.'">'.$comments[$i]->getVar('com_title').'</a>'; + $com['icon'] = htmlspecialchars( $comments[$i]->getVar('com_icon'), ENT_QUOTES ); + $com['icon'] = ($com['icon'] != '') ? $com['icon'] : 'icon1.gif'; + $com['time'] = formatTimestamp($comments[$i]->getVar('com_created'),'m'); + if ($comments[$i]->getVar('com_uid') > 0) { + $poster =& $member_handler->getUser($comments[$i]->getVar('com_uid')); + if (is_object($poster)) { + $com['poster'] = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$comments[$i]->getVar('com_uid').'">'.$poster->getVar('uname').'</a>'; + } else { + $com['poster'] = $GLOBALS['xoopsConfig']['anonymous']; + } + } else { + $com['poster'] = $GLOBALS['xoopsConfig']['anonymous']; + } + if (count($trackedItems) > 0) { + $itemMatch = false; + foreach (array_keys($trackedItems) as $j) { + if ($comments[$i]->getVar('com_modid') == $trackedItems[$j]['modid'] && $comments[$i]->getVar('com_itemid') == $trackedItems[$j]['itemid']) { + $itemMatch = true; + } + } + if (!$itemMatch) { + $block['comments'][] =& $com; + $trackedItems[] = array('modid' => $comments[$i]->getVar('com_modid'), 'itemid' => $comments[$i]->getVar('com_itemid') ); + $count++; + } + } else { + $block['comments'][] =& $com; + $trackedItems[] = array('modid' => $comments[$i]->getVar('com_modid'), 'itemid' => $comments[$i]->getVar('com_itemid') ); + $count++; + } + unset($com); + } + return $block; +} + +function b_mycomments2_edit($options) +{ + $inputtag = "<input type='text' name='options[]' value='".intval($options[0])."' />"; + $form = sprintf(_MB_MYCOM_DISPLAYC, $inputtag); + return $form; +} +?> Added: XoopsModules/mycomments/releases/1.0/mycomments/class/comment.php =================================================================== --- XoopsModules/mycomments/releases/1.0/mycomments/class/comment.php (rev 0) +++ XoopsModules/mycomments/releases/1.0/mycomments/class/comment.php 2012-07-31 12:24:26 UTC (rev 9957) @@ -0,0 +1,431 @@ +<?php +// Author: Trabis +// URL: http://www.xuups.com +// E-Mail: lus...@gm... + +if (!defined('XOOPS_ROOT_PATH')) { + exit(); +} + +/** + * + * + * @package kernel + * + * @author Kazumi Ono <on...@xo...> + * @copyright copyright (c) 2000-2003 XOOPS.org + */ + +/** + * A Comment + * + * @package kernel + * + * @author Kazumi Ono <on...@xo...> + * @copyright copyright (c) 2000-2003 XOOPS.org + */ +class MycommentsComment extends XoopsObject +{ + + /** + * Constructor + **/ + function MycommentsComment() + { + $this->XoopsObject(); + $this->initVar('com_id', XOBJ_DTYPE_INT, null, false); + $this->initVar('com_pid', XOBJ_DTYPE_INT, 0, false); + $this->initVar('com_modid', XOBJ_DTYPE_INT, null, false); + $this->initVar('com_icon', XOBJ_DTYPE_OTHER, null, false); + $this->initVar('com_title', XOBJ_DTYPE_TXTBOX, null, true, 255, true); + $this->initVar('com_text', XOBJ_DTYPE_TXTAREA, null, true, null, true); + $this->initVar('com_created', XOBJ_DTYPE_INT, 0, false); + $this->initVar('com_modified', XOBJ_DTYPE_INT, 0, false); + $this->initVar('com_uid', XOBJ_DTYPE_INT, 0, true); + $this->initVar('com_ip', XOBJ_DTYPE_OTHER, null, false); + $this->initVar('com_sig', XOBJ_DTYPE_INT, 0, false); + $this->initVar('com_itemid', XOBJ_DTYPE_INT, 0, false); + $this->initVar('com_rootid', XOBJ_DTYPE_INT, 0, false); + $this->initVar('com_status', XOBJ_DTYPE_INT, 0, false); + $this->initVar('com_exparams', XOBJ_DTYPE_OTHER, null, false, 255); + $this->initVar('dohtml', XOBJ_DTYPE_INT, 0, false); + $this->initVar('dosmiley', XOBJ_DTYPE_INT, 0, false); + $this->initVar('doxcode', XOBJ_DTYPE_INT, 0, false); + $this->initVar('doimage', XOBJ_DTYPE_INT, 0, false); + $this->initVar('dobr', XOBJ_DTYPE_INT, 0, false); + //yup, lets handle the module + $this->initVar('mid', XOBJ_DTYPE_INT, null, false); + $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, true, 150); + $this->initVar('version', XOBJ_DTYPE_INT, 100, false); + $this->initVar('last_update', XOBJ_DTYPE_INT, null, false); + $this->initVar('weight', XOBJ_DTYPE_INT, 0, false); + $this->initVar('isactive', XOBJ_DTYPE_INT, 1, false); + $this->initVar('dirname', XOBJ_DTYPE_OTHER, null, true); + $this->initVar('hasmain', XOBJ_DTYPE_INT, 0, false); + $this->initVar('hasadmin', XOBJ_DTYPE_INT, 0, false); + $this->initVar('hassearch', XOBJ_DTYPE_INT, 0, false); + $this->initVar('hasconfig', XOBJ_DTYPE_INT, 0, false); + $this->initVar('hascomments', XOBJ_DTYPE_INT, 0, false); + $this->initVar('hasnotification', XOBJ_DTYPE_INT, 0, false); + } + + /** + * Is this comment on the root level? + * + * @return bool + **/ + function isRoot() + { + return ($this->getVar('com_id') == $this->getVar('com_rootid')); + } +} + +/** + * XOOPS comment handler class. + * + * This class is responsible for providing data access mechanisms to the data source + * of XOOPS comment class objects. + * + * + * @package kernel + * @subpackage comment + * + * @author Kazumi Ono <on...@xo...> + * @copyright copyright (c) 2000-2003 XOOPS.org + */ +class MycommentsCommentHandler extends XoopsObjectHandler +{ + + /** + * Create a {@link XoopsComment} + * + * @param bool $isNew Flag the object as "new"? + * + * @return object + */ + function &create($isNew = true) + { + $comment = new MycommentsComment(); + if ($isNew) { + $comment->setNew(); + } + return $comment; + } + + /** + * Retrieve a {@link XoopsComment} + * + * @param int $id ID + * + * @return object {@link XoopsComment}, FALSE on fail + **/ + function &get($id) + { + $comment = false; + $id = intval($id); + if ($id > 0) { + $sql = 'SELECT * FROM '.$this->db->prefix('xoopscomments').' WHERE com_id='.$id; + if (!$result = $this->db->query($sql)) { + return $comment; + } + $numrows = $this->db->getRowsNum($result); + if ($numrows == 1) { + $comment = new MycommentsComment(); + $comment->assignVars($this->db->fetchArray($result)); + } + } + return $comment; + } + + /** + * Write a comment to database + * + * @param object &$comment + * + * @return bool + **/ + function insert(&$comment) + { + if (strtolower(get_class($comment)) != 'mycommentscomment') { + return false; + } + if (!$comment->isDirty()) { + return true; + } + if (!$comment->cleanVars()) { + return false; + } + foreach ($comment->cleanVars as $k => $v) { + ${$k} = $v; + } + if ($comment->isNew()) { + $com_id = $this->db->genId('xoopscomments_com_id_seq'); + $sql = sprintf("INSERT INTO %s (com_id, com_pid, com_modid, com_icon, com_title, com_text, com_created, com_modified, com_uid, com_ip, com_sig, com_itemid, com_rootid, com_status, com_exparams, dohtml, dosmiley, doxcode, doimage, dobr) VALUES (%u, %u, %u, %s, %s, %s, %u, %u, %u, %s, %u, %u, %u, %u, %s, %u, %u, %u, %u, %u)", $this->db->prefix('xoopscomments'), $com_id, $com_pid, $com_modid, $this->db->quoteString($com_icon), $this->db->quoteString($com_title), $this->db->quoteString($com_text), $com_created, $com_modified, $com_uid, $this->db->quoteString($com_ip), $com_sig, $com_itemid, $com_rootid, $com_status, $this->db->quoteString($com_exparams), $dohtml, $dosmiley, $doxcode, $doimage, $dobr); + } else { + $sql = sprintf("UPDATE %s SET com_pid = %u, com_icon = %s, com_title = %s, com_text = %s, com_created = %u, com_modified = %u, com_uid = %u, com_ip = %s, com_sig = %u, com_itemid = %u, com_rootid = %u, com_status = %u, com_exparams = %s, dohtml = %u, dosmiley = %u, doxcode = %u, doimage = %u, dobr = %u WHERE com_id = %u", $this->db->prefix('xoopscomments'), $com_pid, $this->db->quoteString($com_icon), $this->db->quoteString($com_title), $this->db->quoteString($com_text), $com_created, $com_modified, $com_uid, $this->db->quoteString($com_ip), $com_sig, $com_itemid, $com_rootid, $com_status, $this->db->quoteString($com_exparams), $dohtml, $dosmiley, $doxcode, $doimage, $dobr, $com_id); + } + if (!$result = $this->db->query($sql)) { + return false; + } + if (empty($com_id)) { + $com_id = $this->db->getInsertId(); + } + $comment->assignVar('com_id', $com_id); + return true; + } + + /** + * Delete a {@link XoopsComment} from the database + * + * @param object &$comment + * + * @return bool + **/ + function delete(&$comment) + { + if (strtolower(get_class($comment)) != 'mycommentscomment') { + return false; + } + $sql = sprintf("DELETE FROM %s WHERE com_id = %u", $this->db->prefix('xoopscomments'), $comment->getVar('com_id')); + if (!$result = $this->db->query($sql)) { + return false; + } + return true; + } + + /** + * Get some {@link XoopsComment}s + * + * @param object $criteria + * @param bool $id_as_key Use IDs as keys into the array? + * + * @return array Array of {@link XoopsComment} objects + **/ + function getObjects($criteria = null, $id_as_key = false) + { + $ret = array(); + $limit = $start = 0; + $sql = 'SELECT c.* ,m.* FROM '.$this->db->prefix('xoopscomments').' c, '.$this->db->prefix('modules').' m'; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + $sql .= ' AND c.com_modid = m.mid'; + $sort = ($criteria->getSort() != '') ? $criteria->getSort() : 'com_id'; + $sql .= ' ORDER BY '.$sort.' '.$criteria->getOrder(); + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + while ($myrow = $this->db->fetchArray($result)) { + $comment = new MycommentsComment(); + $comment->assignVars($myrow); + if (!$id_as_key) { + $ret[] =& $comment; + } else { + $ret[$myrow['com_id']] =& $comment; + } + unset($comment); + } + return $ret; + } + + /** + * Count Comments + * + * @param object $criteria {@link CriteriaElement} + * + * @return int Count + **/ + function getCount($criteria = null) + { + $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('xoopscomments'); + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + } + if (!$result =& $this->db->query($sql)) { + return 0; + } + list($count) = $this->db->fetchRow($result); + return $count; + } + + /** + * Delete multiple comments + * + * @param object $criteria {@link CriteriaElement} + * + * @return bool + **/ + function deleteAll($criteria = null) + { + $sql = 'DELETE FROM '.$this->db->prefix('xoopscomments'); + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + } + if (!$result = $this->db->query($sql)) { + return false; + } + return true; + } + + /** + * Get a list of comments + * + * @param object $criteria {@link CriteriaElement} + * + * @return array Array of raw database records + **/ + function getList($criteria = null) + { + $comments = $this->getObjects($criteria, true); + $ret = array(); + foreach (array_keys($comments) as $i) { + $ret[$i] = $comments[$i]->getVar('com_title'); + } + return $ret; + } + + /** + * Retrieves comments for an item + * + * @param int $module_id Module ID + * @param int $item_id Item ID + * @param string $order Sort order + * @param int $status Status of the comment + * @param int $limit Max num of comments to retrieve + * @param int $start Start offset + * + * @return array Array of {@link XoopsComment} objects + **/ + function getByItemId($module_id, $item_id, $order = null, $status = null, $limit = null, $start = 0) + { + $criteria = new CriteriaCompo(new Criteria('com_modid', intval($module_id))); + $criteria->add(new Criteria('com_itemid', intval($item_id))); + if (isset($status)) { + $criteria->add(new Criteria('com_status', intval($status))); + } + if (isset($order)) { + $criteria->setOrder($order); + } + if (isset($limit)) { + $criteria->setLimit($limit); + $criteria->setStart($start); + } + return $this->getObjects($criteria); + } + + /** + * Gets total number of comments for an item + * + * @param int $module_id Module ID + * @param int $item_id Item ID + * @param int $status Status of the comment + * + * @return array Array of {@link XoopsComment} objects + **/ + function getCountByItemId($module_id, $item_id, $status = null) + { + $criteria = new CriteriaCompo(new Criteria('com_modid', intval($module_id))); + $criteria->add(new Criteria('com_itemid', intval($item_id))); + if (isset($status)) { + $criteria->add(new Criteria('com_status', intval($status))); + } + return $this->getCount($criteria); + } + + + /** + * Get the top {@link XoopsComment}s + * + * @param int $module_id + * @param int $item_id + * @param strint $order + * @param int $status + * + * @return array Array of {@link XoopsComment} objects + **/ + function getTopComments($module_id, $item_id, $order, $status = null) + { + $criteria = new CriteriaCompo(new Criteria('com_modid', intval($module_id))); + $criteria->add(new Criteria('com_itemid', intval($item_id))); + $criteria->add(new Criteria('com_pid', 0)); + if (isset($status)) { + $criteria->add(new Criteria('com_status', intval($status))); + } + $criteria->setOrder($order); + return $this->getObjects($criteria); + } + + /** + * Retrieve a whole thread + * + * @param int $comment_rootid + * @param int $comment_id + * @param int $status + * + * @return array Array of {@link XoopsComment} objects + **/ + function getThread($comment_rootid, $comment_id, $status = null) + { + $criteria = new CriteriaCompo(new Criteria('com_rootid', intval($comment_rootid))); + $criteria->add(new Criteria('com_id', intval($comment_id), '>=')); + if (isset($status)) { + $criteria->add(new Criteria('com_status', intval($status))); + } + return $this->getObjects($criteria); + } + + /** + * Update + * + * @param object &$comment {@link XoopsComment} object + * @param string $field_name Name of the field + * @param mixed $field_value Value to write + * + * @return bool + **/ + function updateByField(&$comment, $field_name, $field_value) + { + $comment->unsetNew(); + $comment->setVar($field_name, $field_value); + return $this->insert($comment); + } + + /** + * Delete all comments for one whole module + * + * @param int $module_id ID of the module + * @return bool + **/ + function deleteByModule($module_id) + { + return $this->deleteAll(new Criteria('com_modid', intval($module_id))); + } + + /** + * Change a value in multiple comments + * + * @param string $fieldname Name of the field + * @param string $fieldvalue Value to write + * @param object $criteria {@link CriteriaElement} + * + * @return bool + **/ + /* + function updateAll($fieldname, $fieldvalue, $criteria = null) + { + $set_clause = is_numeric($fieldvalue) ? $filedname.' = '.$fieldvalue : $filedname.' = '.$this->db->quoteString($fieldvalue); + $sql = 'UPDATE '.$this->db->prefix('xoopscomments').' SET '.$set_clause; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + } + if (!$result = $this->db->query($sql)) { + return false; + } + return true; + } + */ +} +?> Added: XoopsModules/mycomments/releases/1.0/mycomments/class/commentrenderer.php =================================================================== --- XoopsModules/mycomments/releases/1.0/mycomments/class/commentrenderer.php (rev 0) +++ XoopsModules/mycomments/releases/1.0/mycomments/class/commentrenderer.php 2012-07-31 12:24:26 UTC (rev 9957) @@ -0,0 +1,224 @@ +<?php +// Author: Trabis +// URL: http://www.xuups.com +// E-Mail: lus...@gm... + +class MycommentsCommentRenderer { + + /**#@+ + * @access private + */ + var $_tpl; + var $_comments = null; + var $_useIcons = true; + var $_doIconCheck = false; + var $_memberHandler; + var $_statusText; + /**#@-*/ + + /** + * Constructor + * + * @param object &$tpl + * @param boolean $use_icons + * @param boolean $do_iconcheck + **/ + function MycommentsCommentRenderer(&$tpl, $use_icons = true, $do_iconcheck = false) + { + $this->_tpl =& $tpl; + $this->_useIcons = $use_icons; + $this->_doIconCheck = $do_iconcheck; + $this->_memberHandler =& xoops_gethandler('member'); + $this->_statusText = array(MYCOM_PENDING => '<span style="text-decoration: none; font-weight: bold; color: #00ff00;">'._MA_MYCOM_PENDING.'</span>', MYCOM_ACTIVE => '<span style="text-decoration: none; font-weight: bold; color: #ff0000;">'._MA_MYCOM_ACTIVE.'</span>', MYCOM_HIDDEN => '<span style="text-decoration: none; font-weight: bold; color: #0000ff;">'._MA_MYCOM_HIDDEN.'</span>'); + } + + /** + * Access the only instance of this class + * + * @param object $tpl reference to a {@link Smarty} object + * @param boolean $use_icons + * @param boolean $do_iconcheck + * @return + **/ + function &instance(&$tpl, $use_icons = true, $do_iconcheck = false) + { + static $instance; + if (!isset($instance)) { + $instance = new MycommentsCommentRenderer($tpl, $use_icons, $do_iconcheck); + } + return $instance; + } + + /** + * Accessor + * + * @param object &$comments_arr array of {@link XoopsComment} objects + **/ + function setComments(&$comments_arr) + { + if (isset($this->_comments)) { + unset($this->_comments); + } + $this->_comments =& $comments_arr; + } + + /** + * Render the comments in flat view + * + * @param boolean $admin_view + **/ + function renderFlatView($admin_view = false, $modlink = '', $itemlink = '') + { + $count = count($this->_comments); + for ($i = 0; $i < $count; $i++) { + if (false != $this->_useIcons) { + $title = $this->_getTitleIcon($this->_comments[$i]->getVar('com_icon')).' '.$this->_comments[$i]->getVar('com_title'); + } else { + $title = $this->_comments[$i]->getVar('com_title'); + } + $poster = $this->_getPosterArray($this->_comments[$i]->getVar('com_uid')); + if (false != $admin_view) { + $text = $this->_getText($this->_comments[$i]->getVar('com_text'),$this->_comments[$i]->getVar('com_pid')).'<div style="text-align:right; margin-top: 2px; margin-bottom: 0px; margin-right: 2px;">'._MA_MYCOM_STATUS.': '.$this->_statusText[$this->_comments[$i]->getVar('com_status')].'<br />IP: <span style="font-weight: bold;">'.$this->_comments[$i]->getVar('com_ip').'</span></div>'; + } else { + // hide comments that are not active + if (MYCOM_ACTIVE != $this->_comments[$i]->getVar('com_status')) { + continue; + } else { + $text = $this->_getText($this->_comments[$i]->getVar('com_text'),$this->_comments[$i]->getVar('com_pid')); + } + } + $array[0] = $this->_comments[$i]->getVar('com_itemid'); + $item = mycomments_plugin_execute( $this->_comments[$i]->getVar('dirname') , $array/*$this->_comments[$i]->getVar('com_itemid')*/, 'iteminfo'); + $this->_tpl->append('comments', array( + 'id' => $this->_comments[$i]->getVar('com_id'), + 'title' => $title, + 'text' => $text, + 'date_posted' => formatTimestamp($this->_comments[$i]->getVar('com_created'), 'm'), + 'date_modified' => formatTimestamp($this->_comments[$i]->getVar('com_modified'), 'm'), + 'item_link' => $item[0]['link'], + 'item_title' => $item[0]['title'], + 'module_link' => XOOPS_URL.'/modules/'.$this->_comments[$i]->getVar('dirname'), + 'module_name' => $this->_comments[$i]->getVar('name'), + 'editcomment_link' => XOOPS_URL.'/modules/'.$this->_comments[$i]->getVar('dirname').'/comment_edit.php?com_itemid='.$this->_comments[$i]->getVar('com_itemid'), + 'deletecomment_link' => XOOPS_URL.'/modules/'.$this->_comments[$i]->getVar('dirname').'/comment_delete.php?com_itemid='.$this->_comments[$i]->getVar('com_itemid'), + 'replycomment_link' => XOOPS_URL.'/modules/'.$this->_comments[$i]->getVar('dirname').'/comment_reply.php?com_itemid='.$this->_comments[$i]->getVar('com_itemid'), + 'poster' => $poster)); + } + } + + /** + * Get the name of the poster + * + * @param int $poster_id + * @return string + * + * @access private + **/ + function _getPosterName($poster_id) + { + $poster['id'] = intval($poster_id); + if ($poster['id'] > 0) { + $com_poster =& $this->_memberHandler->getUser($poster_id); + if (is_object($com_poster)) { + $poster['uname'] = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$poster['id'].'">'.$com_poster->getVar('uname').'</a>'; + return $poster; + } + } + $poster['id'] = 0; // to cope with deleted user accounts + $poster['uname'] = $GLOBALS['xoopsConfig']['anonymous']; + return $poster; + } + + /** + * Get an array with info about the poster + * + * @param int $poster_id + * @return array + * + * @access private + **/ + function _getPosterArray($poster_id) + { + $poster['id'] = intval($poster_id); + if ($poster['id'] > 0) { + $com_poster =& $this->_memberHandler->getUser($poster['id']); + if (is_object($com_poster)) { + $poster['uname'] = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$poster['id'].'">'.$com_poster->getVar('uname').'</a>'; + $poster_rank = $com_poster->rank(); + $poster['rank_image'] = ($poster_rank['image'] != '') ? $poster_rank['image'] : 'blank.gif'; + $poster['rank_title'] = $poster_rank['title']; + $poster['avatar'] = $com_poster->getVar('user_avatar'); + $poster['regdate'] = formatTimestamp($com_poster->getVar('user_regdate'), 's'); + $poster['from'] = $com_poster->getVar('user_from'); + $poster['postnum'] = $com_poster->getVar('posts'); + $poster['status'] = $com_poster->isOnline() ? _MA_MYCOM_ONLINE : ''; + return $poster; + } + } + $poster['id'] = 0; // to cope with deleted user accounts + $poster['uname'] = $GLOBALS['xoopsConfig']['anonymous']; + $poster['rank_title'] = ''; + $poster['avatar'] = 'blank.gif'; + $poster['regdate'] = ''; + $poster['from'] = ''; + $poster['postnum'] = 0; + $poster['status'] = ''; + return $poster; + } + + /** + * Get the IMG tag for the title icon + * + * @param string $icon_image + * @return string HTML IMG tag + * + * @access private + **/ + function _getTitleIcon($icon_image) + { + $icon_image = htmlspecialchars( trim( $icon_image ) ); + if ($icon_image != '') { + if (false != $this->_doIconCheck) { + if (!file_exists(XOOPS_URL.'/images/subject/'.$icon_image)) { + return '<img src="'.XOOPS_URL.'/images/icons/no_posticon.gif" alt="" />'; + } else { + return '<img src="'.XOOPS_URL.'/images/subject/'.$icon_image.'" alt="" />'; + } + } else { + return '<img src="'.XOOPS_URL.'/images/subject/'.$icon_image.'" alt="" />'; + } + } + return '<img src="'.XOOPS_URL.'/images/icons/no_posticon.gif" alt="" />'; + } + + /** + * Get Text with Signature + * + * @param string $text + * @param int $uid + * @return string + * + * @access private + **/ + function _getText($text='', $uid=0) + { + global $xoopsConfig, $xoopsUser; + if ( $uid != 0 ) { + $poster = new XoopsUser($uid); + if ( !$poster->isActive() ) { + $poster = 0; + } + } else { + $poster = 0; + } + + if ( $poster ) { + if ( $poster->getVar("attachsig") ) { + $text .= "<p><br />_________________<br />". $poster->user_sig()."</p>"; + } + } + return $text; + } + +} +?> Added: XoopsModules/mycomments/releases/1.0/mycomments/class/index.html =================================================================== --- XoopsModules/mycomments/releases/1.0/mycomments/class/index.html (rev 0) +++ XoopsModules/mycomments/releases/1.0/mycomments/class/index.html 2012-07-31 12:24:26 UTC (rev 9957) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/mycomments/releases/1.0/mycomments/images/img.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/mycomments/releases/1.0/mycomments/images/img.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/mycomments/releases/1.0/mycomments/images/slogo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/mycomments/releases/1.0/mycomments/images/slogo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/mycomments/releases/1.0/mycomments/images/xuupslogo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/mycomments/releases/1.0/mycomments/images/xuupslogo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/mycomments/releases/1.0/mycomments/include/comment_constants.php =================================================================== --- XoopsModules/mycomments/releases/1.0/mycomments/include/comment_constants.php (rev 0) +++ XoopsModules/mycomments/releases/1.0/mycomments/include/comment_constants.php 2012-07-31 12:24:26 UTC (rev 9957) @@ -0,0 +1,15 @@ +<?php +// Author: Trabis +// URL: http://www.xuups.com +// E-Mail: lus...@gm... + +define('MYCOM_APPROVENONE', 0); +define('MYCOM_APPROVEALL', 1); +define('MYCOM_APPROVEUSER', 2); +define('MYCOM_APPROVEADMIN', 3); +define('MYCOM_PENDING', 1); +define('MYCOM_ACTIVE', 2); +define('MYCOM_HIDDEN', 3); +define('MYCOM_OLD1ST', 0); +define('MYCOM_NEW1ST', 1); +?> Added: XoopsModules/mycomments/releases/1.0/mycomments/include/functions.php =================================================================== --- XoopsModules/mycomments/releases/1.0/mycomments/include/functions.php (rev 0) +++ XoopsModules/mycomments/releases/1.0/mycomments/include/functions.php 2012-07-31 12:24:26 UTC (rev 9957) @@ -0,0 +1,118 @@ +<?php +// Author: Trabis +// URL: http://www.xuups.com +// E-Mail: lus...@gm... + +function mycomments_plugin_execute($dirname, $items, $func = 'useritems') +{ + global $xoopsUser, $xoopsConfig, $xoopsDB; + + $ret = array(); + $plugins_path = XOOPS_ROOT_PATH . "/modules/mycomments/plugins"; + + $plugin_info = mycomments_get_plugin_info( $dirname , $func ) ; + + if( empty( $plugin_info ) || empty( $plugin_info['plugin_path'] ) ) return false ; + include_once $plugin_info['plugin_path'] ; + + // call the plugin + if( function_exists( @$plugin_info['func'] ) ) { + // get the list of items + $ret = $plugin_info['func']($items, $limit=0, $offset=0); + } + + return $ret ; +} + +function mycomments_get_plugin_info( $dirname , $func = 'useritems' ) +{ + global $xoopsConfig; + $language = $xoopsConfig['language']; + // get $mytrustdirname for D3 modules + $mytrustdirname = '' ; + if( defined( 'XOOPS_TRUST_PATH' ) && file_exists( XOOPS_ROOT_PATH."/modules/".$dirname."/mytrustdirname.php" ) ) { + @include XOOPS_ROOT_PATH."/modules/".$dirname."/mytrustdirname.php" ; + $d3module_plugin_file = XOOPS_TRUST_PATH."/modules/".$mytrustdirname."/include/mycomments.plugin.php" ; + } + + $module_plugin_file = XOOPS_ROOT_PATH."/modules/".$dirname."/include/mycomments.plugin.php" ; + $builtin_plugin_file = XOOPS_ROOT_PATH."/modules/mycomments/plugins/".$dirname.".php" ; + + if( file_exists( $module_plugin_file ) ) { + // module side (1st priority) + $ret = array( + 'plugin_path' => $module_plugin_file , + 'func' => $dirname.'_'.$func , + 'type' => 'module' , + ) ; + } else if( ! empty( $mytrustdirname ) && file_exists( $d3module_plugin_file ) ) { + // D3 module's plugin under xoops_trust_path (2nd priority) + $ret = array( + 'plugin_path' => $d3module_plugin_file , + 'func' => $mytrustdirname.'_'.$func , + 'type' => 'module (D3)' , + ) ; + } else if( file_exists( $builtin_plugin_file ) ) { + // built-in plugin under modules/mycomments (3rd priority) + $ret = array( + 'plugin_path' => $builtin_plugin_file , + 'func' => $dirname.'_'.$func , + 'type' => 'built-in' , + ) ; + } else { + $ret = array() ; + } + + return $ret ; +} + +function mycomments_advanced_search($queryarray, $andor, $limit, $offset, $userid, $moduleid, $items){ + global $xoopsDB; + include_once( XOOPS_ROOT_PATH . "/modules/mycomments/class/comment.php" ) ; + $sql = "SELECT * FROM ".$xoopsDB->prefix("xoopscomments")." WHERE com_id>0 "; + if ( $moduleid != 0 ) { + $sql .= " AND com_modid=".$moduleid." "; + } + if ( $userid != 0 ) { + $sql .= " AND com_uid=".$userid." "; + } + // because count() returns 1 even if a supplied variable + // is not an array, we must check if $querryarray is really an array + if ( is_array($queryarray) && $count = count($queryarray) ) { + $sql .= " AND ((com_title LIKE '%$queryarray[0]%' OR com_text LIKE '%$queryarray[0]%')"; + for($i=1;$i<$count;$i++){ + $sql .= " $andor "; + $sql .= "(com_title LIKE '%$queryarray[$i]%' OR com_text LIKE '%$queryarray[$i]%')"; + } + $sql .= ") "; + } + + if(is_array($items) && count($items)>0) { + $sql .= ' AND com_itemid IN ('.implode(',', $items).')'; + } + + $sql .= "ORDER BY com_created DESC"; + $result = $xoopsDB->query($sql,$limit,$offset); + + $module_handler =& xoops_gethandler('module'); + $modules =& $module_handler->getObjects(new Criteria('hascomments', 1), true); + + + $ret = array(); + $i = 0; + while($myrow = $xoopsDB->fetchArray($result)){ + $id_as_key = false; + $comment = new MycommentsComment(); + $comment->assignVars($myrow); + if (!$id_as_key) { + $ret[] =& $comment; + } else { + $ret[$myrow['com_id']] =& $comment; + } + unset($comment); + } + return $ret; +} + +?> + Added: XoopsModules/mycomments/releases/1.0/mycomments/include/index.html =================================================================== --- XoopsModules/mycomments/releases/1.0/mycomments/include/index.html (rev 0) +++ XoopsModules/mycomments/releases/1.0/mycomments/include/index.html 2012-07-31 12:24:26 UTC (rev 9957) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/mycomments/releases/1.0/mycomments/include/search.inc.php =================================================================== --- XoopsModules/mycomments/releases/1.0/mycomments/include/search.inc.php (rev 0) +++ XoopsModules/mycomments/releases/1.0/mycomments/include/search.inc.php 2012-07-31 12:24:26 UTC (rev 9957) @@ -0,0 +1,57 @@ +<?php +// Author: Trabis, Kaper +// URL: http://www.xuups.com, http://kaper.zk-p.pl +// E-Mail: lus...@gm... , ka...@zk... + +function mycomments_search($queryarray, $andor, $limit, $offset, $userid){ + global $xoopsDB; + $sql = "SELECT com_id, com_pid, com_rootid, com_modid, com_itemid, com_created, com_uid, com_title, com_text, com_status FROM ".$xoopsDB->prefix("xoopscomments")." WHERE com_id>0 "; + if ( $userid != 0 ) { + $sql .= " AND com_uid=".$userid." "; + } + // because count() returns 1 even if a supplied variable + // is not an array, we must check if $querryarray is really an array + if ( is_array($queryarray) && $count = count($queryarray) ) { + $sql .= " AND ((com_title LIKE '%$queryarray[0]%' OR com_text LIKE '%$queryarray[0]%')"; + for($i=1;$i<$count;$i++){ + $sql .= " $andor "; + $sql .= "(com_title LIKE '%$queryarray[$i]%' OR com_text LIKE '%$queryarray[$i]%')"; + } + $sql .= ") "; + } + $sql .= "ORDER BY com_created DESC"; + $result = $xoopsDB->query($sql,$limit,$offset); + + $module_handler =& xoops_gethandler('module'); + $modules =& $module_handler->getObjects(new Criteria('hascomments', 1), true); + + $ret = array(); + $i = 0; + while($myrow = $xoopsDB->fetchArray($result)){ + + $com_id = $myrow['com_id']; + $com_modid=$myrow['com_modid']; + $com_pid=$myrow['com_pid']; + $com_rootid=$myrow['com_rootid']; + $com_itemid=$myrow['com_itemid']; + + $comment_config = array(); + $comment_config = $modules[$com_modid]->getInfo('comments'); + + $link = "../".$modules[$com_modid]->getVar('dirname').'/'; + $link .= $comment_config['pageName'].'?'; + $link .= $comment_config['itemName'].'='; + $link .= $com_itemid.'&com_id='.$com_id.'&com_rootid='.$com_rootid; + $link .= '&com_mode=thread&#comment'.$com_id; + + $ret[$i]['image'] = "images/img.gif"; + $ret[$i]['link'] = $link; + $ret[$i]['title'] = $myrow['com_title']; + $ret[$i]['time'] = $myrow['com_created']; + $ret[$i]['uid'] = $myrow['com_uid']; + $i++; + } + return $ret; +} + +?> Added: XoopsModules/mycomments/releases/1.0/mycomments/index.php =================================================================== --- XoopsModules/mycomments/releases/1.0/mycomments/index.php (rev 0) +++ XoopsModules/mycomments/releases/1.0/mycomments/index.php 2012-07-31 12:24:26 UTC (rev 9957) @@ -0,0 +1,216 @@ +<?php +// Author: Trabis +// URL: http://www.xuups.com +// E-Mail: lus...@gm... + +include_once "../../mainfile.php"; +include_once XOOPS_ROOT_PATH.'/modules/mycomments/include/functions.php'; +include_once XOOPS_ROOT_PATH.'/modules/mycomments/class/commentrenderer.php'; +include_once XOOPS_ROOT_PATH.'/modules/mycomments/include/comment_constants.php'; + +$uid = is_object($xoopsUser)? $xoopsUser->getVar('uid') : 0; +if ($uid == 0) { + redirect_header(XOOPS_URL,2,_NOPERM); + exit(); +} +$uid = isset($_GET['uid']) ? intval($_GET['uid']) : $uid; + +$start = (isset($_GET['start'])) ? intval($_GET['start']) : 0; +$mid = (isset($_GET['mid'])) ? intval($_GET['mid']) : 0; + +$d_view = 0; //set 0 for default comments recieved or 1 for default comments sent +$view_array = array('0' => _MA_MYCOM_COM_RECIEVED, '1' => _MA_MYCOM_COM_SENT); +$view = (isset($_GET['view']) && array_key_exists(intval($_GET['view']), $view_array)) ? intval($_GET['view']) : $d_view; + +$d_limit = $xoopsModuleConfig['comnum']; +$limit_array = array('5' => 5, '10' => 10, '20' => 20, '50' => 50, '100' => 100); +$limit = (isset($_GET['limit']) && array_key_exists(intval($_GET['limit']), $limit_array)) ? intval($_GET['limit']) : $d_limit; + +if ($uid == 0) { + redirect_header(XOOPS_URL,2,_NOPERM); + exit(); +} + +$myts =& MyTextSanitizer::getInstance(); +$xoopsOption['template_main'] = 'mycomments_comments.html'; +include_once XOOPS_ROOT_PATH.'/header.php'; + +$thisuser = new XoopsUser($uid); + +switch($xoopsModuleConfig['displayname']) { + case 1: // Username + $username = $thisuser->getVar('uname'); + break; + + case 2: // Display full name (if it is not empty) + if(xoops_trim($thisuser->getVar('name')) == '') { + $username = $thisuser->getVar('uname'); + } else { + $username = $thisuser->getVar('name'); + } + break; +} + +// admins can view all comments and IPs, others can only view approved(active) comments +if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) { + $admin_view = true; +} else { + $admin_view = false; +} + + +$module_handler =& xoops_gethandler('module'); +$comments_handler =& xoops_getmodulehandler('comment'); + +$criteria = new CriteriaCompo(new Criteria('hascomments', 1)); +if ($mid > 0) $criteria->add(new Criteria('mid', $mid), 'AND'); +$modules =& $module_handler->getObjects($criteria, true); +unset($criteria); + +$criteria = new CriteriaCompo(); +$criteria2 = new CriteriaCompo(); +foreach( $modules as $moduleid => $module ) { + //for comments recieved + if ($view == 0){ + $items = array(); + $items = mycomments_plugin_execute( $module->getVar('dirname') , $uid, 'useritems'); + if (is_array($items) && count($items)>0){ + $items = '('.implode(',',$items).')'; + $dirname = $module->getVar('dirname'); + $$dirname = new CriteriaCompo(new Criteria('com_modid', $moduleid)); + $$dirname->add(new Criteria('com_itemid', $items, 'IN'), 'AND'); + $criteria->add($$dirname,'OR'); + } else { + //ugly fix, sorry + $criteria->add(new CriteriaCompo(new Criteria('1', 2)),'OR'); + } + unset($items); + //for comments sent + } else { + $items = array(); + $items = mycomments_get_plugin_info( $module->getVar('dirname') , 'useritems'); + if (is_array($items) && count($items)>0){ + $dirname = $module->getVar('dirname'); + $$dirname = new Criteria('com_modid', $moduleid); + $criteria2->add($$dirname,'OR'); + } else { + //ugly fix, sorry + $criteria2->add(new CriteriaCompo(new Criteria('1', 2)),'OR'); + } + unset($items); + } +} +if ($view ==1 ) { + $criteria->add($criteria2); + $criteria->add(new Criteria('com_uid', $uid)); +} +$criteria->setSort('com_id'); +$criteria->setOrder('DESC'); +$criteria->setLimit($limit); +$criteria->setStart($start); + +$comments =& $comments_handler->getObjects($criteria); +$com_count =& $comments_handler->getCount($criteria); +$renderer =& MycommentsCommentRenderer::instance($xoopsTpl); +$renderer->setComments($comments); +$renderer->renderFlatView($admin_view); +unset($criteria); + +$gperm_handler = & xoops_gethandler( 'groupperm' ); +$groups = ( $xoopsUser ) ? $xoopsUser -> getGroups() : XOOPS_GROUP_ANONYMOUS; +$xoopsTpl->assign( 'xoops_iscommentadmin', $gperm_handler->checkRight( 'system_admin', 14, $groups) ); + +$count_string = ($com_count != 1 )?_MA_MYCOM_NCOMMENTS:_MA_MYCOM_NCOMMENT; +$xoopsTpl->assign( 'com_count', sprintf($count_string, $com_count)); + +$com_order=$com_mode=$link_extra=''; + +// assign some lang variables +$xoopsTpl->assign(array( + 'lang_from' => _MA_MYCOM_FROM, + 'lang_joined' => _MA_MYCOM_JOINED, + 'lang_posts' => _MA_MYCOM_POSTS, + 'lang_poster' => _MA_MYCOM_POSTER, + 'lang_thread' => _MA_MYCOM_THREAD, + 'lang_edit' => _EDIT, + 'lang_delete' => _DELETE, + 'lang_reply' => _REPLY, + 'lang_subject' => _MA_MYCOM_REPLIES, + 'lang_posted' => _MA_MYCOM_POSTED, + 'lang_updated' => _MA_MYCOM_UPDATED, + 'lang_notice' => _MA_MYCOM_NOTICE) +); + + +//For the navbar, get all modules that have plugins + +$mod_array = array(); +//Lets save a query, if no $mid is set then we already have $modules correctly populated +if ($mid > 0){ + $modules =& $module_handler->getObjects(new Criteria('hascomments', 1), true); +} + +foreach( $modules as $moduleid => $module ) { + $items = array(); + $items = mycomments_get_plugin_info( $module->getVar('dirname'), 'useritems'); + if (is_array($items) && count($items)>0){ + $mod_array[$module->getVar('mid')] = $module->getVar('name'); + } + unset($items); +} +//Now lets create the form fields +$sel = ''; +if ("0" == $mid) { + $sel = ' selected="selected"'; +} +$mod_options = '<option value="0"'.$sel.'>'._MA_MYCOM_ALL.'</option>'; +foreach($mod_array as $key=>$value) { + $sel = ''; + if ($key == $mid) { + $sel = ' selected="selected"'; + } + $mod_options .= '<option value="'.$key.'"'.$sel.'>'.$value.'</option>'; +} +$xoopsTpl->assign('mod_options', $mod_options); + + +$view_options = ''; +foreach($view_array as $key=>$value) { + $sel = ''; + if ($key == $view) { + $sel = ' selected="selected"'; + } + $view_options .= '<option value="'.$key.'"'.$sel.'>'.$value.'</option>'; +} +$xoopsTpl->assign('view_options', $view_options); + +$limit_options = ''; +foreach($limit_array as $key=>$value) { + $sel = ''; + if ($key == $limit) { + $sel = ' selected="selected"'; + } + $limit_options .= '<option value="'.$key.'"'.$sel.'>'.$value.'</option>'; +} +$xoopsTpl->assign('limit_options', $limit_options); + +if ( $com_count > $limit ) { + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; + $pagenav_args = 'mid='.$mid; + if ($d_view != $view) $pagenav_args .='&view='.$view; + if ($d_limit != $limit) $pagenav_args .='&limit='.$limit; + $pagenav = new XoopsPageNav($com_count, $limit, $start, 'start',$pagenav_args); + $xoopsTpl->assign('pagenav', $pagenav->renderNav()); +} else { + $xoopsTpl->assign('pagenav', ''); +} +$xoopsTpl->assign('lang_go', _GO); + +//navbar +$xoopsTpl->assign('module_name',$xoopsModule->getVar('name')); +$xoopsTpl->assign('module_dirname',$xoopsModule->getVar('dirname')); +$xoopsTpl->assign('user_name','<a href="'.XOOPS_URL.'/userinfo.php?uid='.$uid.'">'.$username.'</a>'); +$xoopsTpl->assign('lang_home',_MA_MYCOM_HOME); + +include_once XOOPS_ROOT_PATH.'/footer.php'; +?> Added: XoopsModules/mycomments/releases/1.0/mycomments/language/english/blocks.php =================================================================== --- XoopsModules/mycomments/releases/1.0/mycomments/language/english/blocks.php (rev 0) +++ XoopsModules/mycomments/releases/1.0/mycomments/language/english/blocks.php 2012-07-31 12:24:26 UTC (rev 9957) @@ -0,0 +1,6 @@ +<?php +// Author: Trabis +// URL: http://www.xuups.com +// E-Mail: lus...@gm... +define("_MB_MYCOM_DISPLAYC","Display %s comments"); +?> Added: XoopsModules/mycomments/releases/1.0/mycomments/language/english/index.html =================================================================== --- XoopsModules/mycomments/releases/1.0/mycomments/language/english/index.html (rev 0) +++ XoopsModules/mycomments/releases/1.0/mycomments/language/english/index.html 2012-07-31 12:24:26 UTC (rev 9957) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/mycomments/releases/1.0/mycomments/language/english/main.php =================================================================== --- XoopsModules/mycomments/releases/1.0/mycomments/language/english/main.php (rev 0) +++ XoopsModules/mycomments/releases/1.0/mycomments/language/english/main.php 2012-07-31 12:24:26 UTC (rev 9957) @@ -0,0 +1,51 @@ +<?php +// Author: Trabis +// URL: http://www.xuups.com +// E-Mail: lus...@gm... +define('_MA_MYCOM_TITLE','Title'); +define('_MA_MYCOM_MESSAGE','Message'); +define('_MA_MYCOM_DOSMILEY','Enable Smiley Icons'); +define('_MA_MYCOM_DOHTML','Enable HTML Tags'); +define('_MA_MYCOM_DOAUTOWRAP','Auto wrap lines'); +define('_MA_MYCOM_DOXCODE','Enable XOOPS Codes'); +define('_MA_MYCOM_REFRESH','Refresh'); +define('_MA_MYCOM_PENDING','Pending'); +define('_MA_MYCOM_HIDDEN','Hidden'); +define('_MA_MYCOM_ACTIVE','Active'); +define('_MA_MYCOM_STATUS','Status'); +define('_MA_MYCOM_POSTCOMMENT','Post Comment'); +define('_MA_MYCOM_REPLIES','Replies'); +define('_MA_MYCOM_PARENT','Parent'); +define('_MA_MYCOM_TOP','Top'); +define('_MA_MYCOM_BOTTOM','Bottom'); +define('_MA_MYCOM_ONLINE','Online!'); +define('_MA_MYCOM_POSTED','Posted'); // Posted date +define('_MA_MYCOM_UPDATED', 'Updated'); +define('_MA_MYCOM_THREAD','Thread'); +define('_MA_MYCOM_POSTER','Poster'); +define('_MA_MYCOM_JOINED','Joined'); +define('_MA_MYCOM_POSTS','Posts'); +define('_MA_MYCOM_FROM','From'); +define('_MA_MYCOM_COMDELETED', 'Comment(s) deleted.'); +define('_MA_MYCOM_COMDELETENG', 'Could not delete comment.'); +define('_MA_MYCOM_DELETESELECT' , 'Delete all its child comments?'); +define('_MA_MYCOM_DELETEONE' , 'No, delete only this comment'); +define('_MA_MYCOM_DELETEALL', 'Yes, delete all'); +define('_MA_MYCOM_THANKSPOST', 'Thanks for posting!'); +define(... [truncated message content] |
From: <be...@us...> - 2012-07-31 11:57:40
|
Revision: 9956 http://xoops.svn.sourceforge.net/xoops/?rev=9956&view=rev Author: beckmi Date: 2012-07-31 11:57:28 +0000 (Tue, 31 Jul 2012) Log Message: ----------- Release 1.10 Beta 1 (conversion to XOOPS 2.5.5 GUI) Modified Paths: -------------- XoopsModules/smartfaq/trunk/smartfaq/admin/about.php XoopsModules/smartfaq/trunk/smartfaq/admin/admin.php XoopsModules/smartfaq/trunk/smartfaq/admin/admin_header.php XoopsModules/smartfaq/trunk/smartfaq/admin/answer.php XoopsModules/smartfaq/trunk/smartfaq/admin/category.php XoopsModules/smartfaq/trunk/smartfaq/admin/faq.php XoopsModules/smartfaq/trunk/smartfaq/admin/import.php XoopsModules/smartfaq/trunk/smartfaq/admin/index.php XoopsModules/smartfaq/trunk/smartfaq/admin/menu.php XoopsModules/smartfaq/trunk/smartfaq/admin/myblocksadmin.php XoopsModules/smartfaq/trunk/smartfaq/admin/permissions.php XoopsModules/smartfaq/trunk/smartfaq/admin/question.php XoopsModules/smartfaq/trunk/smartfaq/admin/wffaq.php XoopsModules/smartfaq/trunk/smartfaq/admin/xoopsfaq.php XoopsModules/smartfaq/trunk/smartfaq/class/answer.php XoopsModules/smartfaq/trunk/smartfaq/class/category.php XoopsModules/smartfaq/trunk/smartfaq/class/faq.php XoopsModules/smartfaq/trunk/smartfaq/class/smartdbupdater.php XoopsModules/smartfaq/trunk/smartfaq/include/blocksadmin.inc.php XoopsModules/smartfaq/trunk/smartfaq/include/comment_functions.php XoopsModules/smartfaq/trunk/smartfaq/include/displayfaqs.php XoopsModules/smartfaq/trunk/smartfaq/language/english/admin.php XoopsModules/smartfaq/trunk/smartfaq/language/english/modinfo.php XoopsModules/smartfaq/trunk/smartfaq/request.php XoopsModules/smartfaq/trunk/smartfaq/xoops_version.php Added Paths: ----------- XoopsModules/smartfaq/trunk/smartfaq/admin/about2.php XoopsModules/smartfaq/trunk/smartfaq/admin/admin_footer.php XoopsModules/smartfaq/trunk/smartfaq/admin/admin_header2.php XoopsModules/smartfaq/trunk/smartfaq/admin/main.php XoopsModules/smartfaq/trunk/smartfaq/docs/ XoopsModules/smartfaq/trunk/smartfaq/docs/changelog.txt XoopsModules/smartfaq/trunk/smartfaq/docs/credits.txt XoopsModules/smartfaq/trunk/smartfaq/docs/index.html XoopsModules/smartfaq/trunk/smartfaq/docs/install.txt XoopsModules/smartfaq/trunk/smartfaq/docs/lang_diff.txt XoopsModules/smartfaq/trunk/smartfaq/docs/license.txt XoopsModules/smartfaq/trunk/smartfaq/docs/readme.txt XoopsModules/smartfaq/trunk/smartfaq/docs/upgrade.txt XoopsModules/smartfaq/trunk/smartfaq/language/english/help/ XoopsModules/smartfaq/trunk/smartfaq/language/english/help/help.html XoopsModules/smartfaq/trunk/smartfaq/language/english/help/index.html Removed Paths: ------------- XoopsModules/smartfaq/trunk/smartfaq/changelog.txt XoopsModules/smartfaq/trunk/smartfaq/install.txt XoopsModules/smartfaq/trunk/smartfaq/license.txt XoopsModules/smartfaq/trunk/smartfaq/readme.txt XoopsModules/smartfaq/trunk/smartfaq/upgrade.txt Modified: XoopsModules/smartfaq/trunk/smartfaq/admin/about.php =================================================================== --- XoopsModules/smartfaq/trunk/smartfaq/admin/about.php 2012-07-31 11:52:17 UTC (rev 9955) +++ XoopsModules/smartfaq/trunk/smartfaq/admin/about.php 2012-07-31 11:57:28 UTC (rev 9956) @@ -1,190 +1,30 @@ -<?php - -/** -* $Id: about.php,v 1.12 2004/12/14 01:59:42 malanciault Exp $ -* Module: SmartFAQ -* Author: The SmartFactory <www.smartfactory.ca> -* Licence: GNU -*/ - -include_once("admin_header.php"); -$myts = &MyTextSanitizer::getInstance(); - -Global $xoopsModule; - -xoops_cp_header(); - -$module_handler = &xoops_gethandler('module'); -$versioninfo = &$module_handler->get($xoopsModule->getVar('mid')); - -sf_adminMenu(-1, _AM_SF_ABOUT . " " . $versioninfo->getInfo('name')); - -/* Centered heading -echo "<br />"; -echo "<table width='100%'>"; -echo "<tr>"; -echo "<td align = 'center'>"; -echo "<img src='".XOOPS_URL."/modules/smartfaq/".$versioninfo->getInfo('image')."' alt='' align='center'/></a>"; -echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $versioninfo->getInfo('name') . " version " . $versioninfo->getInfo('version') . "</div>"; -if ( $versioninfo->getInfo('author_realname') != '') -{ -$author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")"; -} else -{ -$author_name = $versioninfo->getInfo('author'); -} - -echo "<div style = 'line-height: 16px; font-weight: bold; display: block;'>" . _AM_SF_BY . " " .$author_name; -echo "</div>"; -echo "<div style = 'line-height: 16px; display: block;'>" . $versioninfo->getInfo('license') . "</div><br></>\n"; - -echo "</td>"; -echo "</tr>"; -echo "</table>"; -*/ -// Left headings... -echo "<img src='" . XOOPS_URL . "/modules/" . $xoopsModule->getVar('dirname') . "/" . $versioninfo->getInfo('image') . "' alt='' hspace='0' vspace='0' align='left' style='margin-right: 10px;'/></a>"; -echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $versioninfo->getInfo('name') . " version " . $versioninfo->getInfo('version') . " (" . $versioninfo->getInfo('status_version') . ")</div>"; -if ($versioninfo->getInfo('author_realname') != '') { - $author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")"; -} else { - $author_name = $versioninfo->getInfo('author'); -} - -echo "<div style = 'line-height: 16px; font-weight: bold; display: block;'>" . _AM_SF_BY . " " . $author_name; -echo "</div>"; -echo "<div style = 'line-height: 16px; display: block;'>" . $versioninfo->getInfo('license') . "</div>\n"; - -// Developers Information -echo "<br /><table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; -echo "<tr>"; -echo "<td colspan='2' class='bg3' align='left'><b>" . _MI_SF_AUTHOR_INFO . "</b></td>"; -echo "</tr>"; - -if ($versioninfo->getInfo('developer_lead') != '') { - echo "<tr>"; - echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_LEAD . "</td>"; - echo "<td class='even' align='left'>" . $versioninfo->getInfo('developer_lead') . "</td>"; - echo "</tr>"; -} -if ($versioninfo->getInfo('developer_contributor') != '') { - echo "<tr>"; - echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_CONTRIBUTOR . "</td>"; - echo "<td class='even' align='left'>" . $versioninfo->getInfo('developer_contributor') . "</td>"; - echo "</tr>"; -} -if ($versioninfo->getInfo('developer_website_url') != '') { - echo "<tr>"; - echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_WEBSITE . "</td>"; - echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('developer_website_url') . "' target='blank'>" . $versioninfo->getInfo('developer_website_name') . "</a></td>"; - echo "</tr>"; -} -if ($versioninfo->getInfo('developer_email') != '') { - echo "<tr>"; - echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_EMAIL . "</td>"; - echo "<td class='even' align='left'><a href='mailto:" . $versioninfo->getInfo('developer_email') . "'>" . $versioninfo->getInfo('developer_email') . "</a></td>"; - echo "</tr>"; -} - - -echo "</table>"; -echo "<br />\n"; -// Module Developpment information -echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; -echo "<tr>"; -echo "<td colspan='2' class='bg3' align='left'><b>" . _MI_SF_MODULE_INFO . "</b></td>"; -echo "</tr>"; - -if ($versioninfo->getInfo('date') != '') { - echo "<tr>"; - echo "<td class='head' width = '200' align='left'>" . _MI_SF_MODULE_RELEASE_DATE . "</td>"; - echo "<td class='even' align='left'>" . $versioninfo->getInfo('date') . "</td>"; - echo "</tr>"; -} - -if ($versioninfo->getInfo('status') != '') { - echo "<tr>"; - echo "<td class='head' width = '200' align='left'>" . _MI_SF_MODULE_STATUS . "</td>"; - echo "<td class='even' align='left'>" . $versioninfo->getInfo('status') . "</td>"; - echo "</tr>"; -} - -if ($versioninfo->getInfo('demo_site_url') != '') { - echo "<tr>"; - echo "<td class='head' align='left'>" . _MI_SF_MODULE_DEMO . "</td>"; - echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('demo_site_url') . "' target='blank'>" . $versioninfo->getInfo('demo_site_name') . "</a></td>"; - echo "</tr>"; -} - -if ($versioninfo->getInfo('support_site_url') != '') { - echo "<tr>"; - echo "<td class='head' align='left'>" . _MI_SF_MODULE_SUPPORT . "</td>"; - echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('support_site_url') . "' target='blank'>" . $versioninfo->getInfo('support_site_name') . "</a></td>"; - echo "</tr>"; -} - -if ($versioninfo->getInfo('submit_bug') != '') { - echo "<tr>"; - echo "<td class='head' align='left'>" . _MI_SF_MODULE_BUG . "</td>"; - echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('submit_bug') . "' target='blank'>" . "Submit a Bug in SmartFAQ Bug Tracker" . "</a></td>"; - echo "</tr>"; -} -if ($versioninfo->getInfo('submit_feature') != '') { - echo "<tr>"; - echo "<td class='head' align='left'>" . _MI_SF_MODULE_FEATURE . "</td>"; - echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('submit_feature') . "' target='blank'>" . "Request a feature in the SmartFAQ Feature Tracker" . "</a></td>"; - echo "</tr>"; -} - -echo "</table>"; -// Warning -if ($versioninfo->getInfo('warning') != '') { - echo "<br />\n"; - echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; - echo "<tr>"; - echo "<td class='bg3' align='left'><b>" . _MI_SF_MODULE_DISCLAIMER . "</b></td>"; - echo "</tr>"; - - echo "<tr>"; - echo "<td class='even' align='left'>" . $versioninfo->getInfo('warning') . "</td>"; - echo "</tr>"; - - echo "</table>"; -} -// Author's note -if ($versioninfo->getInfo('author_word') != '') { - echo "<br />\n"; - echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; - echo "<tr>"; - echo "<td class='bg3' align='left'><b>" . _MI_SF_AUTHOR_WORD . "</b></td>"; - echo "</tr>"; - - echo "<tr>"; - echo "<td class='even' align='left'>" . $versioninfo->getInfo('author_word') . "</td>"; - echo "</tr>"; - - echo "</table>"; -} - -// Version History -if ($versioninfo->getInfo('version_history') != '') { - echo "<br />\n"; - echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; - echo "<tr>"; - echo "<td class='bg3' align='left'><b>" . _MI_SF_VERSION_HISTORY . "</b></td>"; - echo "</tr>"; - - echo "<tr>"; - echo "<td class='even' align='left'>" . $versioninfo->getInfo('version_history') . "</td>"; - echo "</tr>"; - - echo "</table>"; -} - -echo "<br />"; -$modfooter = sf_modFooter(); -echo "<div align='center'>" . $modfooter . "</div>"; -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/smartfaq/trunk/smartfaq/admin/about2.php =================================================================== --- XoopsModules/smartfaq/trunk/smartfaq/admin/about2.php (rev 0) +++ XoopsModules/smartfaq/trunk/smartfaq/admin/about2.php 2012-07-31 11:57:28 UTC (rev 9956) @@ -0,0 +1,190 @@ +<?php + +/** +* $Id: about.php,v 1.12 2004/12/14 01:59:42 malanciault Exp $ +* Module: SmartFAQ +* Author: The SmartFactory <www.smartfactory.ca> +* Licence: GNU +*/ + +include_once("admin_header.php"); +$myts = &MyTextSanitizer::getInstance(); + +Global $xoopsModule; + +xoops_cp_header(); + +$module_handler = &xoops_gethandler('module'); +$versioninfo = &$module_handler->get($xoopsModule->getVar('mid')); + +//sf_adminMenu(-1, _AM_SF_ABOUT . " " . $versioninfo->getInfo('name')); + +/* Centered heading +echo "<br />"; +echo "<table width='100%'>"; +echo "<tr>"; +echo "<td align = 'center'>"; +echo "<img src='".XOOPS_URL."/modules/smartfaq/".$versioninfo->getInfo('image')."' alt='' align='center'/></a>"; +echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $versioninfo->getInfo('name') . " version " . $versioninfo->getInfo('version') . "</div>"; +if ( $versioninfo->getInfo('author_realname') != '') +{ +$author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")"; +} else +{ +$author_name = $versioninfo->getInfo('author'); +} + +echo "<div style = 'line-height: 16px; font-weight: bold; display: block;'>" . _AM_SF_BY . " " .$author_name; +echo "</div>"; +echo "<div style = 'line-height: 16px; display: block;'>" . $versioninfo->getInfo('license') . "</div><br></>\n"; + +echo "</td>"; +echo "</tr>"; +echo "</table>"; +*/ +// Left headings... +echo "<img src='" . XOOPS_URL . "/modules/" . $xoopsModule->getVar('dirname') . "/" . $versioninfo->getInfo('image') . "' alt='' hspace='0' vspace='0' align='left' style='margin-right: 10px;'/></a>"; +echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $versioninfo->getInfo('name') . " version " . $versioninfo->getInfo('version') . " (" . $versioninfo->getInfo('status_version') . ")</div>"; +if ($versioninfo->getInfo('author_realname') != '') { + $author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")"; +} else { + $author_name = $versioninfo->getInfo('author'); +} + +echo "<div style = 'line-height: 16px; font-weight: bold; display: block;'>" . _AM_SF_BY . " " . $author_name; +echo "</div>"; +echo "<div style = 'line-height: 16px; display: block;'>" . $versioninfo->getInfo('license') . "</div>\n"; + +// Developers Information +echo "<br /><table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; +echo "<tr>"; +echo "<td colspan='2' class='bg3' align='left'><b>" . _MI_SF_AUTHOR_INFO . "</b></td>"; +echo "</tr>"; + +if ($versioninfo->getInfo('developer_lead') != '') { + echo "<tr>"; + echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_LEAD . "</td>"; + echo "<td class='even' align='left'>" . $versioninfo->getInfo('developer_lead') . "</td>"; + echo "</tr>"; +} +if ($versioninfo->getInfo('developer_contributor') != '') { + echo "<tr>"; + echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_CONTRIBUTOR . "</td>"; + echo "<td class='even' align='left'>" . $versioninfo->getInfo('developer_contributor') . "</td>"; + echo "</tr>"; +} +if ($versioninfo->getInfo('developer_website_url') != '') { + echo "<tr>"; + echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_WEBSITE . "</td>"; + echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('developer_website_url') . "' target='blank'>" . $versioninfo->getInfo('developer_website_name') . "</a></td>"; + echo "</tr>"; +} +if ($versioninfo->getInfo('developer_email') != '') { + echo "<tr>"; + echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_EMAIL . "</td>"; + echo "<td class='even' align='left'><a href='mailto:" . $versioninfo->getInfo('developer_email') . "'>" . $versioninfo->getInfo('developer_email') . "</a></td>"; + echo "</tr>"; +} + + +echo "</table>"; +echo "<br />\n"; +// Module Developpment information +echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; +echo "<tr>"; +echo "<td colspan='2' class='bg3' align='left'><b>" . _MI_SF_MODULE_INFO . "</b></td>"; +echo "</tr>"; + +if ($versioninfo->getInfo('date') != '') { + echo "<tr>"; + echo "<td class='head' width = '200' align='left'>" . _MI_SF_MODULE_RELEASE_DATE . "</td>"; + echo "<td class='even' align='left'>" . $versioninfo->getInfo('date') . "</td>"; + echo "</tr>"; +} + +if ($versioninfo->getInfo('status') != '') { + echo "<tr>"; + echo "<td class='head' width = '200' align='left'>" . _MI_SF_MODULE_STATUS . "</td>"; + echo "<td class='even' align='left'>" . $versioninfo->getInfo('status') . "</td>"; + echo "</tr>"; +} + +if ($versioninfo->getInfo('demo_site_url') != '') { + echo "<tr>"; + echo "<td class='head' align='left'>" . _MI_SF_MODULE_DEMO . "</td>"; + echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('demo_site_url') . "' target='blank'>" . $versioninfo->getInfo('demo_site_name') . "</a></td>"; + echo "</tr>"; +} + +if ($versioninfo->getInfo('support_site_url') != '') { + echo "<tr>"; + echo "<td class='head' align='left'>" . _MI_SF_MODULE_SUPPORT . "</td>"; + echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('support_site_url') . "' target='blank'>" . $versioninfo->getInfo('support_site_name') . "</a></td>"; + echo "</tr>"; +} + +if ($versioninfo->getInfo('submit_bug') != '') { + echo "<tr>"; + echo "<td class='head' align='left'>" . _MI_SF_MODULE_BUG . "</td>"; + echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('submit_bug') . "' target='blank'>" . "Submit a Bug in SmartFAQ Bug Tracker" . "</a></td>"; + echo "</tr>"; +} +if ($versioninfo->getInfo('submit_feature') != '') { + echo "<tr>"; + echo "<td class='head' align='left'>" . _MI_SF_MODULE_FEATURE . "</td>"; + echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('submit_feature') . "' target='blank'>" . "Request a feature in the SmartFAQ Feature Tracker" . "</a></td>"; + echo "</tr>"; +} + +echo "</table>"; +// Warning +if ($versioninfo->getInfo('warning') != '') { + echo "<br />\n"; + echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; + echo "<tr>"; + echo "<td class='bg3' align='left'><b>" . _MI_SF_MODULE_DISCLAIMER . "</b></td>"; + echo "</tr>"; + + echo "<tr>"; + echo "<td class='even' align='left'>" . $versioninfo->getInfo('warning') . "</td>"; + echo "</tr>"; + + echo "</table>"; +} +// Author's note +if ($versioninfo->getInfo('author_word') != '') { + echo "<br />\n"; + echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; + echo "<tr>"; + echo "<td class='bg3' align='left'><b>" . _MI_SF_AUTHOR_WORD . "</b></td>"; + echo "</tr>"; + + echo "<tr>"; + echo "<td class='even' align='left'>" . $versioninfo->getInfo('author_word') . "</td>"; + echo "</tr>"; + + echo "</table>"; +} + +// Version History +if ($versioninfo->getInfo('version_history') != '') { + echo "<br />\n"; + echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; + echo "<tr>"; + echo "<td class='bg3' align='left'><b>" . _MI_SF_VERSION_HISTORY . "</b></td>"; + echo "</tr>"; + + echo "<tr>"; + echo "<td class='even' align='left'>" . $versioninfo->getInfo('version_history') . "</td>"; + echo "</tr>"; + + echo "</table>"; +} + +echo "<br />"; +$modfooter = sf_modFooter(); +echo "<div align='center'>" . $modfooter . "</div>"; +xoops_cp_footer(); + + +?> \ No newline at end of file Modified: XoopsModules/smartfaq/trunk/smartfaq/admin/admin.php =================================================================== --- XoopsModules/smartfaq/trunk/smartfaq/admin/admin.php 2012-07-31 11:52:17 UTC (rev 9955) +++ XoopsModules/smartfaq/trunk/smartfaq/admin/admin.php 2012-07-31 11:57:28 UTC (rev 9956) @@ -42,7 +42,7 @@ 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/smartfaq/trunk/smartfaq/admin/admin_footer.php =================================================================== --- XoopsModules/smartfaq/trunk/smartfaq/admin/admin_footer.php (rev 0) +++ XoopsModules/smartfaq/trunk/smartfaq/admin/admin_footer.php 2012-07-31 11:57:28 UTC (rev 9956) @@ -0,0 +1,28 @@ +<?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 $ + */ + +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/smartfaq/trunk/smartfaq/admin/admin_header.php =================================================================== --- XoopsModules/smartfaq/trunk/smartfaq/admin/admin_header.php 2012-07-31 11:52:17 UTC (rev 9955) +++ XoopsModules/smartfaq/trunk/smartfaq/admin/admin_header.php 2012-07-31 11:57:28 UTC (rev 9956) @@ -1,25 +1,63 @@ -<?php - -/** -* $Id: admin_header.php,v 1.5 2004/11/20 16:52:32 malanciault Exp $ -* Module: SmartFAQ -* Author: The SmartFactory <www.smartfactory.ca> -* Licence: GNU -*/ - -include_once "../../../mainfile.php"; -include_once '../../../include/cp_header.php'; -include_once XOOPS_ROOT_PATH . "/class/xoopsmodule.php"; -include_once XOOPS_ROOT_PATH . "/class/xoopstree.php"; -include_once XOOPS_ROOT_PATH . "/class/xoopslists.php"; -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; -include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; - -include_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; -include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/category.php'; -include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/faq.php'; -include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/answer.php'; - -$myts = &MyTextSanitizer::getInstance(); - -?> \ 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'; + + + +include_once $path . "/kernel/module.php"; +include_once $path . "/class/xoopstree.php"; +include_once $path . "/class/xoopslists.php"; +include_once $path . '/class/pagenav.php'; +include_once $path . "/class/xoopsformloader.php"; + +include_once $path .'/modules/smartfaq/include/functions.php'; +include_once $path .'/modules/smartfaq/class/category.php'; +include_once $path .'/modules/smartfaq/class/faq.php'; +include_once $path .'/modules/smartfaq/class/answer.php'; + +$myts = &MyTextSanitizer::getInstance(); + + + +global $xoopsModule; + +$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'); + +if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){ + include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'); + }else{ + redirect_header("../../../admin.php", 5, _AM_BIRTHDAY_MODULEADMIN_MISSING, false); + } \ No newline at end of file Added: XoopsModules/smartfaq/trunk/smartfaq/admin/admin_header2.php =================================================================== --- XoopsModules/smartfaq/trunk/smartfaq/admin/admin_header2.php (rev 0) +++ XoopsModules/smartfaq/trunk/smartfaq/admin/admin_header2.php 2012-07-31 11:57:28 UTC (rev 9956) @@ -0,0 +1,25 @@ +<?php + +/** +* $Id: admin_header.php,v 1.5 2004/11/20 16:52:32 malanciault Exp $ +* Module: SmartFAQ +* Author: The SmartFactory <www.smartfactory.ca> +* Licence: GNU +*/ + +include_once "../../../mainfile.php"; +include_once '../../../include/cp_header.php'; +include_once XOOPS_ROOT_PATH . "/kernel/module.php"; +include_once XOOPS_ROOT_PATH . "/class/xoopstree.php"; +include_once XOOPS_ROOT_PATH . "/class/xoopslists.php"; +include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; +include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; + +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/category.php'; +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/faq.php'; +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/answer.php'; + +$myts = &MyTextSanitizer::getInstance(); + +?> \ No newline at end of file Modified: XoopsModules/smartfaq/trunk/smartfaq/admin/answer.php =================================================================== --- XoopsModules/smartfaq/trunk/smartfaq/admin/answer.php 2012-07-31 11:52:17 UTC (rev 9955) +++ XoopsModules/smartfaq/trunk/smartfaq/admin/answer.php 2012-07-31 11:57:28 UTC (rev 9956) @@ -60,7 +60,7 @@ // Retreiving the official answer $official_answer = $faqObj->answer(); - sf_adminMenu(-1, _AM_SF_SMARTFAQ . " > " . _AM_SF_ANSWER); + //sf_adminMenu(-1, _AM_SF_SMARTFAQ . " > " . _AM_SF_ANSWER); sf_collapsableBar('bottomtable', 'bottomtableicon'); echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/close12.gif alt='' /></a> " . _AM_SF_SUBMITTED_ANSWER . "</h3>"; @@ -106,10 +106,10 @@ foreach ($proposed_answers as $proposed_answer) { if ($faqObj->status() == _SF_STATUS_NEW_ANSWER) { $merge = "<a href='faq.php?op=merge&faqid=" . $faqObj->faqid() . "&answerid=" . $proposed_answer->answerid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/merge.gif' title='" . _AM_SF_FAQ_MERGE . "' alt='" . _AM_SF_FAQ_MERGE . "' /></a> "; - $approve = "<a href='answer.php?op=selectanswer&faqid=" . $faqid . "&answerid=" . $proposed_answer->answerid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/approve.gif' title='" . _AM_SF_FAQ_APPROVE_NEW_ANSWER . "' alt='" . _AM_SF_APPROVESUB . "' /></a>"; + $approve = "<a href='answer.php?op=selectanswer&faqid=" . $faqid . "&answerid=" . $proposed_answer->answerid() . "'><img src='". $pathIcon16 .'/on.png'."' title='" . _AM_SF_FAQ_APPROVE_NEW_ANSWER . "' alt='" . _AM_SF_APPROVESUB . "' /></a>"; } - $modify = "<a href='faq.php?op=mod&faqid=" . $faqObj->faqid() . "&answerid=" . $proposed_answer->answerid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/edit.gif' title='" . _AM_SF_FAQ_REVIEW . "' alt='" . _AM_SF_FAQ_REVIEW . "' /></a> "; - $delete = "<a href='answer.php?op=del&faqid=" . $faqObj->faqid() . "&answerid=" . $proposed_answer->answerid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/delete.gif' title='" . _AM_SF_DELETESUBM . "' alt='" . _AM_SF_DELETESUBM . "' /></a>"; + $modify = "<a href='faq.php?op=mod&faqid=" . $faqObj->faqid() . "&answerid=" . $proposed_answer->answerid() . "'><img src='". $pathIcon16 .'/edit.png'."' title='" . _AM_SF_FAQ_REVIEW . "' alt='" . _AM_SF_FAQ_REVIEW . "' /></a> "; + $delete = "<a href='answer.php?op=del&faqid=" . $faqObj->faqid() . "&answerid=" . $proposed_answer->answerid() . "'><img src='". $pathIcon16 .'/delete.png'."' title='" . _AM_SF_DELETESUBM . "' alt='" . _AM_SF_DELETESUBM . "' /></a>"; echo "<tr>"; echo "<td class='head' align='center'>" . $proposed_answer->answerid(). "</td>"; echo "<td class='even' align='left'>" . $proposed_answer->answer() . "</td>"; Modified: XoopsModules/smartfaq/trunk/smartfaq/admin/category.php =================================================================== --- XoopsModules/smartfaq/trunk/smartfaq/admin/category.php 2012-07-31 11:52:17 UTC (rev 9955) +++ XoopsModules/smartfaq/trunk/smartfaq/admin/category.php 2012-07-31 11:57:28 UTC (rev 9956) @@ -22,15 +22,15 @@ function displayCategory($categoryObj, $level = 0) { - Global $xoopsModule, $category_handler; + Global $xoopsModule, $category_handler, $pathIcon16; $description = $categoryObj->description(); if (!XOOPS_USE_MULTIBYTES) { if (strlen($description) >= 100) { $description = substr($description, 0, (100 -1)) . "..."; } } - $modify = "<a href='category.php?op=mod&categoryid=" . $categoryObj->categoryid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/edit.gif' title='" . _AM_SF_EDITCOL . "' alt='" . _AM_SF_EDITCOL . "' /></a>"; - $delete = "<a href='category.php?op=del&categoryid=" . $categoryObj->categoryid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/delete.gif' title='" . _AM_SF_DELETECOL . "' alt='" . _AM_SF_DELETECOL . "' /></a>"; + $modify = "<a href='category.php?op=mod&categoryid=" . $categoryObj->categoryid() . "'><img src='". $pathIcon16 .'/edit.png'."' title='" . _AM_SF_EDITCOL . "' alt='" . _AM_SF_EDITCOL . "' /></a>"; + $delete = "<a href='category.php?op=del&categoryid=" . $categoryObj->categoryid() . "'><img src='". $pathIcon16 .'/delete.png'."' title='" . _AM_SF_DELETECOL . "' alt='" . _AM_SF_DELETECOL . "' /></a>"; $spaces = ''; for ( $j = 0; $j < $level; $j++ ) { @@ -77,7 +77,7 @@ $categoryObj = new sfCategory($categoryid); if ($showmenu) { - sf_adminMenu(1, _AM_SF_CATEGORIES . " > " . _AM_SF_EDITING); + //sf_adminMenu(1, _AM_SF_CATEGORIES . " > " . _AM_SF_EDITING); } echo "<br />\n"; if ($categoryObj->notLoaded()) { @@ -90,7 +90,7 @@ } else { $categoryObj = $category_handler->create(); if ($showmenu) { - sf_adminMenu(1, _AM_SF_CATEGORIES . " > " . _AM_SF_CREATINGNEW); + //sf_adminMenu(1, _AM_SF_CATEGORIES . " > " . _AM_SF_CREATINGNEW); } echo "<br />\n"; sf_collapsableBar('bottomtable', 'bottomtableicon'); @@ -214,7 +214,10 @@ case "mod": $categoryid = isset($_GET['categoryid'])? intval($_GET['categoryid']) : 0 ; $destList = isset($_POST['destList'])? $_POST['destList'] : ''; - xoops_cp_header(); + $indexAdmin = new ModuleAdmin(); + xoops_cp_header(); + + echo $indexAdmin->addNavigation('category.php'); editcat(true, $categoryid); break; @@ -315,9 +318,12 @@ case "default": default: - xoops_cp_header(); - sf_adminMenu(1, _AM_SF_CATEGORIES); + $indexAdmin = new ModuleAdmin(); + xoops_cp_header(); + echo $indexAdmin->addNavigation('category.php'); + //sf_adminMenu(1, _AM_SF_CATEGORIES); + echo "<br />\n"; // Creating the objects for top categories @@ -358,8 +364,7 @@ break; } -$modfooter = sf_modFooter(); -echo "<div align='center'>" . $modfooter . "</div>"; -xoops_cp_footer(); - -?> \ No newline at end of file +//$modfooter = sf_modFooter(); +//echo "<div align='center'>" . $modfooter . "</div>"; +//xoops_cp_footer(); +include_once 'admin_footer.php'; \ No newline at end of file Modified: XoopsModules/smartfaq/trunk/smartfaq/admin/faq.php =================================================================== --- XoopsModules/smartfaq/trunk/smartfaq/admin/faq.php 2012-07-31 11:52:17 UTC (rev 9955) +++ XoopsModules/smartfaq/trunk/smartfaq/admin/faq.php 2012-07-31 11:57:28 UTC (rev 9956) @@ -134,7 +134,7 @@ $categoryObj =& $faqObj->category(); if ($showmenu) { - sf_adminMenu(2, $breadcrumb_action1 . " > " . $breadcrumb_action2); + //sf_adminMenu(2, $breadcrumb_action1 . " > " . $breadcrumb_action2); } echo "<br />\n"; @@ -154,7 +154,7 @@ $breadcrumb_action2 = _AM_SF_CREATINGNEW; $button_caption = _AM_SF_CREATE; if ($showmenu) { - sf_adminMenu(2, $breadcrumb_action1 . " > " . $breadcrumb_action2); + //sf_adminMenu(2, $breadcrumb_action1 . " > " . $breadcrumb_action2); } sf_collapsableBar('bottomtable', 'bottomtableicon'); echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/close12.gif alt='' /></a> " . _AM_SF_CREATESMARTFAQ . "</h3>"; @@ -357,7 +357,10 @@ } } - xoops_cp_header(); + $indexAdmin = new ModuleAdmin(); + xoops_cp_header(); + + echo $indexAdmin->addNavigation('faq.php'); include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; editfaq(true, $faqid, $answerid); @@ -547,10 +550,13 @@ case "default": default: - xoops_cp_header(); + $indexAdmin = new ModuleAdmin(); + xoops_cp_header(); - sf_adminMenu(2, _AM_SF_SMARTFAQS); + echo $indexAdmin->addNavigation('faq.php'); + //sf_adminMenu(2, _AM_SF_SMARTFAQS); + include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; @@ -563,8 +569,7 @@ break; } -$modfooter = sf_modFooter(); -echo "<div align='center'>" . $modfooter . "</div>"; -xoops_cp_footer(); - -?> \ No newline at end of file +//$modfooter = sf_modFooter(); +//echo "<div align='center'>" . $modfooter . "</div>"; +//xoops_cp_footer(); +include_once 'admin_footer.php'; \ No newline at end of file Modified: XoopsModules/smartfaq/trunk/smartfaq/admin/import.php =================================================================== --- XoopsModules/smartfaq/trunk/smartfaq/admin/import.php 2012-07-31 11:52:17 UTC (rev 9955) +++ XoopsModules/smartfaq/trunk/smartfaq/admin/import.php 2012-07-31 11:57:28 UTC (rev 9956) @@ -50,7 +50,7 @@ $importfile = 'none'; xoops_cp_header(); - sf_adminMenu(-1, _AM_SF_IMPORT); + //sf_adminMenu(-1, _AM_SF_IMPORT); sf_collapsableBar('bottomtable', 'bottomtableicon'); echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/close12.gif alt='' /></a> " . _AM_SF_IMPORT_TITLE . "</h3>"; Modified: XoopsModules/smartfaq/trunk/smartfaq/admin/index.php =================================================================== --- XoopsModules/smartfaq/trunk/smartfaq/admin/index.php 2012-07-31 11:52:17 UTC (rev 9955) +++ XoopsModules/smartfaq/trunk/smartfaq/admin/index.php 2012-07-31 11:57:28 UTC (rev 9956) @@ -1,430 +1,143 @@ -<?php - -/** -* $Id: index.php,v 1.21 2005/08/15 16:51:57 fx2024 Exp $ -* Module: SmartFAQ -* Author: The SmartFactory <www.smartfactory.ca> -* Licence: GNU -*/ - -include_once("admin_header.php"); -$myts = &MyTextSanitizer::getInstance(); - -$faqid = isset($_POST['faqid'])? intval($_POST['faqid']) : 0; - -//$pick = isset($_GET['pick'])? intval($_GET['pick']) : 0; -//$pick = isset($_POST['pick'])? intval($_POST['pick']) : $_GET['pick']; - -$statussel = isset($_GET['statussel'])? intval($_GET['statussel']) : _SF_STATUS_ALL; -$statussel = isset($_POST['statussel'])? intval($_POST['statussel']) : $statussel; - -$sortsel = isset($_GET['sortsel'])? $_GET['sortsel'] : 'faqid'; -$sortsel = isset($_POST['sortsel'])? $_POST['sortsel'] : $sortsel; - -$ordersel = isset($_GET['ordersel'])? $_GET['ordersel'] : 'DESC'; -$ordersel = isset($_POST['ordersel'])? $_POST['ordersel'] :$ordersel; - -$module_id = $xoopsModule->getVar('mid'); -$gperm_handler = &xoops_gethandler('groupperm'); -$groups = ($xoopsUser)? ($xoopsUser->getGroups()) : XOOPS_GROUP_ANONYMOUS; - -function buildTable() -{ - global $xoopsConfig, $xoopsModuleConfig, $xoopsModule; - echo "<table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'>"; - echo "<tr>"; - echo "<td width='40' class='bg3' align='center'><b>" . _AM_SF_FAQID . "</b></td>"; - echo "<td width='20%' class='bg3' align='center'><b>" . _AM_SF_FAQCAT . "</b></td>"; - echo "<td class='bg3' align='center'><b>" . _AM_SF_QUESTION . "</b></td>"; - echo "<td width='90' class='bg3' align='center'><b>" . _AM_SF_CREATED . "</b></td>"; - echo "<td width='90' class='bg3' align='center'><b>" . _AM_SF_STATUS . "</b></td>"; - //echo "<td width='30' class='bg3' align='center'><b>" . _AM_SF_ANSWERS . "</b></td>"; - echo "<td width='90' class='bg3' align='center'><b>" . _AM_SF_ACTION . "</b></td>"; - echo "</tr>"; -} -// Code for the page -include_once XOOPS_ROOT_PATH . "/class/xoopslists.php"; -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; - -// Creating the category handler object -$category_handler =& sf_gethandler('category'); - -// Creating the FAQ handler object -$faq_handler =& sf_gethandler('faq'); - -$startentry = isset($_GET['startentry'])? intval($_GET['startentry']) : 0; - -xoops_cp_header(); -global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule, $faqid; - -sf_adminMenu(0, _AM_SF_INDEX); - -// Total FAQs -- includes everything on the table -$totalfaqs = $faq_handler->getFaqsCount(); - -// Total categories -$totalcategories = $category_handler->getCategoriesCount(-1); - -// Total FAQ count by status -$totalfaqbystatus = $faq_handler->getFaqsCountByStatus(); - -// Total asked FAQs -$totalasked = isset($totalfaqbystatus[_SF_STATUS_ASKED])? $totalfaqbystatus[_SF_STATUS_ASKED] : 0; - -// Total opened FAQs -$totalopened = isset($totalfaqbystatus[_SF_STATUS_OPENED])? $totalfaqbystatus[_SF_STATUS_OPENED] : 0; - -// Total answered FAQs -$totalanswered = isset($totalfaqbystatus[_SF_STATUS_ANSWERED])? $totalfaqbystatus[_SF_STATUS_ANSWERED] : 0; - -// Total submitted FAQs -$totalsubmitted = isset($totalfaqbystatus[_SF_STATUS_SUBMITTED])? $totalfaqbystatus[_SF_STATUS_SUBMITTED] : 0; - -// Total published FAQs -$totalpublished = isset($totalfaqbystatus[_SF_STATUS_PUBLISHED])? $totalfaqbystatus[_SF_STATUS_PUBLISHED] : 0; - -// Total offline FAQs -$totaloffline = isset($totalfaqbystatus[_SF_STATUS_OFFLINE])? $totalfaqbystatus[_SF_STATUS_OFFLINE] : 0; - -// Total rejected question -$totalrejectedquestion = isset($totalfaqbystatus[_SF_STATUS_REJECTED_QUESTION])? $totalfaqbystatus[_SF_STATUS_REJECTED_QUESTION] : 0; - -// Total rejected smartfaq -$totalrejectedsmartfaq = isset($totalfaqbystatus[_SF_STATUS_REJECTED_SMARTFAQ])? $totalfaqbystatus[_SF_STATUS_REJECTED_SMARTFAQ] : 0; - -// Total Q&A with new answers -$totalnewanswers = isset($totalfaqbystatus[_SF_STATUS_NEW_ANSWER])? $totalfaqbystatus[_SF_STATUS_NEW_ANSWER] : 0; - -// -- // -sf_collapsableBar('toptable', 'toptableicon'); -echo "<img onclick='toggle('toptable'); toggleIcon('toptableicon');' id='toptableicon' name='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/close12.gif alt='' /></a> " . _AM_SF_INVENTORY . "</h3>"; -echo "<div id='toptable'>"; -echo "<br />"; -echo "<table width='100%' class='outer' cellspacing='1' cellpadding='3' border='0' ><tr>"; -echo "<td class='head'>" . _AM_SF_TOTALCAT . "</td><td align='center' class='even'>" . $totalcategories . "</td>"; -echo "<td class='head'>" . _AM_SF_TOTALASKED . "</td><td align='center' class='even'>" . $totalasked . "</td>"; -echo "<td class='head'>" . _AM_SF_TOTALOPENED . "</td><td align='center' class='even'>" . $totalopened . "</td>"; -echo "<td class='head'>" . _AM_SF_TOTALSUBMITTED . "</td><td align='center' class='even'>" . $totalsubmitted . "</td>"; -echo "<td class='head'>" . _AM_SF_TOTALPUBLISHED . "</td><td align='center' class='even'>" . $totalpublished . "</td>"; -echo "<td class='head'>" . _AM_SF_TOTALNEWANSWERS . "</td><td align='center' class='even'>" . $totalnewanswers . "</td>"; -echo "</tr></table>"; -echo "<br />"; - -echo "<form><div style=\"margin-bottom: 24px;\">"; -echo "<input type='button' name='button' onclick=\"location='category.php?op=mod'\" value='" . _AM_SF_CATEGORY_CREATE . "'> "; -echo "<input type='button' name='button' onclick=\"location='faq.php?op=mod'\" value='" . _AM_SF_CREATEART . "'> "; -echo "<input type='button' name='button' onclick=\"location='question.php?op=mod'\" value='" . _AM_SF_CREATEQUESTION . "'> "; -echo "</div></form>"; -echo "</div>"; - -// Construction of lower table -sf_collapsableBar('bottomtable', 'bottomtableicon'); -echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/close12.gif alt='' /></a> " . _AM_SF_ALLFAQS . "</h3>"; -echo "<div id='bottomtable'>"; -echo "<span style=\"color: #567; margin: 3px 0 18px 0; font-size: small; display: block; \">" . _AM_SF_ALLFAQSMSG . "</span>"; - -$showingtxt = ''; -$selectedtxt = ''; -$cond = ""; -$selectedtxt0 = ''; -$selectedtxt1 = ''; -$selectedtxt2 = ''; -$selectedtxt3 = ''; -$selectedtxt4 = ''; -$selectedtxt5 = ''; -$selectedtxt6 = ''; -$selectedtxt7 = ''; -$selectedtxt8 = ''; -$selectedtxt9 = ''; -$selectedtxt10 = ''; - -$sorttxtquestion = ""; -$sorttxtcategory = ""; -$sorttxtcreated = ""; -$sorttxtweight = ""; -$sorttxtfaqid = ""; - -$ordertxtasc=''; -$ordertxtdesc=''; - -switch ($sortsel) { - case 'faq.question': - $sorttxtquestion = "selected='selected'"; - break; - - case 'category.name': - $sorttxtcategory = "selected='selected'"; - break; - - case 'faq.datesub': - $sorttxtcreated = "selected='selected'"; - break; - - case 'faq.weight': - $sorttxtweight = "selected='selected'"; - break; - - default : - $sorttxtfaqid = "selected='selected'"; - break; -} - -switch ($ordersel) { - case 'ASC': - $ordertxtasc = "selected='selected'"; - break; - - default : - $ordertxtdesc = "selected='selected'"; - break; -} - -switch ($statussel) { - case _SF_STATUS_ALL : - $selectedtxt0 = "selected='selected'"; - $caption = _AM_SF_ALL; - $cond = ""; - $status_explaination = _AM_SF_ALL_EXP; - break; - - case _SF_STATUS_ASKED : - $selectedtxt1 = "selected='selected'"; - $caption = _AM_SF_ASKED; - $cond = " WHERE status = " . _SF_STATUS_ASKED . " "; - $status_explaination = _AM_SF_ASKED_EXP; - break; - - case _SF_STATUS_OPENED : - $selectedtxt2 = "selected='selected'"; - $caption = _AM_SF_OPENED; - $cond = " WHERE status = " . _SF_STATUS_OPENED . " "; - $status_explaination = _AM_SF_OPENED_EXP; - break; - - case _SF_STATUS_ANSWERED : - $selectedtxt3 = "selected='selected'"; - $caption = _AM_SF_ANSWERED; - $cond = " WHERE status = " . _SF_STATUS_ANSWERED . " "; - $status_explaination = _AM_SF_ANSWERED_EXP; - break; - - case _SF_STATUS_SUBMITTED : - $selectedtxt4 = "selected='selected'"; - $caption = _AM_SF_SUBMITTED; - $cond = " WHERE status = " . _SF_STATUS_SUBMITTED . " "; - $status_explaination = _AM_SF_SUBMITTED_EXP; - break; - - case _SF_STATUS_PUBLISHED : - $selectedtxt5 = "selected='selected'"; - $caption = _AM_SF_PUBLISHED; - $cond = " WHERE status = " . _SF_STATUS_PUBLISHED . " "; - $status_explaination = _AM_SF_PUBLISHED_EXP; - break; - - case _SF_STATUS_NEW_ANSWER : - $selectedtxt6 = "selected='selected'"; - $caption = _AM_SF_NEW_ANSWER; - $cond = " WHERE status = " . _SF_STATUS_NEW_ANSWER . " "; - $status_explaination = _AM_SF_NEW_ANSWER_EXP; - break; - - case _SF_STATUS_OFFLINE : - $selectedtxt7 = "selected='selected'"; - $caption = _AM_SF_OFFLINE; - $cond = " WHERE status = " . _SF_STATUS_OFFLINE . " "; - $status_explaination = _AM_SF_OFFLINE_EXP; - break; - - case _SF_STATUS_REJECTED_QUESTION : - $selectedtxt8 = "selected='selected'"; - $caption = _AM_SF_REJECTED_QUESTION; - $cond = " WHERE status = " . _SF_STATUS_REJECTED_QUESTION . " "; - $status_explaination = _AM_SF_REJECTED_QUESTION_EXP; - break; - - case _SF_STATUS_REJECTED_SMARTFAQ : - $selectedtxt9 = "selected='selected'"; - $caption = _AM_SF_REJECTED_SMARTFAQ; - $cond = " WHERE status = " . _SF_STATUS_REJECTED_SMARTFAQ . " "; - $status_explaination = _AM_SF_REJECTED_SMARTFAQ_EXP; - break; -} - -/* -- Code to show selected terms -- */ -echo "<form name='pick' id='pick' action='" . $_SERVER['PHP_SELF'] . "' method='POST' style='margin: 0;'>"; - -echo " - <table width='100%' cellspacing='1' cellpadding='2' border='0' style='border-left: 1px solid silver; border-top: 1px solid silver; border-right: 1px solid silver;'> - <tr> - <td><span style='font-weight: bold; font-size: 12px; font-variant: small-caps;'>" . _AM_SF_SHOWING . " " . $caption . "</span></td> - <td align='right'>" . _AM_SF_SELECT_SORT . " - <select name='sortsel' onchange='submit()'> - <option value='faq.faqid' $sorttxtfaqid>" . _AM_SF_ID . "</option> - <option value='category.name' $sorttxtcategory>" . _AM_SF_CATEGORY . "</option> - <option value='faq.question' $sorttxtquestion>" . _AM_SF_QUESTION . "</option> - <option value='faq.datesub' $sorttxtcreated>" . _AM_SF_CREATED . "</option> - <option value='faq.weight' $sorttxtweight>" . _AM_SF_WEIGHT . "</option> - </select> - <select name='ordersel' onchange='submit()'> - <option value='ASC' $ordertxtasc>" . _AM_SF_ASC . "</option> - <option value='DESC' $ordertxtdesc>" . _AM_SF_DESC . "</option> - </select> - " . _AM_SF_SELECT_STATUS . " : - <select name='statussel' onchange='submit()'> - <option value='0' $selectedtxt0>" . _AM_SF_ALL . " [$totalfaqs]</option> - <option value='1' $selectedtxt1>" . _AM_SF_ASKED . " [$totalasked]</option> - <option value='2' $selectedtxt2>" . _AM_SF_OPENED . " [$totalopened]</option> - <option value='3' $selectedtxt3>" . _AM_SF_ANSWERED . " [$totalanswered]</option> - <option value='4' $selectedtxt4>" . _AM_SF_SUBMITTED . " [$totalsubmitted]</option> - <option value='5' $selectedtxt5>" . _AM_SF_PUBLISHED . " [$totalpublished]</option> - <option value='6' $selectedtxt6>" . _AM_SF_NEWANSWER . " [$totalnewanswers]</option> - <option value='7' $selectedtxt7>" . _AM_SF_OFFLINE . " [$totaloffline]</option> - <option value='8' $selectedtxt8>" . _AM_SF_REJECTED_QUESTION . " [$totalrejectedquestion]</option> - <option value='9' $selectedtxt9>" . _AM_SF_REJECTED_SMARTFAQ . " [$totalrejectedsmartfaq]</option> - </select> - </td> - </tr> - </table> - </form>"; - -// Get number of entries in the selected state -$numrows = ($statussel == 0)? $totalfaqs : $totalfaqbystatus[$statussel]; -$statusSelected = ($statussel == 0)? _SF_STATUS_ALL : $statussel; - -// creating the Q&As objects -$faqsObj = $faq_handler->getFaqsAdminSide($xoopsModuleConfig['perpage'], $startentry, $statusSelected, -1, $sortsel, $ordersel); - - -// fetching all categories -$allcats = $category_handler->getObjects(null, true); -$totalItemsOnPage = count($faqsObj); -buildTable(); - -if ($numrows > 0) { - - //$answer_criteria = new Criteria('faqid', "(".implode(',', array_keys($faqsObj)).")", 'IN'); - //$answer_criteria->setGroupby("faqid"); - //$answer_handler =& sf_gethandler('answer'); - //$answer_arr = $answer_handler->getCountByFAQ($answer_criteria); - - foreach ( array_keys($faqsObj) as $i ) { - // Creating the category object to which this faq is linked - $categoryObj =& $allcats[$faqsObj[$i]->categoryid()]; - - //$answers = $answer_arr[$i]; - - $approve = ''; - - switch ($faqsObj[$i]->status()) { - case _SF_STATUS_ASKED : - $statustxt = _AM_SF_ASKED; - $approve = "<a href='question.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/approve.gif' title='" . _AM_SF_QUESTION_MODERATE . "' alt='" . _AM_SF_QUESTION_MODERATE . "' /></a> "; - $modify = ""; - $delete = "<a href='question.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/delete.gif' title='" . _AM_SF_DELETEQUESTION . "' alt='" . _AM_SF_DELETEQUESTION . "' /></a>"; - break; - - case _SF_STATUS_OPENED : - $statustxt = _AM_SF_OPENED; - $approve = ""; - $modify = "<a href='question.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/edit.gif' title='" . _AM_SF_QUESTION_EDIT . "' alt='" . _AM_SF_QUESTION_EDIT . "' /></a> "; - $delete = "<a href='question.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/delete.gif' title='" . _AM_SF_DELETEQUESTION . "' alt='" . _AM_SF_DELETEQUESTION . "' /></a>"; - break; - - case _SF_STATUS_ANSWERED : - $statustxt = _AM_SF_ANSWERED; - $approve = "<a href='answer.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/approve.gif' title='" . _AM_SF_ANSWERED_MODERATE . "' alt='" . _AM_SF_ANSWERED_MODERATE . "' /></a> "; - $modify = ""; - $delete = "<a href='question.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/delete.gif' title='" . _AM_SF_DELETEQUESTION . "' alt='" . _AM_SF_DELETEQUESTION . "' /></a>"; - break; - - case _SF_STATUS_SUBMITTED : - $statustxt = _AM_SF_SUBMITTED; - $approve = "<a href='faq.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/approve.gif' title='" . _AM_SF_SUBMISSION_MODERATE . "' alt='" . _AM_SF_SUBMISSION_MODERATE . "' /></a> "; - $delete = "<a href='faq.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/delete.gif' title='" . _AM_SF_DELETEART . "' alt='" . _AM_SF_DELETEART . "' /></a>"; - $modify = ""; - break; - - case _SF_STATUS_PUBLISHED : - $statustxt = _AM_SF_PUBLISHED; - $approve = ""; - $modify = "<a href='faq.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/edit.gif' title='" . _AM_SF_FAQ_EDIT . "' alt='" . _AM_SF_FAQ_EDIT . "' /></a> "; - $delete = "<a href='faq.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/delete.gif' title='" . _AM_SF_DELETEART . "' alt='" . _AM_SF_DELETEART . "' /></a>"; - break; - - case _SF_STATUS_NEW_ANSWER : - $statustxt = _AM_SF_NEWANSWER; - $approve = "<a href='answer.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/approve.gif' title='" . _AM_SF_FAQ_EDIT . "' alt='" . _AM_SF_FAQ_EDIT . "' /></a> "; - $delete = "<a href='faq.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/delete.gif' title='" . _AM_SF_DELETEART . "' alt='" . _AM_SF_DELETEART . "' /></a>"; - $modify = ""; - break; - - case _SF_STATUS_OFFLINE : - $statustxt = _AM_SF_OFFLINE; - $approve = ""; - $modify = "<a href='faq.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/edit.gif' title='" . _AM_SF_FAQ_EDIT . "' alt='" . _AM_SF_FAQ_EDIT . "' /></a> "; - $delete = "<a href='faq.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/delete.gif' title='" . _AM_SF_DELETEART . "' alt='" . _AM_SF_DELETEART . "' /></a>"; - break; - - case _SF_STATUS_REJECTED_QUESTION : - $statustxt = _AM_SF_REJECTED_QUESTION; - $approve = ""; - $modify = "<a href='faq.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/edit.gif' title='" . _AM_SF_REJECTED_EDIT . "' alt='" . _AM_SF_REJECTED_EDIT . "' /></a> "; - $delete = "<a href='question.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/delete.gif' title='" . _AM_SF_DELETEQUESTION . "' alt='" . _AM_SF_DELETEQUESTION . "' /></a>"; - break; - - case _SF_STATUS_REJECTED_SMARTFAQ : - $statustxt = _AM_SF_REJECTED_SMARTFAQ; - $approve = ""; - $modify = "<a href='faq.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/edit.gif' title='" . _AM_SF_REJECTED_EDIT . "' alt='" . _AM_SF_REJECTED_EDIT . "' /></a> "; - $delete = "<a href='faq.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/delete.gif' title='" . _AM_SF_DELETEART . "' alt='" . _AM_SF_DELETEART . "' /></a>"; - break; - - case "default" : - default : - $statustxt = _AM_SF_STATUS0; - $approve = ""; - $modify = ""; - break; - } - - //$modify = "<a href='faq.php?op=mod&faqid=" . $faqid . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/edit.gif' alt='" . _AM_SF_EDITART . "' /></a> "; - - - echo "<tr>"; - echo "<td class='head' align='center'>" . $faqsObj[$i]->faqid() . "</td>"; - echo "<td class='even' align='left'>" . $categoryObj->name() . "</td>"; - echo "<td class='even' align='left'>" . $faqsObj[$i]->question(100) . "</td>"; - echo "<td class='even' align='center'>" . $faqsObj[$i]->datesub('s') . "</td>"; - echo "<td class='even' align='center'>" . $statustxt . "</td>"; - //echo "<td class='even' align='center'>" . $answers . "</td>"; - echo "<td class='even' align='center'> ". $approve . $modify . $delete . "</td>"; - echo "</tr>"; - } -} else { - // that is, $numrows = 0, there's no entries yet - echo "<tr>"; - echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOFAQSSEL . "</td>"; - echo "</tr>"; -} -echo "</table>\n"; -echo "<span style=\"color: #567; margin: 3px 0 18px 0; font-size: small; display: block; \">$status_explaination</span>"; -$pagenav = new XoopsPageNav($numrows, $xoopsModuleConfig['perpage'], $startentry, 'startentry', "statussel=$statussel&sortsel=$sortsel&ordersel=$ordersel"); - -if ($xoopsModuleConfig['useimagenavpage'] == 1) { - echo '<div style="text-align:right; background-color: white; margin: 10px 0;">' . $pagenav->renderImageNav() . '</div>'; -} else { - echo '<div style="text-align:right; background-color: white; margin: 10px 0;">' . $pagenav->renderNav() . '</div>'; -} -// ENDs code to show active entries -echo "</div>"; -// Close the collapsable div -echo "</div>"; -echo "</div>"; - -$modfooter = sf_modFooter(); -echo "<div align='center'>" . $modfooter . "</div>"; - -xoops_cp_footer(); - -?> +<?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 $ + */ + + +require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; +include_once dirname(__FILE__) . '/admin_header.php'; + +xoops_cp_header(); + + $indexAdmin = new ModuleAdmin(); + +//---------------------- + +// Creating the category handler object +$category_handler =& sf_gethandler('category'); + +// Creating the FAQ handler object +$faq_handler =& sf_gethandler('faq'); + +// Total FAQs -- includes everything on the table +$totalfaqs = $faq_handler->getFaqsCount(); + +// Total categories +$totalcategories = $category_handler->getCategoriesCount(-1); + +// Total FAQ count by status +$totalfaqbystatus = $faq_handler->getFaqsCountByStatus(); + +// Total asked FAQs +$totalasked = isset($totalfaqbystatus[_SF_STATUS_ASKED])? $totalfaqbystatus[_SF_STATUS_ASKED] : 0; + +// Total opened FAQs +$totalopened = isset($totalfaqbystatus[_SF_STATUS_OPENED])? $totalfaqbystatus[_SF_STATUS_OPENED] : 0; + +// Total answered FAQs +$totalanswered = isset($totalfaqbystatus[_SF_STATUS_ANSWERED])? $totalfaqbystatus[_SF_STATUS_ANSWERED] : 0; + +// Total submitted FAQs +$totalsubmitted = isset($totalfaqbystatus[_SF_STATUS_SUBMITTED])? $totalfaqbystatus[_SF_STATUS_SUBMITTED] : 0; + +// Total published FAQs +$totalpublished = isset($totalfaqbystatus[_SF_STATUS_PUBLISHED])? $totalfaqbystatus[_SF_STATUS_PUBLISHED] : 0; + +// Total offline FAQs +$totaloffline = isset($totalfaqbystatus[_SF_STATUS_OFFLINE])? $totalfaqbystatus[_SF_STATUS_OFFLINE] : 0; + +// Total rejected question +$totalrejectedquestion = isset($totalfaqbystatus[_SF_STATUS_REJECTED_QUESTION])? $totalfaqbystatus[_SF_STATUS_REJECTED_QUESTION] : 0; + +// Total rejected smartfaq +$totalrejectedsmartfaq = isset($totalfaqbystatus[_SF_STATUS_REJECTED_SMARTFAQ])? $totalfaqbystatus[_SF_STATUS_REJECTED_SMARTFAQ] : 0; + +// Total Q&A with new answers +$totalnewanswers = isset($totalfaqbystatus[_SF_STATUS_NEW_ANSWER])? $totalfaqbystatus[_SF_STATUS_NEW_ANSWER] : 0; + +//set info block +$indexAdmin->addInfoBox(_AM_SF_INVENTORY); + +if ($totalcategories > 0) { + $indexAdmin->addInfoBoxLine( + _AM_SF_INVENTORY, "<infolabel>" . '<a href="category.php">' . _AM_SF_TOTALCAT . '</a><b>' + . "</infolabel>", $totalcategories, 'Green' + ); +} else { + $indexAdmin->addInfoBoxLine( + _AM_SF_INVENTORY, "<infolabel>" . _AM_SF_TOTALCAT . "</infolabel>", $totalcategories, 'Green' + ); +} +if ($totalasked > 0) { + $indexAdmin->addInfoBoxLine( + _AM_SF_INVENTORY, "<infolabel>" . '<a href="main.php">' . _AM_SF_TOTALASKED . '</a><b>' + . "</infolabel>", $totalasked, 'Green' + ); +} else { + $indexAdmin->addInfoBoxLine( + _AM_SF_INVENTORY, "<infolabel>" . _AM_SF_TOTALASKED . "</infolabel>", $totalasked, 'Green' + ); +} +if ($totalopened > 0) { + $indexAdmin->addInfoBoxLine( + _AM_SF_INVENTORY, "<infolabel>" . '<a href="question.php">' . _AM_SF_TOTALOPENED . '</a><b>' + . "</infolabel>", $totalopened, 'Red' + ); +} else { + $indexAdmin->addInfoBoxLine( + _AM_SF_INVENTORY, "<infolabel>" . _AM_SF_TOTALOPENED . "</infolabel>", $totalopened, 'Green' + ); +} +if ($totalsubmitted > 0) { + $indexAdmin->addInfoBoxLine( + _AM_SF_INVENTORY, "<infolabel>" . '<a href="category.php">' . _AM_SF_TOTALSUBMITTED . '</a><b>' + . "</infolabel>", $totalsubmitted, 'Green' + ); +} else { + $indexAdmin->addInfoBoxLine( + _AM_SF_INVENTORY, "<infolabel>" . _AM_SF_TOTALSUBMITTED . "</infolabel>", $totalsubmitted, 'Green' + ); +} +if ($totalpublished > 0) { + $indexAdmin->addInfoBoxLine( + _AM_SF_INVENTORY, "<infolabel>" . '<a href... [truncated message content] |
From: <be...@us...> - 2012-07-31 11:52:28
|
Revision: 9955 http://xoops.svn.sourceforge.net/xoops/?rev=9955&view=rev Author: beckmi Date: 2012-07-31 11:52:17 +0000 (Tue, 31 Jul 2012) Log Message: ----------- Adding SmartFAQ Added Paths: ----------- XoopsModules/smartfaq/ XoopsModules/smartfaq/branches/ XoopsModules/smartfaq/releases/ XoopsModules/smartfaq/releases/1.09/ XoopsModules/smartfaq/releases/1.09/smartfaq/ XoopsModules/smartfaq/releases/1.09/smartfaq/admin/ XoopsModules/smartfaq/releases/1.09/smartfaq/admin/about.php XoopsModules/smartfaq/releases/1.09/smartfaq/admin/admin.php XoopsModules/smartfaq/releases/1.09/smartfaq/admin/admin_header.php XoopsModules/smartfaq/releases/1.09/smartfaq/admin/answer.php XoopsModules/smartfaq/releases/1.09/smartfaq/admin/category.php XoopsModules/smartfaq/releases/1.09/smartfaq/admin/docbook_export.php XoopsModules/smartfaq/releases/1.09/smartfaq/admin/faq.php XoopsModules/smartfaq/releases/1.09/smartfaq/admin/funcs.js XoopsModules/smartfaq/releases/1.09/smartfaq/admin/import.php XoopsModules/smartfaq/releases/1.09/smartfaq/admin/index.php XoopsModules/smartfaq/releases/1.09/smartfaq/admin/menu.php XoopsModules/smartfaq/releases/1.09/smartfaq/admin/myblocksadmin.php XoopsModules/smartfaq/releases/1.09/smartfaq/admin/mygroupperm.php XoopsModules/smartfaq/releases/1.09/smartfaq/admin/mygrouppermform.php XoopsModules/smartfaq/releases/1.09/smartfaq/admin/permissions.php XoopsModules/smartfaq/releases/1.09/smartfaq/admin/question.php XoopsModules/smartfaq/releases/1.09/smartfaq/admin/wffaq.php XoopsModules/smartfaq/releases/1.09/smartfaq/admin/xoopsfaq.php XoopsModules/smartfaq/releases/1.09/smartfaq/answer.php XoopsModules/smartfaq/releases/1.09/smartfaq/blocks/ XoopsModules/smartfaq/releases/1.09/smartfaq/blocks/faqs_context.php XoopsModules/smartfaq/releases/1.09/smartfaq/blocks/faqs_most_viewed.php XoopsModules/smartfaq/releases/1.09/smartfaq/blocks/faqs_new.php XoopsModules/smartfaq/releases/1.09/smartfaq/blocks/faqs_random_diduno.php XoopsModules/smartfaq/releases/1.09/smartfaq/blocks/faqs_random_faq.php XoopsModules/smartfaq/releases/1.09/smartfaq/blocks/faqs_random_how.php XoopsModules/smartfaq/releases/1.09/smartfaq/blocks/faqs_recent.php XoopsModules/smartfaq/releases/1.09/smartfaq/blocks/faqs_recent_questions.php XoopsModules/smartfaq/releases/1.09/smartfaq/blocks/index.html XoopsModules/smartfaq/releases/1.09/smartfaq/category.php XoopsModules/smartfaq/releases/1.09/smartfaq/changelog.txt XoopsModules/smartfaq/releases/1.09/smartfaq/class/ XoopsModules/smartfaq/releases/1.09/smartfaq/class/answer.php XoopsModules/smartfaq/releases/1.09/smartfaq/class/category.php XoopsModules/smartfaq/releases/1.09/smartfaq/class/faq.php XoopsModules/smartfaq/releases/1.09/smartfaq/class/permission.php XoopsModules/smartfaq/releases/1.09/smartfaq/class/smartdbupdater.php XoopsModules/smartfaq/releases/1.09/smartfaq/comment_delete.php XoopsModules/smartfaq/releases/1.09/smartfaq/comment_edit.php XoopsModules/smartfaq/releases/1.09/smartfaq/comment_new.php XoopsModules/smartfaq/releases/1.09/smartfaq/comment_post.php XoopsModules/smartfaq/releases/1.09/smartfaq/comment_reply.php XoopsModules/smartfaq/releases/1.09/smartfaq/faq.php XoopsModules/smartfaq/releases/1.09/smartfaq/footer.php XoopsModules/smartfaq/releases/1.09/smartfaq/header.php XoopsModules/smartfaq/releases/1.09/smartfaq/images/ XoopsModules/smartfaq/releases/1.09/smartfaq/images/bg.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/blank.png XoopsModules/smartfaq/releases/1.09/smartfaq/images/icon/ XoopsModules/smartfaq/releases/1.09/smartfaq/images/icon/approve.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/icon/cat.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/icon/close12.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/icon/delete.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/icon/edit.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/icon/friend.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/icon/merge.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/icon/newanswer.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/icon/open12.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/icon/print.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/icon/subcat.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/index.html XoopsModules/smartfaq/releases/1.09/smartfaq/images/left_both.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/links/ XoopsModules/smartfaq/releases/1.09/smartfaq/images/links/delete.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/links/delete.png XoopsModules/smartfaq/releases/1.09/smartfaq/images/links/edit.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/links/friend.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/links/newanswer.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/links/print.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/right_both.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/sfcssbutton.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/smartfaq.gif XoopsModules/smartfaq/releases/1.09/smartfaq/images/smartfaq_logo.png XoopsModules/smartfaq/releases/1.09/smartfaq/include/ XoopsModules/smartfaq/releases/1.09/smartfaq/include/answer.inc.php XoopsModules/smartfaq/releases/1.09/smartfaq/include/blocksadmin.inc.php XoopsModules/smartfaq/releases/1.09/smartfaq/include/comment_functions.php XoopsModules/smartfaq/releases/1.09/smartfaq/include/displayfaqs.php XoopsModules/smartfaq/releases/1.09/smartfaq/include/functions.php XoopsModules/smartfaq/releases/1.09/smartfaq/include/index.html XoopsModules/smartfaq/releases/1.09/smartfaq/include/notification.inc.php XoopsModules/smartfaq/releases/1.09/smartfaq/include/onupdate.inc.php XoopsModules/smartfaq/releases/1.09/smartfaq/include/overlib/ XoopsModules/smartfaq/releases/1.09/smartfaq/include/overlib/mini/ XoopsModules/smartfaq/releases/1.09/smartfaq/include/overlib/mini/overlib_anchor_mini.js XoopsModules/smartfaq/releases/1.09/smartfaq/include/overlib/mini/overlib_crossframe_mini.js XoopsModules/smartfaq/releases/1.09/smartfaq/include/overlib/mini/overlib_cssstyle_mini.js XoopsModules/smartfaq/releases/1.09/smartfaq/include/overlib/mini/overlib_exclusive_mini.js XoopsModules/smartfaq/releases/1.09/smartfaq/include/overlib/mini/overlib_followscroll_mini.js XoopsModules/smartfaq/releases/1.09/smartfaq/include/overlib/mini/overlib_hideform_mini.js XoopsModules/smartfaq/releases/1.09/smartfaq/include/overlib/mini/overlib_mini.js XoopsModules/smartfaq/releases/1.09/smartfaq/include/overlib/mini/overlib_shadow_mini.js XoopsModules/smartfaq/releases/1.09/smartfaq/include/overlib/overlib.js XoopsModules/smartfaq/releases/1.09/smartfaq/include/overlib/overlib_anchor.js XoopsModules/smartfaq/releases/1.09/smartfaq/include/overlib/overlib_crossframe.js XoopsModules/smartfaq/releases/1.09/smartfaq/include/overlib/overlib_cssstyle.js XoopsModules/smartfaq/releases/1.09/smartfaq/include/overlib/overlib_exclusive.js XoopsModules/smartfaq/releases/1.09/smartfaq/include/overlib/overlib_followscroll.js XoopsModules/smartfaq/releases/1.09/smartfaq/include/overlib/overlib_hideform.js XoopsModules/smartfaq/releases/1.09/smartfaq/include/overlib/overlib_shadow.js XoopsModules/smartfaq/releases/1.09/smartfaq/include/request.inc.php XoopsModules/smartfaq/releases/1.09/smartfaq/include/search.inc.php XoopsModules/smartfaq/releases/1.09/smartfaq/include/searchform.php XoopsModules/smartfaq/releases/1.09/smartfaq/include/submit.inc.php XoopsModules/smartfaq/releases/1.09/smartfaq/index.php XoopsModules/smartfaq/releases/1.09/smartfaq/install.txt XoopsModules/smartfaq/releases/1.09/smartfaq/language/ XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/ XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/admin.php XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/blocks.php XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/index.html XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/ XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/category_faq_answer_proposed.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/category_faq_answer_published.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/category_faq_published.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/category_faq_submitted.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/category_question_answer_proposed.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/category_question_published.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/category_question_submitted.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/faq_answer_approved.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/faq_answer_rejected.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/faq_approved.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/faq_rejected.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/global_faq_answer_proposed.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/global_faq_answer_published.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/global_faq_category_created.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/global_faq_published.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/global_faq_submitted.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/global_question_answer_proposed.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/global_question_published.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/global_question_submitted.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/index.html XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/question_answer_approved.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/question_answer_rejected.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/question_approved.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/mail_template/question_rejected.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/main.php XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/modinfo.php XoopsModules/smartfaq/releases/1.09/smartfaq/language/english/smartdbupdater.php XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/ XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/admin.php XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/blocks.php XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/index.html XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/ XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/category_faq_answer_proposed.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/category_faq_answer_published.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/category_faq_published.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/category_faq_submitted.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/category_question_answer_proposed.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/category_question_published.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/category_question_submitted.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/faq_answer_approved.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/faq_answer_rejected.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/faq_approved.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/faq_rejected.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/global_faq_answer_proposed.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/global_faq_answer_published.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/global_faq_category_created.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/global_faq_published.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/global_faq_submitted.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/global_question_answer_proposed.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/global_question_published.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/global_question_submitted.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/index.html XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/question_answer_approved.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/question_answer_rejected.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/question_approved.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/mail_template/question_rejected.tpl XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/main.php XoopsModules/smartfaq/releases/1.09/smartfaq/language/french/modinfo.php XoopsModules/smartfaq/releases/1.09/smartfaq/language/index.html XoopsModules/smartfaq/releases/1.09/smartfaq/license.txt XoopsModules/smartfaq/releases/1.09/smartfaq/notification_update.php XoopsModules/smartfaq/releases/1.09/smartfaq/open_category.php XoopsModules/smartfaq/releases/1.09/smartfaq/open_index.php XoopsModules/smartfaq/releases/1.09/smartfaq/print.php XoopsModules/smartfaq/releases/1.09/smartfaq/readme.txt XoopsModules/smartfaq/releases/1.09/smartfaq/request.php XoopsModules/smartfaq/releases/1.09/smartfaq/smartfaq.css XoopsModules/smartfaq/releases/1.09/smartfaq/sql/ XoopsModules/smartfaq/releases/1.09/smartfaq/sql/index.html XoopsModules/smartfaq/releases/1.09/smartfaq/sql/mysql.sql XoopsModules/smartfaq/releases/1.09/smartfaq/submit.php XoopsModules/smartfaq/releases/1.09/smartfaq/templates/ XoopsModules/smartfaq/releases/1.09/smartfaq/templates/blocks/ XoopsModules/smartfaq/releases/1.09/smartfaq/templates/blocks/faqs_context.html XoopsModules/smartfaq/releases/1.09/smartfaq/templates/blocks/faqs_most_viewed.html XoopsModules/smartfaq/releases/1.09/smartfaq/templates/blocks/faqs_new.html XoopsModules/smartfaq/releases/1.09/smartfaq/templates/blocks/faqs_random_diduno.html XoopsModules/smartfaq/releases/1.09/smartfaq/templates/blocks/faqs_random_faq.html XoopsModules/smartfaq/releases/1.09/smartfaq/templates/blocks/faqs_random_how.html XoopsModules/smartfaq/releases/1.09/smartfaq/templates/blocks/faqs_recent.html XoopsModules/smartfaq/releases/1.09/smartfaq/templates/blocks/faqs_recent_questions.html XoopsModules/smartfaq/releases/1.09/smartfaq/templates/blocks/index.html XoopsModules/smartfaq/releases/1.09/smartfaq/templates/index.html XoopsModules/smartfaq/releases/1.09/smartfaq/templates/smartfaq_category.html XoopsModules/smartfaq/releases/1.09/smartfaq/templates/smartfaq_faq.html XoopsModules/smartfaq/releases/1.09/smartfaq/templates/smartfaq_index.html XoopsModules/smartfaq/releases/1.09/smartfaq/templates/smartfaq_lastfaqs.html XoopsModules/smartfaq/releases/1.09/smartfaq/templates/smartfaq_singlefaq.html XoopsModules/smartfaq/releases/1.09/smartfaq/templates/smartfaq_submit.html XoopsModules/smartfaq/releases/1.09/smartfaq/upgrade.txt XoopsModules/smartfaq/releases/1.09/smartfaq/xoops_version.php XoopsModules/smartfaq/trunk/ XoopsModules/smartfaq/trunk/smartfaq/ XoopsModules/smartfaq/trunk/smartfaq/admin/ XoopsModules/smartfaq/trunk/smartfaq/admin/about.php XoopsModules/smartfaq/trunk/smartfaq/admin/admin.php XoopsModules/smartfaq/trunk/smartfaq/admin/admin_header.php XoopsModules/smartfaq/trunk/smartfaq/admin/answer.php XoopsModules/smartfaq/trunk/smartfaq/admin/category.php XoopsModules/smartfaq/trunk/smartfaq/admin/docbook_export.php XoopsModules/smartfaq/trunk/smartfaq/admin/faq.php XoopsModules/smartfaq/trunk/smartfaq/admin/funcs.js XoopsModules/smartfaq/trunk/smartfaq/admin/import.php XoopsModules/smartfaq/trunk/smartfaq/admin/index.php XoopsModules/smartfaq/trunk/smartfaq/admin/menu.php XoopsModules/smartfaq/trunk/smartfaq/admin/myblocksadmin.php XoopsModules/smartfaq/trunk/smartfaq/admin/mygroupperm.php XoopsModules/smartfaq/trunk/smartfaq/admin/mygrouppermform.php XoopsModules/smartfaq/trunk/smartfaq/admin/permissions.php XoopsModules/smartfaq/trunk/smartfaq/admin/question.php XoopsModules/smartfaq/trunk/smartfaq/admin/wffaq.php XoopsModules/smartfaq/trunk/smartfaq/admin/xoopsfaq.php XoopsModules/smartfaq/trunk/smartfaq/answer.php XoopsModules/smartfaq/trunk/smartfaq/blocks/ XoopsModules/smartfaq/trunk/smartfaq/blocks/faqs_context.php XoopsModules/smartfaq/trunk/smartfaq/blocks/faqs_most_viewed.php XoopsModules/smartfaq/trunk/smartfaq/blocks/faqs_new.php XoopsModules/smartfaq/trunk/smartfaq/blocks/faqs_random_diduno.php XoopsModules/smartfaq/trunk/smartfaq/blocks/faqs_random_faq.php XoopsModules/smartfaq/trunk/smartfaq/blocks/faqs_random_how.php XoopsModules/smartfaq/trunk/smartfaq/blocks/faqs_recent.php XoopsModules/smartfaq/trunk/smartfaq/blocks/faqs_recent_questions.php XoopsModules/smartfaq/trunk/smartfaq/blocks/index.html XoopsModules/smartfaq/trunk/smartfaq/category.php XoopsModules/smartfaq/trunk/smartfaq/changelog.txt XoopsModules/smartfaq/trunk/smartfaq/class/ XoopsModules/smartfaq/trunk/smartfaq/class/answer.php XoopsModules/smartfaq/trunk/smartfaq/class/category.php XoopsModules/smartfaq/trunk/smartfaq/class/faq.php XoopsModules/smartfaq/trunk/smartfaq/class/permission.php XoopsModules/smartfaq/trunk/smartfaq/class/smartdbupdater.php XoopsModules/smartfaq/trunk/smartfaq/comment_delete.php XoopsModules/smartfaq/trunk/smartfaq/comment_edit.php XoopsModules/smartfaq/trunk/smartfaq/comment_new.php XoopsModules/smartfaq/trunk/smartfaq/comment_post.php XoopsModules/smartfaq/trunk/smartfaq/comment_reply.php XoopsModules/smartfaq/trunk/smartfaq/faq.php XoopsModules/smartfaq/trunk/smartfaq/footer.php XoopsModules/smartfaq/trunk/smartfaq/header.php XoopsModules/smartfaq/trunk/smartfaq/images/ XoopsModules/smartfaq/trunk/smartfaq/images/bg.gif XoopsModules/smartfaq/trunk/smartfaq/images/blank.png XoopsModules/smartfaq/trunk/smartfaq/images/icon/ XoopsModules/smartfaq/trunk/smartfaq/images/icon/approve.gif XoopsModules/smartfaq/trunk/smartfaq/images/icon/cat.gif XoopsModules/smartfaq/trunk/smartfaq/images/icon/close12.gif XoopsModules/smartfaq/trunk/smartfaq/images/icon/delete.gif XoopsModules/smartfaq/trunk/smartfaq/images/icon/edit.gif XoopsModules/smartfaq/trunk/smartfaq/images/icon/friend.gif XoopsModules/smartfaq/trunk/smartfaq/images/icon/merge.gif XoopsModules/smartfaq/trunk/smartfaq/images/icon/newanswer.gif XoopsModules/smartfaq/trunk/smartfaq/images/icon/open12.gif XoopsModules/smartfaq/trunk/smartfaq/images/icon/print.gif XoopsModules/smartfaq/trunk/smartfaq/images/icon/subcat.gif XoopsModules/smartfaq/trunk/smartfaq/images/index.html XoopsModules/smartfaq/trunk/smartfaq/images/left_both.gif XoopsModules/smartfaq/trunk/smartfaq/images/links/ XoopsModules/smartfaq/trunk/smartfaq/images/links/delete.gif XoopsModules/smartfaq/trunk/smartfaq/images/links/delete.png XoopsModules/smartfaq/trunk/smartfaq/images/links/edit.gif XoopsModules/smartfaq/trunk/smartfaq/images/links/friend.gif XoopsModules/smartfaq/trunk/smartfaq/images/links/newanswer.gif XoopsModules/smartfaq/trunk/smartfaq/images/links/print.gif XoopsModules/smartfaq/trunk/smartfaq/images/right_both.gif XoopsModules/smartfaq/trunk/smartfaq/images/sfcssbutton.gif XoopsModules/smartfaq/trunk/smartfaq/images/smartfaq.gif XoopsModules/smartfaq/trunk/smartfaq/images/smartfaq_logo.png XoopsModules/smartfaq/trunk/smartfaq/include/ XoopsModules/smartfaq/trunk/smartfaq/include/answer.inc.php XoopsModules/smartfaq/trunk/smartfaq/include/blocksadmin.inc.php XoopsModules/smartfaq/trunk/smartfaq/include/comment_functions.php XoopsModules/smartfaq/trunk/smartfaq/include/displayfaqs.php XoopsModules/smartfaq/trunk/smartfaq/include/functions.php XoopsModules/smartfaq/trunk/smartfaq/include/index.html XoopsModules/smartfaq/trunk/smartfaq/include/notification.inc.php XoopsModules/smartfaq/trunk/smartfaq/include/onupdate.inc.php XoopsModules/smartfaq/trunk/smartfaq/include/overlib/ XoopsModules/smartfaq/trunk/smartfaq/include/overlib/mini/ XoopsModules/smartfaq/trunk/smartfaq/include/overlib/mini/overlib_anchor_mini.js XoopsModules/smartfaq/trunk/smartfaq/include/overlib/mini/overlib_crossframe_mini.js XoopsModules/smartfaq/trunk/smartfaq/include/overlib/mini/overlib_cssstyle_mini.js XoopsModules/smartfaq/trunk/smartfaq/include/overlib/mini/overlib_exclusive_mini.js XoopsModules/smartfaq/trunk/smartfaq/include/overlib/mini/overlib_followscroll_mini.js XoopsModules/smartfaq/trunk/smartfaq/include/overlib/mini/overlib_hideform_mini.js XoopsModules/smartfaq/trunk/smartfaq/include/overlib/mini/overlib_mini.js XoopsModules/smartfaq/trunk/smartfaq/include/overlib/mini/overlib_shadow_mini.js XoopsModules/smartfaq/trunk/smartfaq/include/overlib/overlib.js XoopsModules/smartfaq/trunk/smartfaq/include/overlib/overlib_anchor.js XoopsModules/smartfaq/trunk/smartfaq/include/overlib/overlib_crossframe.js XoopsModules/smartfaq/trunk/smartfaq/include/overlib/overlib_cssstyle.js XoopsModules/smartfaq/trunk/smartfaq/include/overlib/overlib_exclusive.js XoopsModules/smartfaq/trunk/smartfaq/include/overlib/overlib_followscroll.js XoopsModules/smartfaq/trunk/smartfaq/include/overlib/overlib_hideform.js XoopsModules/smartfaq/trunk/smartfaq/include/overlib/overlib_shadow.js XoopsModules/smartfaq/trunk/smartfaq/include/request.inc.php XoopsModules/smartfaq/trunk/smartfaq/include/search.inc.php XoopsModules/smartfaq/trunk/smartfaq/include/searchform.php XoopsModules/smartfaq/trunk/smartfaq/include/submit.inc.php XoopsModules/smartfaq/trunk/smartfaq/index.php XoopsModules/smartfaq/trunk/smartfaq/install.txt XoopsModules/smartfaq/trunk/smartfaq/language/ XoopsModules/smartfaq/trunk/smartfaq/language/english/ XoopsModules/smartfaq/trunk/smartfaq/language/english/admin.php XoopsModules/smartfaq/trunk/smartfaq/language/english/blocks.php XoopsModules/smartfaq/trunk/smartfaq/language/english/index.html XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/ XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/category_faq_answer_proposed.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/category_faq_answer_published.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/category_faq_published.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/category_faq_submitted.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/category_question_answer_proposed.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/category_question_published.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/category_question_submitted.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/faq_answer_approved.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/faq_answer_rejected.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/faq_approved.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/faq_rejected.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/global_faq_answer_proposed.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/global_faq_answer_published.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/global_faq_category_created.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/global_faq_published.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/global_faq_submitted.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/global_question_answer_proposed.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/global_question_published.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/global_question_submitted.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/index.html XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/question_answer_approved.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/question_answer_rejected.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/question_approved.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/mail_template/question_rejected.tpl XoopsModules/smartfaq/trunk/smartfaq/language/english/main.php XoopsModules/smartfaq/trunk/smartfaq/language/english/modinfo.php XoopsModules/smartfaq/trunk/smartfaq/language/english/smartdbupdater.php XoopsModules/smartfaq/trunk/smartfaq/language/french/ XoopsModules/smartfaq/trunk/smartfaq/language/french/admin.php XoopsModules/smartfaq/trunk/smartfaq/language/french/blocks.php XoopsModules/smartfaq/trunk/smartfaq/language/french/index.html XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/ XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/category_faq_answer_proposed.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/category_faq_answer_published.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/category_faq_published.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/category_faq_submitted.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/category_question_answer_proposed.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/category_question_published.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/category_question_submitted.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/faq_answer_approved.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/faq_answer_rejected.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/faq_approved.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/faq_rejected.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/global_faq_answer_proposed.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/global_faq_answer_published.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/global_faq_category_created.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/global_faq_published.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/global_faq_submitted.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/global_question_answer_proposed.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/global_question_published.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/global_question_submitted.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/index.html XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/question_answer_approved.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/question_answer_rejected.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/question_approved.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/mail_template/question_rejected.tpl XoopsModules/smartfaq/trunk/smartfaq/language/french/main.php XoopsModules/smartfaq/trunk/smartfaq/language/french/modinfo.php XoopsModules/smartfaq/trunk/smartfaq/language/index.html XoopsModules/smartfaq/trunk/smartfaq/license.txt XoopsModules/smartfaq/trunk/smartfaq/notification_update.php XoopsModules/smartfaq/trunk/smartfaq/open_category.php XoopsModules/smartfaq/trunk/smartfaq/open_index.php XoopsModules/smartfaq/trunk/smartfaq/print.php XoopsModules/smartfaq/trunk/smartfaq/readme.txt XoopsModules/smartfaq/trunk/smartfaq/request.php XoopsModules/smartfaq/trunk/smartfaq/smartfaq.css XoopsModules/smartfaq/trunk/smartfaq/sql/ XoopsModules/smartfaq/trunk/smartfaq/sql/index.html XoopsModules/smartfaq/trunk/smartfaq/sql/mysql.sql XoopsModules/smartfaq/trunk/smartfaq/submit.php XoopsModules/smartfaq/trunk/smartfaq/templates/ XoopsModules/smartfaq/trunk/smartfaq/templates/blocks/ XoopsModules/smartfaq/trunk/smartfaq/templates/blocks/faqs_context.html XoopsModules/smartfaq/trunk/smartfaq/templates/blocks/faqs_most_viewed.html XoopsModules/smartfaq/trunk/smartfaq/templates/blocks/faqs_new.html XoopsModules/smartfaq/trunk/smartfaq/templates/blocks/faqs_random_diduno.html XoopsModules/smartfaq/trunk/smartfaq/templates/blocks/faqs_random_faq.html XoopsModules/smartfaq/trunk/smartfaq/templates/blocks/faqs_random_how.html XoopsModules/smartfaq/trunk/smartfaq/templates/blocks/faqs_recent.html XoopsModules/smartfaq/trunk/smartfaq/templates/blocks/faqs_recent_questions.html XoopsModules/smartfaq/trunk/smartfaq/templates/blocks/index.html XoopsModules/smartfaq/trunk/smartfaq/templates/index.html XoopsModules/smartfaq/trunk/smartfaq/templates/smartfaq_category.html XoopsModules/smartfaq/trunk/smartfaq/templates/smartfaq_faq.html XoopsModules/smartfaq/trunk/smartfaq/templates/smartfaq_index.html XoopsModules/smartfaq/trunk/smartfaq/templates/smartfaq_lastfaqs.html XoopsModules/smartfaq/trunk/smartfaq/templates/smartfaq_singlefaq.html XoopsModules/smartfaq/trunk/smartfaq/templates/smartfaq_submit.html XoopsModules/smartfaq/trunk/smartfaq/upgrade.txt XoopsModules/smartfaq/trunk/smartfaq/xoops_version.php Added: XoopsModules/smartfaq/releases/1.09/smartfaq/admin/about.php =================================================================== --- XoopsModules/smartfaq/releases/1.09/smartfaq/admin/about.php (rev 0) +++ XoopsModules/smartfaq/releases/1.09/smartfaq/admin/about.php 2012-07-31 11:52:17 UTC (rev 9955) @@ -0,0 +1,190 @@ +<?php + +/** +* $Id: about.php,v 1.12 2004/12/14 01:59:42 malanciault Exp $ +* Module: SmartFAQ +* Author: The SmartFactory <www.smartfactory.ca> +* Licence: GNU +*/ + +include_once("admin_header.php"); +$myts = &MyTextSanitizer::getInstance(); + +Global $xoopsModule; + +xoops_cp_header(); + +$module_handler = &xoops_gethandler('module'); +$versioninfo = &$module_handler->get($xoopsModule->getVar('mid')); + +sf_adminMenu(-1, _AM_SF_ABOUT . " " . $versioninfo->getInfo('name')); + +/* Centered heading +echo "<br />"; +echo "<table width='100%'>"; +echo "<tr>"; +echo "<td align = 'center'>"; +echo "<img src='".XOOPS_URL."/modules/smartfaq/".$versioninfo->getInfo('image')."' alt='' align='center'/></a>"; +echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $versioninfo->getInfo('name') . " version " . $versioninfo->getInfo('version') . "</div>"; +if ( $versioninfo->getInfo('author_realname') != '') +{ +$author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")"; +} else +{ +$author_name = $versioninfo->getInfo('author'); +} + +echo "<div style = 'line-height: 16px; font-weight: bold; display: block;'>" . _AM_SF_BY . " " .$author_name; +echo "</div>"; +echo "<div style = 'line-height: 16px; display: block;'>" . $versioninfo->getInfo('license') . "</div><br></>\n"; + +echo "</td>"; +echo "</tr>"; +echo "</table>"; +*/ +// Left headings... +echo "<img src='" . XOOPS_URL . "/modules/" . $xoopsModule->getVar('dirname') . "/" . $versioninfo->getInfo('image') . "' alt='' hspace='0' vspace='0' align='left' style='margin-right: 10px;'/></a>"; +echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $versioninfo->getInfo('name') . " version " . $versioninfo->getInfo('version') . " (" . $versioninfo->getInfo('status_version') . ")</div>"; +if ($versioninfo->getInfo('author_realname') != '') { + $author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")"; +} else { + $author_name = $versioninfo->getInfo('author'); +} + +echo "<div style = 'line-height: 16px; font-weight: bold; display: block;'>" . _AM_SF_BY . " " . $author_name; +echo "</div>"; +echo "<div style = 'line-height: 16px; display: block;'>" . $versioninfo->getInfo('license') . "</div>\n"; + +// Developers Information +echo "<br /><table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; +echo "<tr>"; +echo "<td colspan='2' class='bg3' align='left'><b>" . _MI_SF_AUTHOR_INFO . "</b></td>"; +echo "</tr>"; + +if ($versioninfo->getInfo('developer_lead') != '') { + echo "<tr>"; + echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_LEAD . "</td>"; + echo "<td class='even' align='left'>" . $versioninfo->getInfo('developer_lead') . "</td>"; + echo "</tr>"; +} +if ($versioninfo->getInfo('developer_contributor') != '') { + echo "<tr>"; + echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_CONTRIBUTOR . "</td>"; + echo "<td class='even' align='left'>" . $versioninfo->getInfo('developer_contributor') . "</td>"; + echo "</tr>"; +} +if ($versioninfo->getInfo('developer_website_url') != '') { + echo "<tr>"; + echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_WEBSITE . "</td>"; + echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('developer_website_url') . "' target='blank'>" . $versioninfo->getInfo('developer_website_name') . "</a></td>"; + echo "</tr>"; +} +if ($versioninfo->getInfo('developer_email') != '') { + echo "<tr>"; + echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_EMAIL . "</td>"; + echo "<td class='even' align='left'><a href='mailto:" . $versioninfo->getInfo('developer_email') . "'>" . $versioninfo->getInfo('developer_email') . "</a></td>"; + echo "</tr>"; +} + + +echo "</table>"; +echo "<br />\n"; +// Module Developpment information +echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; +echo "<tr>"; +echo "<td colspan='2' class='bg3' align='left'><b>" . _MI_SF_MODULE_INFO . "</b></td>"; +echo "</tr>"; + +if ($versioninfo->getInfo('date') != '') { + echo "<tr>"; + echo "<td class='head' width = '200' align='left'>" . _MI_SF_MODULE_RELEASE_DATE . "</td>"; + echo "<td class='even' align='left'>" . $versioninfo->getInfo('date') . "</td>"; + echo "</tr>"; +} + +if ($versioninfo->getInfo('status') != '') { + echo "<tr>"; + echo "<td class='head' width = '200' align='left'>" . _MI_SF_MODULE_STATUS . "</td>"; + echo "<td class='even' align='left'>" . $versioninfo->getInfo('status') . "</td>"; + echo "</tr>"; +} + +if ($versioninfo->getInfo('demo_site_url') != '') { + echo "<tr>"; + echo "<td class='head' align='left'>" . _MI_SF_MODULE_DEMO . "</td>"; + echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('demo_site_url') . "' target='blank'>" . $versioninfo->getInfo('demo_site_name') . "</a></td>"; + echo "</tr>"; +} + +if ($versioninfo->getInfo('support_site_url') != '') { + echo "<tr>"; + echo "<td class='head' align='left'>" . _MI_SF_MODULE_SUPPORT . "</td>"; + echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('support_site_url') . "' target='blank'>" . $versioninfo->getInfo('support_site_name') . "</a></td>"; + echo "</tr>"; +} + +if ($versioninfo->getInfo('submit_bug') != '') { + echo "<tr>"; + echo "<td class='head' align='left'>" . _MI_SF_MODULE_BUG . "</td>"; + echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('submit_bug') . "' target='blank'>" . "Submit a Bug in SmartFAQ Bug Tracker" . "</a></td>"; + echo "</tr>"; +} +if ($versioninfo->getInfo('submit_feature') != '') { + echo "<tr>"; + echo "<td class='head' align='left'>" . _MI_SF_MODULE_FEATURE . "</td>"; + echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('submit_feature') . "' target='blank'>" . "Request a feature in the SmartFAQ Feature Tracker" . "</a></td>"; + echo "</tr>"; +} + +echo "</table>"; +// Warning +if ($versioninfo->getInfo('warning') != '') { + echo "<br />\n"; + echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; + echo "<tr>"; + echo "<td class='bg3' align='left'><b>" . _MI_SF_MODULE_DISCLAIMER . "</b></td>"; + echo "</tr>"; + + echo "<tr>"; + echo "<td class='even' align='left'>" . $versioninfo->getInfo('warning') . "</td>"; + echo "</tr>"; + + echo "</table>"; +} +// Author's note +if ($versioninfo->getInfo('author_word') != '') { + echo "<br />\n"; + echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; + echo "<tr>"; + echo "<td class='bg3' align='left'><b>" . _MI_SF_AUTHOR_WORD . "</b></td>"; + echo "</tr>"; + + echo "<tr>"; + echo "<td class='even' align='left'>" . $versioninfo->getInfo('author_word') . "</td>"; + echo "</tr>"; + + echo "</table>"; +} + +// Version History +if ($versioninfo->getInfo('version_history') != '') { + echo "<br />\n"; + echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; + echo "<tr>"; + echo "<td class='bg3' align='left'><b>" . _MI_SF_VERSION_HISTORY . "</b></td>"; + echo "</tr>"; + + echo "<tr>"; + echo "<td class='even' align='left'>" . $versioninfo->getInfo('version_history') . "</td>"; + echo "</tr>"; + + echo "</table>"; +} + +echo "<br />"; +$modfooter = sf_modFooter(); +echo "<div align='center'>" . $modfooter . "</div>"; +xoops_cp_footer(); + + +?> \ No newline at end of file Added: XoopsModules/smartfaq/releases/1.09/smartfaq/admin/admin.php =================================================================== --- XoopsModules/smartfaq/releases/1.09/smartfaq/admin/admin.php (rev 0) +++ XoopsModules/smartfaq/releases/1.09/smartfaq/admin/admin.php 2012-07-31 11:52:17 UTC (rev 9955) @@ -0,0 +1,154 @@ +<?php +// $Id: admin.php,v 1.3 2005/08/16 15:39:45 fx2024 Exp $ +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// 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. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +// Author: Kazumi Ono (AKA onokazu) // +// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // +// Project: The XOOPS Project // +// ------------------------------------------------------------------------- // +if (!defined("XOOPS_ROOT_PATH")) { + die("XOOPS root path not defined"); +} + +if (isset($HTTP_POST_VARS['fct'])) { + $fct = trim($HTTP_POST_VARS['fct']); +} +if (isset($HTTP_GET_VARS['fct'])) { + $fct = trim($HTTP_GET_VARS['fct']); +} +if (empty($fct)) $fct = 'preferences' ; +include "../../../mainfile.php"; +include XOOPS_ROOT_PATH."/include/cp_functions.php"; + +include_once XOOPS_ROOT_PATH."/class/xoopsmodule.php"; + +$admintest = 0; + +if (is_object($xoopsUser)) { + $xoopsModule =& XoopsModule::getByDirname("system"); + if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + redirect_header(XOOPS_URL.'/user.php',3,_NOPERM); + exit(); + } + $admintest=1; +} else { + redirect_header(XOOPS_URL.'/user.php',3,_NOPERM); + exit(); +} + +// include system category definitions +include_once XOOPS_ROOT_PATH."/modules/system/constants.php"; +$error = false; +if ($admintest != 0) { + if (isset($fct) && $fct != '') { + if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php")) { + + include_once( XOOPS_ROOT_PATH."/modules/system/language/" . $xoopsConfig['language'] . "/admin.php" ) ; + + if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php")) { + include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php"; + } elseif (file_exists(XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php")) { + include XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php"; + } + include XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php"; + $sysperm_handler =& xoops_gethandler('groupperm'); + $category = !empty($modversion['category'])? intval($modversion['category']) : 0; + unset($modversion); + if ($category > 0) { + $groups =& $xoopsUser->getGroups(); + if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $sysperm_handler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))){ + if (file_exists("../include/{$fct}.inc.php")) { + include_once "../include/{$fct}.inc.php" ; + } else { + $error = true; + } + } else { + $error = true; + } + } elseif ($fct == 'version') { + if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/version/main.php")) { + include_once XOOPS_ROOT_PATH."/modules/system/admin/version/main.php"; + } else { + $error = true; + } + } else { + $error = true; + } + } else { + $error = true; + } + } else { + $error = true; + } +} + +if (false != $error) { + xoops_cp_header(); + echo "<h4>System Configuration</h4>"; + echo '<table class="outer" cellpadding="4" cellspacing="1">'; + echo '<tr>'; + $groups = $xoopsUser->getGroups(); + $all_ok = false; + if (!in_array(XOOPS_GROUP_ADMIN, $groups)) { + $sysperm_handler =& xoops_gethandler('groupperm'); + $ok_syscats =& $sysperm_handler->getItemIds('system_admin', $groups); + } else { + $all_ok = true; + } + $admin_dir = XOOPS_ROOT_PATH."/modules/system/admin"; + $handle = opendir($admin_dir); + $counter = 0; + $class = 'even'; + while ($file = readdir($handle)) { + if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir($admin_dir.'/'.$file)) { + include $admin_dir.'/'.$file.'/xoops_version.php'; + if ($modversion['hasAdmin']) { + $category = isset($modversion['category'])? intval($modversion['category']) : 0; + if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) { + echo "<td class='$class' align='center' valign='bottom' width='19%'>"; + echo "<a href='".XOOPS_URL."/modules/system/admin.php?fct=".$file."'><b>" .trim($modversion['name'])."</b></a>\n"; + echo "</td>"; + $counter++; + $class = ($class == 'even')? 'odd' : 'even'; + } + if ( $counter > 4 ) { + $counter = 0; + echo "</tr>"; + echo "<tr>"; + } + } + unset($modversion); + } + } + while ($counter < 5) { + echo '<td class="'.$class.'"> </td>'; + $class = ($class == 'even')? 'odd' : 'even'; + $counter++; + } + echo '</tr></table>'; + xoops_cp_footer(); +} + +?> \ No newline at end of file Added: XoopsModules/smartfaq/releases/1.09/smartfaq/admin/admin_header.php =================================================================== --- XoopsModules/smartfaq/releases/1.09/smartfaq/admin/admin_header.php (rev 0) +++ XoopsModules/smartfaq/releases/1.09/smartfaq/admin/admin_header.php 2012-07-31 11:52:17 UTC (rev 9955) @@ -0,0 +1,25 @@ +<?php + +/** +* $Id: admin_header.php,v 1.5 2004/11/20 16:52:32 malanciault Exp $ +* Module: SmartFAQ +* Author: The SmartFactory <www.smartfactory.ca> +* Licence: GNU +*/ + +include_once "../../../mainfile.php"; +include_once '../../../include/cp_header.php'; +include_once XOOPS_ROOT_PATH . "/class/xoopsmodule.php"; +include_once XOOPS_ROOT_PATH . "/class/xoopstree.php"; +include_once XOOPS_ROOT_PATH . "/class/xoopslists.php"; +include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; +include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; + +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/category.php'; +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/faq.php'; +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/answer.php'; + +$myts = &MyTextSanitizer::getInstance(); + +?> \ No newline at end of file Added: XoopsModules/smartfaq/releases/1.09/smartfaq/admin/answer.php =================================================================== --- XoopsModules/smartfaq/releases/1.09/smartfaq/admin/answer.php (rev 0) +++ XoopsModules/smartfaq/releases/1.09/smartfaq/admin/answer.php 2012-07-31 11:52:17 UTC (rev 9955) @@ -0,0 +1,277 @@ +<?php + +/** +* $Id: answer.php,v 1.17 2005/08/15 16:51:57 fx2024 Exp $ +* Module: SmartFAQ +* Author: The SmartFactory <www.smartfactory.ca> +* Licence: GNU +*/ + +include_once("admin_header.php"); + +$op = ''; + +// Getting the operation we are doing +if (isset($_GET['op'])) $op = $_GET['op']; +if (isset($_POST['op'])) $op = $_POST['op']; + +// Creating the answer handler object +$answer_handler =& sf_gethandler('answer'); + +function editfaq($faqid = '') +{ + + global $answer_handler, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $XOOPS_URL, $myts; + + include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + + // Creating the FAQ object + $faqObj = new sfFaq($faqid); + + // Creating the category object + $categoryObj =& $faqObj->category(); + + if ($faqObj->notLoaded()) { + redirect_header("index.php", 1, _AM_SF_NOFAQSELECTED); + exit(); + } + + switch ($faqObj->status()) { + + case _SF_STATUS_ANSWERED : + $breadcrumb_action1 = _AM_SF_SUBMITTED; + $breadcrumb_action2 = _AM_SF_APPROVING; + $collapsableBar_title = _AM_SF_SUBMITTED_TITLE; + $collapsableBar_info = _AM_SF_SUBMITTED_INFO; + $button_caption = _AM_SF_APPROVE; + $an_status = _SF_AN_STATUS_PROPOSED; + break; + + } + + $module_id = $xoopsModule->getVar('mid'); + $gperm_handler = &xoops_gethandler('groupperm'); + $groups = ($xoopsUser)? ($xoopsUser->getGroups()) : XOOPS_GROUP_ANONYMOUS; + + if (!sf_userIsAdmin() && (!($gperm_handler->checkRight('category_admin', $faqObj->categoryid(), $groups, $module_id)))) { + redirect_header("javascript:history.go(-1)", 1, _NOPERM); + exit; + } + // Retreiving the official answer + $official_answer = $faqObj->answer(); + + sf_adminMenu(-1, _AM_SF_SMARTFAQ . " > " . _AM_SF_ANSWER); + + sf_collapsableBar('bottomtable', 'bottomtableicon'); + echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/close12.gif alt='' /></a> " . _AM_SF_SUBMITTED_ANSWER . "</h3>"; + echo "<div id='bottomtable'>"; + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_SF_SUBMITTED_ANSWER_INFO . "</span>"; + + $proposed_answers = $answer_handler->getAllAnswers($faqid, _SF_AN_STATUS_PROPOSED); + + if (count($proposed_answers) == 0) { + redirect_header("index.php", 1, _AM_SF_NOANSWERS); + exit(); + } + + echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer> + <tr> + <td class='head' width='100px'>" . _AM_SF_CATEGORY . "</td> + <td class='even'>" . $categoryObj->name() . "</td> + </tr> + <tr> + <td class='head' width='100px'>" . _AM_SF_QUESTION . "</td> + <td class='even'>" . $faqObj->question() . "</td> + </tr>"; + if ($official_answer) { + echo " + <tr> + <td class='head' width='100px'>" . _AM_SF_ANSWER_OFFICIAL . "</td> + <td class='even'>" . $official_answer->answer() . "</td> + </tr>"; + } + echo "</table><br />\n"; + + echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; + echo "<tr>"; + echo "<td width='40' class='bg3' align='center'><b>" . _AM_SF_ARTID . "</b></td>"; + echo "<td class='bg3' class='bg3' align='center'><b>" . _AM_SF_ANSWER . "</b></td>"; + echo "<td width='180' class='bg3' align='center'><b>" . _AM_SF_CREATED . "</b></td>"; + echo "<td width='120' class='bg3' align='center'><b>" . _AM_SF_ACTION . "</b></td>"; + echo "</tr>"; + + $merge = ''; + $modify = ''; + $approve = ''; + foreach ($proposed_answers as $proposed_answer) { + if ($faqObj->status() == _SF_STATUS_NEW_ANSWER) { + $merge = "<a href='faq.php?op=merge&faqid=" . $faqObj->faqid() . "&answerid=" . $proposed_answer->answerid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/merge.gif' title='" . _AM_SF_FAQ_MERGE . "' alt='" . _AM_SF_FAQ_MERGE . "' /></a> "; + $approve = "<a href='answer.php?op=selectanswer&faqid=" . $faqid . "&answerid=" . $proposed_answer->answerid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/approve.gif' title='" . _AM_SF_FAQ_APPROVE_NEW_ANSWER . "' alt='" . _AM_SF_APPROVESUB . "' /></a>"; + } + $modify = "<a href='faq.php?op=mod&faqid=" . $faqObj->faqid() . "&answerid=" . $proposed_answer->answerid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/edit.gif' title='" . _AM_SF_FAQ_REVIEW . "' alt='" . _AM_SF_FAQ_REVIEW . "' /></a> "; + $delete = "<a href='answer.php?op=del&faqid=" . $faqObj->faqid() . "&answerid=" . $proposed_answer->answerid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/delete.gif' title='" . _AM_SF_DELETESUBM . "' alt='" . _AM_SF_DELETESUBM . "' /></a>"; + echo "<tr>"; + echo "<td class='head' align='center'>" . $proposed_answer->answerid(). "</td>"; + echo "<td class='even' align='left'>" . $proposed_answer->answer() . "</td>"; + echo "<td class='even' align='center'>" . $proposed_answer->datesub() . "</td>"; + echo "<td class='even' align='center'> $merge $modify $approve $delete </td>"; + echo "</tr>"; + } + + echo "</table>\n<br />"; +} + +/* -- Available operations -- */ +switch ($op) { + case "mod": + xoops_cp_header(); + include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; + Global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule, $modify, $myts; + $faqid = isset($_GET['faqid'])? intval($_GET['faqid']) : 0; + editfaq($faqid); + break; + + case "selectanswer": + global $xoopsUser, $_GET, $xoopsModuleConfig; + + $faqid = isset($_GET['faqid'])? intval($_GET['faqid']) : 0; + $answerid = isset($_GET['answerid'])? intval($_GET['answerid']) : 0; + + // Creating the FAQ object + $faqObj = new sfFaq($faqid); + + if ($faqObj->notLoaded()) { + redirect_header("index.php", 1, _AM_SF_NOFAQSELECTED); + exit(); + } + + // Creating the answer object + $answerObj = new sfAnswer($answerid); + + if ($answerObj->notLoaded()) { + redirect_header("index.php", 1, _AM_SF_NOFAQSELECTED); + exit(); + } + + $answerObj->setVar('status', _SF_AN_STATUS_APPROVED); + + $notifToDo_answer = null; + $notifToDo_faq = null; + + switch ($faqObj->status()) + { + // This was an Open Question that became a Submitted FAQ + case _SF_STATUS_ANSWERED : + if ( $xoopsModuleConfig['autoapprove_submitted_faq'] == 1) { + // We automatically approve Submitted Q&A + $redirect_msg = _AM_SF_ANSWER_APPROVED_PUBLISHED; + $faqObj->setVar('status', _SF_STATUS_PUBLISHED); + $answerObj->setVar('status', _SF_AN_STATUS_APPROVED); + $notifToDo_faq = array(_SF_NOT_FAQ_PUBLISHED); + } else { + // Submitted Q&A need approbation + $redirect_msg = _AM_SF_ANSWER_APPROVED_NEED_APPROVED; + $faqObj->setVar('status', _SF_STATUS_SUBMITTED); + $answerObj->setVar('status', _SF_AN_STATUS_APPROVED); + $notifToDo_faq = array(_SF_NOT_FAQ_SUBMITTED); + } + break; + + // This is a published FAQ for which a user submitted a new answer and we just accepeted one + case _SF_STATUS_NEW_ANSWER : + $redirect_msg = _AM_SF_FAQ_NEW_ANSWER_PUBLISHED; + $faqObj->setVar('status', _SF_STATUS_PUBLISHED); + $answerObj->setVar('status', _SF_AN_STATUS_APPROVED); + $notifToDo_answer = array(_SF_NOT_ANSWER_APPROVED); + break; + } + + // Storing the FAQ object in the database + if ( !$faqObj->store() ) { + redirect_header("javascript:history.go(-1)", 2, _AM_SF_ERROR_FAQ_NOT_SAVED); + exit(); + } + + // Storing the answer object in the database + if ( !$answerObj->store() ) { + redirect_header("javascript:history.go(-1)", 2, _AM_SF_ERROR_ANSWER_NOT_SAVED); + exit(); + } + + // Send FAQ notifications + if (!empty($notifToDo_faq)) { + $faqObj->sendNotifications($notifToDo_faq); + } + + // Send answer notifications + if (!empty($notifToDo_answer)) { + $answerObj->sendNotifications($notifToDo_answer); + } + + + redirect_header("index.php", 2, $redirect_msg); + exit(); + break; + + case "del": + Global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB; + + $faqid = isset($_POST['faqid'])? intval($_POST['faqid']) : 0; + $faqid = isset($_GET['faqid'])? intval($_GET['faqid']) : $faqid; + $answerid = isset($_POST['answerid'])? intval($_POST['answerid']) : 0; + $answerid = isset($_GET['answerid'])? intval($_GET['answerid']) : $answerid; + $confirm = isset($_POST['confirm'])? intval($_POST['confirm']) : 0; + $faqObj = new sfFaq($faqid); + $answerObj = new sfAnswer($answerid); + if ($confirm) { + $answerObj->setVar('status', _SF_AN_STATUS_REJECTED); + $answerObj->store(); + + switch ($faqObj->status()) { + // Open Question for which we are rejecting an answer + case _SF_STATUS_ANSWERED : + $redirect_page = "index.php"; + $redirect_msg = _AM_SF_ANSWER_REJECTED_OPEN_QUESTION; + $faqObj->setVar('status', _SF_STATUS_OPENED); + break; + + case _SF_STATUS_NEW_ANSWER : + $proposed_answers = $answer_handler->getAllAnswers($faqid, _SF_AN_STATUS_PROPOSED); + if (count($proposed_answers) > 0) { + // This question has other proposed answer + $redirect_page = "answer.php?op=mod&faqid=" . $faqid; + $redirect_msg = _AM_SF_ANSWER_REJECTED; + } else { + // The question has no other proposed answer + $redirect_page = "index.php"; + $redirect_msg = _AM_SF_ANSWER_REJECTED; + $faqObj->setVar('status', _SF_STATUS_PUBLISHED); + } + break; + } + $faqObj->store(); + redirect_header($redirect_page, 3, $redirect_msg); + exit(); + } else { + xoops_cp_header(); + xoops_confirm(array('op' => 'del', 'answerid' => $answerid, 'confirm' => 1, 'faqid' => $faqid), 'answer.php', _AM_SF_DELETETHISANSWER, _AM_SF_DELETE); + xoops_cp_footer(); + } + exit(); + break; + + case "default": + default: + xoops_cp_header(); + + include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; + global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule; + + editfaq(); + break; +} +$modfooter = sf_modFooter(); +echo "<div align='center'>" . $modfooter . "</div>"; +xoops_cp_footer(); + +?> Added: XoopsModules/smartfaq/releases/1.09/smartfaq/admin/category.php =================================================================== --- XoopsModules/smartfaq/releases/1.09/smartfaq/admin/category.php (rev 0) +++ XoopsModules/smartfaq/releases/1.09/smartfaq/admin/category.php 2012-07-31 11:52:17 UTC (rev 9955) @@ -0,0 +1,365 @@ +<?php + +/** +* $Id: category.php,v 1.24 2006/08/21 13:30:32 malanciault Exp $ +* Module: SmartFAQ +* Author: The SmartFactory <www.smartfactory.ca> +* Licence: GNU +*/ + +include_once("admin_header.php"); + +// Creating the category handler object +$category_handler =& sf_gethandler('category'); + +$op = ''; + +if (isset($_GET['op'])) $op = $_GET['op']; +if (isset($_POST['op'])) $op = $_POST['op']; + +// Where do we start? +$startcategory = isset($_GET['startcategory'])? intval($_GET['startcategory']) : 0; + +function displayCategory($categoryObj, $level = 0) +{ + Global $xoopsModule, $category_handler; + $description = $categoryObj->description(); + if (!XOOPS_USE_MULTIBYTES) { + if (strlen($description) >= 100) { + $description = substr($description, 0, (100 -1)) . "..."; + } + } + $modify = "<a href='category.php?op=mod&categoryid=" . $categoryObj->categoryid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/edit.gif' title='" . _AM_SF_EDITCOL . "' alt='" . _AM_SF_EDITCOL . "' /></a>"; + $delete = "<a href='category.php?op=del&categoryid=" . $categoryObj->categoryid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/delete.gif' title='" . _AM_SF_DELETECOL . "' alt='" . _AM_SF_DELETECOL . "' /></a>"; + + $spaces = ''; + for ( $j = 0; $j < $level; $j++ ) { + $spaces .= ' '; + } + + echo "<tr>"; + echo "<td class='even' align='lefet'>" . $spaces . "<a href='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/category.php?categoryid=" . $categoryObj->categoryid() . "'><img src='" . XOOPS_URL . "/modules/smartfaq/images/icon/subcat.gif' alt='' /> " . $categoryObj->name() . "</a></td>"; + echo "<td class='even' align='left'>" . $description . "</td>"; + echo "<td class='even' align='center'>" . $categoryObj->weight() . "</td>"; + echo "<td class='even' align='center'> $modify $delete </td>"; + echo "</tr>"; + $subCategoriesObj = $category_handler->getCate... [truncated message content] |