From: <be...@us...> - 2012-04-03 06:08:44
|
Revision: 9259 http://xoops.svn.sourceforge.net/xoops/?rev=9259&view=rev Author: beckmi Date: 2012-04-03 06:08:35 +0000 (Tue, 03 Apr 2012) Log Message: ----------- Merging Zyspec's version into trunk Modified Paths: -------------- XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/about.php XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/admin_header.php XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/category.php XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/contentsform.php XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/index.php XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/menu.php XoopsModules/xoopsfaq/trunk/xoopsfaq/class/category.php XoopsModules/xoopsfaq/trunk/xoopsfaq/class/contents.php XoopsModules/xoopsfaq/trunk/xoopsfaq/docs/changelog.txt XoopsModules/xoopsfaq/trunk/xoopsfaq/docs/readme.txt XoopsModules/xoopsfaq/trunk/xoopsfaq/include/functions.php XoopsModules/xoopsfaq/trunk/xoopsfaq/include/search.inc.php XoopsModules/xoopsfaq/trunk/xoopsfaq/language/english/admin.php XoopsModules/xoopsfaq/trunk/xoopsfaq/language/english/main.php XoopsModules/xoopsfaq/trunk/xoopsfaq/language/english/modinfo.php XoopsModules/xoopsfaq/trunk/xoopsfaq/language/schinese_utf8/admin.php XoopsModules/xoopsfaq/trunk/xoopsfaq/language/schinese_utf8/main.php XoopsModules/xoopsfaq/trunk/xoopsfaq/templates/xoopsfaq_category.html XoopsModules/xoopsfaq/trunk/xoopsfaq/templates/xoopsfaq_index.html Added Paths: ----------- XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/ XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/admin_footer.php XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/main.php XoopsModules/xoopsfaq/trunk/xoopsfaq/blocks/ XoopsModules/xoopsfaq/trunk/xoopsfaq/blocks/index.html XoopsModules/xoopsfaq/trunk/xoopsfaq/blocks/xoopsfaq_rand.php XoopsModules/xoopsfaq/trunk/xoopsfaq/class/ XoopsModules/xoopsfaq/trunk/xoopsfaq/comment_delete.php XoopsModules/xoopsfaq/trunk/xoopsfaq/comment_edit.php XoopsModules/xoopsfaq/trunk/xoopsfaq/comment_new.php XoopsModules/xoopsfaq/trunk/xoopsfaq/comment_post.php XoopsModules/xoopsfaq/trunk/xoopsfaq/comment_reply.php XoopsModules/xoopsfaq/trunk/xoopsfaq/css/ XoopsModules/xoopsfaq/trunk/xoopsfaq/css/index.html XoopsModules/xoopsfaq/trunk/xoopsfaq/docs/ XoopsModules/xoopsfaq/trunk/xoopsfaq/footer.php XoopsModules/xoopsfaq/trunk/xoopsfaq/header.php XoopsModules/xoopsfaq/trunk/xoopsfaq/images/ XoopsModules/xoopsfaq/trunk/xoopsfaq/include/ XoopsModules/xoopsfaq/trunk/xoopsfaq/include/rss.inc.php XoopsModules/xoopsfaq/trunk/xoopsfaq/index.php XoopsModules/xoopsfaq/trunk/xoopsfaq/language/ XoopsModules/xoopsfaq/trunk/xoopsfaq/language/english/blocks.php XoopsModules/xoopsfaq/trunk/xoopsfaq/language/english/help/ XoopsModules/xoopsfaq/trunk/xoopsfaq/language/english/help/help.html XoopsModules/xoopsfaq/trunk/xoopsfaq/language/english/help/index.html XoopsModules/xoopsfaq/trunk/xoopsfaq/language/schinese_utf8/blocks.php XoopsModules/xoopsfaq/trunk/xoopsfaq/language/schinese_utf8/help/ XoopsModules/xoopsfaq/trunk/xoopsfaq/language/schinese_utf8/help/help.html XoopsModules/xoopsfaq/trunk/xoopsfaq/language/schinese_utf8/help/index.html XoopsModules/xoopsfaq/trunk/xoopsfaq/language/schinese_utf8/modinfo.php XoopsModules/xoopsfaq/trunk/xoopsfaq/sql/ XoopsModules/xoopsfaq/trunk/xoopsfaq/templates/ XoopsModules/xoopsfaq/trunk/xoopsfaq/templates/blocks/ XoopsModules/xoopsfaq/trunk/xoopsfaq/templates/blocks/index.html XoopsModules/xoopsfaq/trunk/xoopsfaq/templates/blocks/xoopsfaq_block_rand.html XoopsModules/xoopsfaq/trunk/xoopsfaq/xoops_version.php Removed Paths: ------------- XoopsModules/xoopsfaq/trunk/admin/ XoopsModules/xoopsfaq/trunk/class/ XoopsModules/xoopsfaq/trunk/comment_delete.php XoopsModules/xoopsfaq/trunk/comment_edit.php XoopsModules/xoopsfaq/trunk/comment_new.php XoopsModules/xoopsfaq/trunk/comment_post.php XoopsModules/xoopsfaq/trunk/comment_reply.php XoopsModules/xoopsfaq/trunk/css/ XoopsModules/xoopsfaq/trunk/docs/ XoopsModules/xoopsfaq/trunk/footer.php XoopsModules/xoopsfaq/trunk/header.php XoopsModules/xoopsfaq/trunk/images/ XoopsModules/xoopsfaq/trunk/include/ XoopsModules/xoopsfaq/trunk/index.php XoopsModules/xoopsfaq/trunk/language/ XoopsModules/xoopsfaq/trunk/sql/ XoopsModules/xoopsfaq/trunk/templates/ XoopsModules/xoopsfaq/trunk/xoops_version.php XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/footer1.php XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/header1.php XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/help.php XoopsModules/xoopsfaq/trunk/xoopsfaq/css/admin.css XoopsModules/xoopsfaq/trunk/xoopsfaq/images/admin/ XoopsModules/xoopsfaq/trunk/xoopsfaq/images/delete.png XoopsModules/xoopsfaq/trunk/xoopsfaq/images/docs.gif XoopsModules/xoopsfaq/trunk/xoopsfaq/images/edit.png XoopsModules/xoopsfaq/trunk/xoopsfaq/images/folder.gif XoopsModules/xoopsfaq/trunk/xoopsfaq/images/icons/ XoopsModules/xoopsfaq/trunk/xoopsfaq/images/left_both.gif XoopsModules/xoopsfaq/trunk/xoopsfaq/images/microbutton.gif XoopsModules/xoopsfaq/trunk/xoopsfaq/images/modadminbg.gif XoopsModules/xoopsfaq/trunk/xoopsfaq/images/right_both.gif XoopsModules/xoopsfaq/trunk/xoopsfaq/images/xoopsmicrobutton.gif XoopsModules/xoopsfaq/trunk/xoopsfaq/language/english/help.php XoopsModules/xoopsfaq/trunk/xoopsfaq/templates/admin/ XoopsModules/xoopsfaq/trunk/xoopsfaq/templates/css/ Deleted: XoopsModules/xoopsfaq/trunk/comment_delete.php =================================================================== --- XoopsModules/xoopsfaq/trunk/comment_delete.php 2012-04-03 05:57:27 UTC (rev 9258) +++ XoopsModules/xoopsfaq/trunk/comment_delete.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -1,26 +0,0 @@ -<?php -/** - * Name: comment_delete.php - * Description: Delete Comments file - * - * 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 : XOOPS - * @Module : Xoops FAQ - * @subpackage : Comments - * @since 2.3.0 - * @author John Neill - * @version $Id$ - */ - -include dirname( dirname( dirname( __FILE__ ) ) ) . DIRECTORY_SEPARATOR . 'mainfile.php'; -include XOOPS_ROOT_PATH . '/include/comment_delete.php'; - -?> \ No newline at end of file Deleted: XoopsModules/xoopsfaq/trunk/comment_edit.php =================================================================== --- XoopsModules/xoopsfaq/trunk/comment_edit.php 2012-04-03 05:57:27 UTC (rev 9258) +++ XoopsModules/xoopsfaq/trunk/comment_edit.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -1,25 +0,0 @@ -<?php -/** - * Name: comment_edit.php - * Description: - * - * 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 : XOOPS - * @Module : Core Comments - * @subpackage : comnents - * @since 2.3.0 - * @author John Neill - * @version $Id$ - */ -include dirname( dirname( dirname( __FILE__ ) ) ) . DIRECTORY_SEPARATOR . 'mainfile.php'; -include XOOPS_ROOT_PATH . '/include/comment_edit.php'; - -?> \ No newline at end of file Deleted: XoopsModules/xoopsfaq/trunk/comment_new.php =================================================================== --- XoopsModules/xoopsfaq/trunk/comment_new.php 2012-04-03 05:57:27 UTC (rev 9258) +++ XoopsModules/xoopsfaq/trunk/comment_new.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -1,26 +0,0 @@ -<?php -/** - * Name: comment_new.php - * Description: - * - * 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 : XOOPS - * @Module : Core Comments - * @subpackage : comnents - * @since 2.3.0 - * @author John Neill - * @version $Id$ - */ -include dirname( dirname( dirname( __FILE__ ) ) ) . DIRECTORY_SEPARATOR . 'mainfile.php'; - -include XOOPS_ROOT_PATH . '/include/comment_new.php'; - -?> \ No newline at end of file Deleted: XoopsModules/xoopsfaq/trunk/comment_post.php =================================================================== --- XoopsModules/xoopsfaq/trunk/comment_post.php 2012-04-03 05:57:27 UTC (rev 9258) +++ XoopsModules/xoopsfaq/trunk/comment_post.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -1,26 +0,0 @@ -<?php -/** - * Name: comment_post.php - * Description: - * - * 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 : XOOPS - * @Module : Core Comments - * @subpackage : comnents - * @since 2.3.0 - * @author John Neill - * @version $Id$ - */ -include dirname( dirname( dirname( __FILE__ ) ) ) . DIRECTORY_SEPARATOR . 'mainfile.php'; - -include XOOPS_ROOT_PATH . '/include/comment_post.php'; - -?> \ No newline at end of file Deleted: XoopsModules/xoopsfaq/trunk/comment_reply.php =================================================================== --- XoopsModules/xoopsfaq/trunk/comment_reply.php 2012-04-03 05:57:27 UTC (rev 9258) +++ XoopsModules/xoopsfaq/trunk/comment_reply.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -1,25 +0,0 @@ -<?php -/** - * Name: comment_reply.php - * Description: Comments for reply - * - * 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 : XOOPS - * @Module : Core Comments - * @subpackage : comnents - * @since 2.3.0 - * @author John Neill - * @version $Id$ - */ -include dirname( dirname( dirname( __FILE__ ) ) ) . DIRECTORY_SEPARATOR . 'mainfile.php'; -include XOOPS_ROOT_PATH . '/include/comment_reply.php'; - -?> \ No newline at end of file Deleted: XoopsModules/xoopsfaq/trunk/footer.php =================================================================== --- XoopsModules/xoopsfaq/trunk/footer.php 2012-04-03 05:57:27 UTC (rev 9258) +++ XoopsModules/xoopsfaq/trunk/footer.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -1,31 +0,0 @@ -<?php -/** - * Name: footer.php - * Description: Footer for Xoops FAQ - * - * 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 : XOOPS - * @Module : Xoops FAQ - * @subpackage : - * @since 2.3.0 - * @author John Neill - * @version $Id$ - */ -defined( 'XOOPS_ROOT_PATH' ) or die( 'Restricted access' ); - -/** - * Module specific tpl inclides - */ -$xoops_module_header = '<link rel="stylesheet" type="text/css" href="' . XOOPS_URL . '/modules/' . $GLOBALS['xoopsModule']->getVar( 'dirname' ) . '/templates/css/module.css" />'; -$xoopsTpl->assign( 'xoops_module_header', $xoops_module_header ); -include_once XOOPS_ROOT_PATH . '/footer.php'; - -?> \ No newline at end of file Deleted: XoopsModules/xoopsfaq/trunk/header.php =================================================================== --- XoopsModules/xoopsfaq/trunk/header.php 2012-04-03 05:57:27 UTC (rev 9258) +++ XoopsModules/xoopsfaq/trunk/header.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -1,26 +0,0 @@ -<?php -/** - * Name: header.php - * Description: Header file - * - * 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 : XOOPS - * @Module : Xoops FAQ - * @subpackage : - * @since 2.3.0 - * @author John Neill - * @version $Id$ - */ -include dirname( dirname( dirname( __FILE__ ) ) ) . DIRECTORY_SEPARATOR . 'mainfile.php'; - -require_once XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->getVar( 'dirname' ) . '/include/functions.php'; - -?> \ No newline at end of file Deleted: XoopsModules/xoopsfaq/trunk/index.php =================================================================== --- XoopsModules/xoopsfaq/trunk/index.php 2012-04-03 05:57:27 UTC (rev 9258) +++ XoopsModules/xoopsfaq/trunk/index.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -1,73 +0,0 @@ -<?php -/** - * Name: index.php - * Description: Dispaly user side code, categories and faq answers - * - * 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 : XOOPS - * @Module : Xoops FAQ - * @subpackage : User side code - * @since 2.3.0 - * @author John Neill - * @version $Id$ - */ -include_once 'header.php'; - -$category_handler = &xoops_getModuleHandler( 'category' ); -$content_handler = &xoops_getModuleHandler( 'contents' ); - -$cat_id = xoopsFaq_CleanVars( $_GET, 'cat_id', 0, 'int' ); -if ( $cat_id < 1 ) { - $xoopsOption['template_main'] = 'xoopsfaq_index.html'; - include_once XOOPS_ROOT_PATH . '/header.php'; - /** - * Display Categories and a list of Answers Max 10 - */ - $objects = $category_handler->getObj(); - if ( $objects['count'] > 0 ) { - foreach( $objects['list'] as $object ) { - $category = array(); - $category['id'] = $object->getVar( 'category_id' ); - $category['name'] = $object->getVar( 'category_title' ); - $contentsObj = $content_handler->getPublished( $object->getVar( 'category_id' ) ); - if ( $contentsObj['count'] ) { - foreach( $contentsObj['list'] as $content ) { - $category['questions'][] = array( 'link' => $content->getVar( 'contents_id' ), 'title' => $content->getVar( 'contents_title' ) ); - } - } - $xoopsTpl->append_by_ref( 'categories', $category ); - unset( $category ); - } - } -} else { - $xoopsOption['template_main'] = 'xoopsfaq_category.html'; - include_once XOOPS_ROOT_PATH . '/header.php'; - /** - * Display answers to a specific category - */ - $category = $category_handler->get( $cat_id ); - $xoopsTpl->assign( 'category_name', $category->getVar( 'category_title' ) ); - - $contentsObj = $content_handler->getPublished( $cat_id ); - if ( $contentsObj['count'] ) { - foreach( $contentsObj['list'] as $obj ) { - $question['title'] = $obj->getVar( 'contents_title' ); - $question['id'] = $obj->getVar( 'contents_id' ); - $question['answer'] = $obj->getVar( 'contents_contents' ); - $xoopsTpl->append( 'questions', $question ); - } - } - include XOOPS_ROOT_PATH . '/include/comment_view.php'; -} - -include 'footer.php'; - -?> \ No newline at end of file Deleted: XoopsModules/xoopsfaq/trunk/xoops_version.php =================================================================== --- XoopsModules/xoopsfaq/trunk/xoops_version.php 2012-04-03 05:57:27 UTC (rev 9258) +++ XoopsModules/xoopsfaq/trunk/xoops_version.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -1,131 +0,0 @@ -<?php -/** - * Name: xoops_version.php - * Description: - * - * 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 : XOOPS - * @Module : - * @subpackage : - * @since 2.3.0 - * @author John Neill - * @version $Id$ - */ - -defined( 'XOOPS_ROOT_PATH' ) or die( 'Restricted access' ); - -$module_dirname = basename( dirname( __FILE__ ) ) ; - -/** - * Module configs - */ -$modversion = array( 'name' => _XO_MIF_XOOPSFAQ_NAME, - 'description' => _XO_MIF_XOOPSFAQ_DESC, - 'author' => 'John Neill, Kazumi Ono', - 'license' => 'GPL see LICENSE', - 'contributors' => '', - 'credits' => 'The Xoops Module Development Team', - 'version' => 1.22, - 'status' => 'Final', - 'releasedate' => '24 Feb. 2011', - 'official' => 1, - 'image' => 'images/slogo.png', - 'website_url' => 'http://www.xoops.org', - 'dirname' => basename( dirname( __FILE__ ) ), - - //about - "demo_site_url" => "", - "demo_site_name" => "", - "module_website_url" => "http://xoops.org", - "module_website_name" => "XOOPS", - "module_release" => "24 Feb. 2011", - "module_status" => "Final" - ); - -/** - * Module Sql - */ -$modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; - -/** - * Module SQL Tables - */ -$modversion['tables'] = array( 'xoopsfaq_contents', 'xoopsfaq_categories' ) ; - -/** - * Module Admin - */ -$modversion['hasAdmin'] = 1; -$modversion['adminindex'] = 'admin/index.php'; -$modversion['adminmenu'] = 'admin/menu.php'; - -// Admin menu -// Set to 1 if you want to display menu generated by system module -$modversion['system_menu'] = 1; - -/** - * Module Main - */ -$modversion['hasMain'] = 1; - -/** - * Module Search - */ -$modversion['hasSearch'] = 1; -$modversion['search']['file'] = 'include/search.inc.php'; -$modversion['search']['func'] = 'xoopsfaq_search'; - -/** - * Module Templates - */ -// $modversion['templates'][] = array( 'file' => 'xoopsfaq_index.html', 'description' => '' ); -// $modversion['templates'][] = array( 'file' => 'xoopsfaq_category.html', 'description' => '' ); - -$i = 1; - -$modversion["templates"][$i]["file"] = $module_dirname . "_index.html"; -$modversion["templates"][$i]["description"] = ""; -$i++; -$modversion["templates"][$i]["file"] = $module_dirname . "_category.html"; -$modversion["templates"][$i]["description"] = ""; -$i++; -$modversion["templates"][$i]["file"] = "admin/" . $module_dirname . "_admin_about.html"; -$modversion["templates"][$i]["description"] = ""; -$i++; -$modversion["templates"][$i]["file"] = "admin/" . $module_dirname . "_admin_help.html"; -$modversion["templates"][$i]["description"] = ""; - - - -/** - * Module Comments - */ -// $modversion['hasComments'] = 1; -// $modversion['comments'][] = array( 'pageName' => 'index.php', 'itemName' => 'cat_id' ); - -// Comments -$modversion['hasComments'] = 1; -$modversion['comments']['itemName'] = 'cat_id'; -$modversion['comments']['pageName'] = 'index.php'; - -/** - * Module configs - */ -$modversion['config'][] = array( 'name' => 'use_wysiwyg', - 'title' => '_XO_MIF_XOOPSFAQ_EDITORS', - 'description' => '_XO_MIF_XOOPSFAQ_EDITORS_DSC', - 'formtype' => 'select', - 'valuetype' => 'text', - 'default' => 'dhtmltextarea', - 'options' => array( 'Plain Editor' => 'textarea', 'XoopsEditor' => 'dhtmltextarea', 'TinyMCE' => 'tinymce', 'CK Editor' => 'ckeditor' ) - ); - -?> \ No newline at end of file Modified: XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/about.php =================================================================== --- XoopsModules/xoopsfaq/trunk/admin/about.php 2012-03-30 14:31:56 UTC (rev 9215) +++ XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/about.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -1,6 +1,7 @@ <?php /** - * Slideshow module + * XoopsFAQ module + * Description: Category Admin file * * 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 @@ -9,42 +10,22 @@ * 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 Marquee - * @since 2.5.0 - * @author kris <http://www.xoofoo.org> - dugris <http://dugris.info> - * @version $Id $ -**/ + * @copyright:: The XOOPS Project (http://www.xoops.org) + * @license:: {@link http://www.fsf.org/copyleft/gpl.html GNU public license} + * @package:: xoopsfaq + * @subpackage:: admin + * @since:: 1.23 + * @author:: Mage, Mamba + * @version:: $Id $ + **/ -include "header1.php"; + include_once dirname(__FILE__) . '/admin_header.php'; -$module_info =& $module_handler->get( $xoopsModule->getVar("mid") ); +xoops_cp_header(); -$xoopsTpl->assign("module_name", $xoopsModule->getVar("name") ); -$xoopsTpl->assign("module_dirname", $xoopsModule->getVar("dirname") ); -$xoopsTpl->assign("module_image", $module_info->getInfo("image") ); -$xoopsTpl->assign("module_version", $module_info->getInfo("version") ); -$xoopsTpl->assign("module_description", $module_info->getInfo("description") ); -//$xoopsTpl->assign("module_release", $module_info->getInfo("release") ); -$xoopsTpl->assign("module_author", $module_info->getInfo("author") ); -$xoopsTpl->assign("module_credits", $module_info->getInfo("credits") ); -$xoopsTpl->assign("module_license_url", $module_info->getInfo("license_url") ); -$xoopsTpl->assign("module_license", $module_info->getInfo("license") ); -$xoopsTpl->assign("module_status", $module_info->getInfo("module_status") ); -$xoopsTpl->assign("module_website_url", $module_info->getInfo("module_website_url") ); -$xoopsTpl->assign("module_website_name", $module_info->getInfo("module_website_name") ); -$xoopsTpl->assign("author_website_url", $module_info->getInfo("author_website_url") ); -$xoopsTpl->assign("author_website_name", $module_info->getInfo("author_website_name") ); +$aboutAdmin = new ModuleAdmin(); -global $xoopsModule; -$xoopsTpl->assign("module_update_date", formatTimestamp($xoopsModule->getVar("last_update"),"m") ); +echo $aboutAdmin->addNavigation('about.php'); +echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); -if ( is_readable( $changelog = XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/docs/changelog.txt" ) ){ - $xoopsTpl->assign("changelog", implode("<br />", file( $changelog ) ) ); -} - -$xoopsTpl->display("db: admin/" . $xoopsModule->getVar("dirname") . "_admin_about.html"); - -include "footer1.php"; -?> \ No newline at end of file +include 'admin_footer.php'; \ No newline at end of file Added: XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/admin_footer.php =================================================================== --- XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/admin_footer.php (rev 0) +++ XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/admin_footer.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -0,0 +1,27 @@ +<?php +/** + * XoopsFAQ 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:: {@link http://www.fsf.org/copyleft/gpl.html GNU public license} + * @package:: xoopsfaq + * @since:: 1.23 + * @author:: Magic.Shao <mag...@gm...> - Susheng Yang <ezs...@gm...> + * @version: $Id: admin_footer.php 8571 2011-12-26 22:51:57Z beckmi $ +**/ + +echo "<div class='adminfooter'>\n" + ." <div style='text-align: center;'>\n" + ." <a href='http://www.xoops.org' target='_blank'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" + ." </div>\n" + ." " . _AM_XOOPSFAQ_ADMIN_FOOTER . "\n" + ."</div>"; + +xoops_cp_footer(); \ No newline at end of file Modified: XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/admin_header.php =================================================================== --- XoopsModules/xoopsfaq/trunk/admin/admin_header.php 2012-03-30 14:31:56 UTC (rev 9215) +++ XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/admin_header.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -1,19 +1,48 @@ -<?php -/** - * Name: admin_header.php - * Description: Admin header for Xoops FAQ Module - * - * @package : Xoops Modules - * @Module : Xoops FAQ Module - * @subpackage : Administration - * @since : v1.0.0 - * @author John Neill <cat...@xo...> - * @copyright : Copyright (C) 2009 Xoops. All rights reserved. - * @license : GNU/GPL, see docs/license.txt - * @version : $Id$ - */ -include dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/include/cp_header.php'; - -require_once XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->getVar( 'dirname' ) . '/include/functions.php'; - -?> \ No newline at end of file +<?php +/** + * XOOPS FAQ 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:: {@link http://www.fsf.org/copyleft/gpl.html GNU public license} + * @package:: xoopsfaq + * @subpackage:: admin + * @since:: 1.23 + * @author:: XOOPS Module 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'); +$thisModulePath = dirname(dirname(__FILE__)); + +//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_MODULEADMIN_MISSING, false); + } \ No newline at end of file Modified: XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/category.php =================================================================== --- XoopsModules/xoopsfaq/trunk/admin/category.php 2012-03-30 14:31:56 UTC (rev 9215) +++ XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/category.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -1,90 +1,96 @@ -<?php -/** - * Name: category.php - * Description: Category Admin file - * - * 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 : Xoops - * @Module : Xoops FAQ - * @subpackage : Xoops FAQ ADmin - * @since 2.3.0 - * @author John Neill - * @version $Id$ - */ -include 'admin_header.php'; - -$category_handler = &xoops_getModuleHandler( 'category' ); - -$op = xoopsFaq_CleanVars( $_REQUEST, 'op', 'default', 'string' ); -switch ( $op ) { - case 'edit': - xoops_cp_header(); - xoopsFaq_AdminMenu( 1 ); - xoopsFaq_DisplayHeading( _XO_LA_CATEGORY_HEADER, _XO_LA_CATEGORY_EDIT_DSC, false ); - $category_id = xoopsFaq_CleanVars( $_REQUEST, 'category_id', 0, 'int' ); - $obj = ( $category_id == 0 ) ? $category_handler->create() : $category_handler->get( $category_id ); - if ( is_object( $obj ) ) { - $obj->displayForm(); - } else { - $category_handler->displayError( _XO_LA_ERRORCOULDNOTEDITCAT ); - } - break; - - case 'delete': - $ok = xoopsFaq_CleanVars( $_REQUEST, 'ok', 0, 'int' ); - $category_id = xoopsFaq_CleanVars( $_REQUEST, 'category_id', 0, 'int' ); - if ( $ok == 1 ) { - $obj = $category_handler->get( $category_id ); - if ( is_object( $obj ) ) { - if ( $category_handler->delete( $obj ) ) { - $sql = sprintf( 'DELETE FROM %s WHERE contents_cid = %u', $xoopsDB->prefix( 'xoopsfaq_contents' ), $category_id ); - $xoopsDB->query( $sql ); - // delete comments - xoops_comment_delete( $xoopsModule->getVar( 'mid' ), $category_id ); - redirect_header( 'category.php', 1, _XO_LA_DBSUCCESS ); - } - } - $category_handler->displayError( _XO_LA_ERRORCOULDNOTDELCAT ); - } else { - xoops_cp_header(); - xoopsFaq_AdminMenu( 1 ); - xoopsFaq_DisplayHeading( _XO_LA_CATEGORY_HEADER, _XO_LA_CATEGORY_DELETE_DSC, false ); - xoops_confirm( array( 'op' => 'delete', 'category_id' => $category_id, 'ok' => 1 ), 'category.php', _XO_LA_RUSURECAT ); - } - break; - - case 'save': - if ( !$GLOBALS['xoopsSecurity']->check() ) { - redirect_header( $this->url, 0, $GLOBALS['xoopsSecurity']->getErrors( true ) ); - } - $category_id = xoopsFaq_CleanVars( $_REQUEST, 'category_id', 0, 'int' ); - $obj = ( $category_id == 0 ) ? $category_handler->create() : $category_handler->get( $category_id ); - if ( is_object( $obj ) ) { - $obj->setVar( 'category_title', xoopsFaq_CleanVars( $_REQUEST, 'category_title', '', 'string' ) ); - $obj->setVar( 'category_order', xoopsFaq_CleanVars( $_REQUEST, 'category_order', 0, 'int' ) ); - if ( $category_handler->insert( $obj, true ) ) { - redirect_header( 'category.php', 1, _XO_LA_DBSUCCESS ); - } - } - $category_handler->displayError( _XO_LA_ERRORCOULDNOTADDCAT ); - break; - - case 'default': - default: - xoops_cp_header(); - xoopsFaq_AdminMenu( 1 ); - xoopsFaq_DisplayHeading( _XO_LA_CATEGORY_HEADER, _XO_LA_CATEGORY_LIST_DSC ); - $category_handler->displayAdminListing(); - break; -} -xoopsFaq_cp_footer(); - -?> \ No newline at end of file +<?php +/** + * Name: category.php + * Description: Category Admin file + * + * 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:: {@link http://www.fsf.org/copyleft/gpl.html GNU public license} + * @package:: xoopsfaq + * @subpackage:: admin + * @since:: 2.3.0 + * @author:: John Neill + * @version:: $Id$ + */ +include 'admin_header.php'; +xoops_cp_header(); + +$category_handler = &xoops_getModuleHandler('category'); +$indexAdmin = new ModuleAdmin(); + +$op = xoopsFaq_CleanVars($_REQUEST, 'op', 'default', 'string'); +switch ($op) { + case 'edit': + $index_admin = new ModuleAdmin(); + echo $index_admin->addNavigation('category.php'); + //xoopsFaq_DisplayHeading(_AM_XOOPSFAQ_CATEGORY_HEADER, _AM_XOOPSFAQ_CATEGORY_EDIT_DSC, false); + xoopsFaq_DisplayHeading('', _AM_XOOPSFAQ_CATEGORY_EDIT_DSC, false); + $category_id = xoopsFaq_CleanVars($_REQUEST, 'category_id', 0, 'int'); + $obj = (0 == $category_id) ? $category_handler->create() : $category_handler->get($category_id); + if (is_object($obj)) { + $obj->displayForm(); + } else { + $category_handler->displayError(_AM_XOOPSFAQ_ERRORCOULDNOTEDITCAT); + } + break; + + case 'delete': + $ok = xoopsFaq_CleanVars($_REQUEST, 'ok', 0, 'int'); + $category_id = xoopsFaq_CleanVars($_REQUEST, 'category_id', 0, 'int'); + if (1 == $ok) { + $obj = $category_handler->get($category_id); + if (is_object($obj)) { + if ($category_handler->delete($obj)) { + $sql = sprintf('DELETE FROM %s WHERE contents_cid = %u', $xoopsDB->prefix('xoopsfaq_contents'), $category_id); + $xoopsDB->query($sql); + // delete comments + xoops_comment_delete($xoopsModule->getVar('mid' ), $category_id); + redirect_header('category.php', 1, _AM_XOOPSFAQ_DBSUCCESS); + } + } + $category_handler->displayError(_AM_XOOPSFAQ_ERRORCOULDNOTDELCAT); + } else { + $index_admin = new ModuleAdmin(); + echo $index_admin->addNavigation('category.php'); + //xoopsFaq_DisplayHeading(_AM_XOOPSFAQ_CATEGORY_HEADER, _AM_XOOPSFAQ_CATEGORY_DELETE_DSC, false); + xoopsFaq_DisplayHeading('', _AM_XOOPSFAQ_CATEGORY_DELETE_DSC, false); + xoops_confirm(array('op' => 'delete', 'category_id' => $category_id, 'ok' => 1), 'category.php', _AM_XOOPSFAQ_RUSURECAT); + } + break; + + case 'save': + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header($this->url, 0, $GLOBALS['xoopsSecurity']->getErrors(true)); + } + $category_id = xoopsFaq_CleanVars($_REQUEST, 'category_id', 0, 'int'); + $obj = (0 == $category_id) ? $category_handler->create() : $category_handler->get($category_id); + if (is_object($obj)) { + $obj->setVar('category_title', xoopsFaq_CleanVars($_REQUEST, 'category_title', '', 'string')); + $obj->setVar('category_order', xoopsFaq_CleanVars($_REQUEST, 'category_order', 0, 'int')); + if ($category_handler->insert($obj, true)) { + redirect_header('category.php', 1, _AM_XOOPSFAQ_DBSUCCESS); + } + } + $category_handler->displayError(_AM_XOOPSFAQ_ERRORCOULDNOTADDCAT); + break; + + case 'default': + default: + $index_admin = new ModuleAdmin(); + echo $index_admin->addNavigation('category.php'); +// xoopsFaq_DisplayHeading(_AM_XOOPSFAQ_CATEGORY_HEADER, _AM_XOOPSAQ_CATEGORY_LIST_DSC); +// xoopsFaq_DisplayHeading('', _AM_XOOPSFAQ_CATEGORY_LIST_DSC); + +$indexAdmin->addItemButton(_XO_XOOPSFAQ_ADDCAT, 'category.php?op=edit', 'add' , ''); +echo $indexAdmin->renderButton('right', ''); + + $category_handler->displayAdminListing(); + break; +} +include_once 'admin_footer.php'; \ No newline at end of file Modified: XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/contentsform.php =================================================================== --- XoopsModules/xoopsfaq/trunk/admin/contentsform.php 2012-03-30 14:31:56 UTC (rev 9215) +++ XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/contentsform.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -24,36 +24,69 @@ // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // +/** + * + * @copyright:: The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license:: {@link http://www.fsf.org/copyleft/gpl.html GNU public license} + * @package:: xoopsfaq + * @since:: 1.23 + * @author:: + * @version: $Id$ +**/ + if (!defined('XOOPS_ROOT_PATH')) { - die("XOOPS root path not defined"); + die("Direct Access Denied"); } -echo "<form action='index.php' method='post'> -<table border='0' cellpadding='0' cellspacing='0' width='100%'><tr><td class='bg2'> -<table width='100%' border='0' cellpadding='4' cellspacing='1'> -<tr><td nowrap='nowrap' class='bg3'>"._XD_QUESTION." </td><td class='bg1'><input type='text' name='contents_title' value='$contents_title' size='31' maxlength='255' /></td></tr> -<tr><td nowrap='nowrap' class='bg3'>"._XD_ORDER." </td><td class='bg1'><input type='text' name='contents_order' value='".$contents_order."' size='4' maxlength='3' /></td></tr>"; +$checked = (1 == $contents_visible) ? " checked='checked'" : ''; -$checked = ($contents_visible == 1) ? " checked='checked'" : ""; +echo "<form action='index.php' method='post'>\n" + ." <table style='border-width: 0px; padding: 0px; margin: 0px; width: 100%;'>\n" + ." <tr>\n" + ." <td class='bg2'>\n" + ." <table style='width: 100%; border-width: 0px; padding: 4px; margin: 1px;'>\n" + ." <tr>\n" + ." <td nowrap='nowrap' class='bg3'>" . _XD_QUESTION . " </td>\n" + ." <td class='bg1'><input type='text' name='contents_title' value='{$contents_title}' size='31' maxlength='255' /></td>\n" + ." </tr>\n" + ." <tr>\n" + ." <td nowrap='nowrap' class='bg3'>" . _XD_ORDER . " </td>\n" + ." <td class='bg1'><input type='text' name='contents_order' value='".$contents_order."' size='4' maxlength='3' /></td>\n" + ." </tr>\n" + ." <tr>\n" + ." <td nowrap='nowrap' class='bg3'>" . _XD_DISPLAY . " </td>\n" + ." <td class='bg1'><input type='checkbox' name='contents_visible' value='1'{$checked} /></td>\n" + ." </tr>\n" + ." <tr>\n" + ." <td nowrap='nowrap' class='bg3'>" . _XD_ANSWER . " </td>\n" + ." <td class='bg1'>"; -echo "<tr><td nowrap='nowrap' class='bg3'>"._XD_DISPLAY." </td><td class='bg1'><input type='checkbox' name='contents_visible' value='1'$checked /></td></tr> -<tr><td nowrap='nowrap' class='bg3'>"._XD_ANSWER." </td><td class='bg1'>"; - include_once XOOPS_ROOT_PATH."/include/xoopscodes.php"; xoopsCodeTarea("contents_contents", 60, 20); xoopsSmilies("contents_contents"); $checked = " checked='checked'"; -echo "<br /><input type='checkbox' name='contents_nohtml' value='1'$checked />"._XD_NOHTML."<br />"; +echo "<br /><input type='checkbox' name='contents_nohtml' value='1'{$checked} />"._XD_NOHTML."<br />"; -$checked = ($contents_nosmiley == 1) ? " checked='checked'" : ""; +$checked = (1 == $contents_nosmiley) ? " checked='checked'" : ""; echo "<input type='checkbox' name='contents_nosmiley' value='1'$checked />"._XD_NOSMILEY."<br />"; -$checked = ($contents_noxcode == 1) ? " checked='checked'" : ""; -echo "<input type='checkbox' name='contents_noxcode' value='1'$checked />"._XD_NOXCODE."</td></tr> -<tr><td nowrap='nowrap' class='bg3'> </td><td class='bg1'><input type='hidden' name='category_id' value='".$category_id."' /><input type='hidden' name='contents_id' value='".$contents_id."' /><input type='hidden' name='op' value='$op' /><input type='submit' name='contents_preview' value='"._PREVIEW."' /> <input type='submit' name='contents_submit' value='"._SUBMIT."' /></td></tr> -</table></td></tr></table> -</form>"; - -?> \ No newline at end of file +$checked = (1 == $contents_noxcode) ? " checked='checked'" : ""; +echo "<input type='checkbox' name='contents_noxcode' value='1'$checked />"._XD_NOXCODE."</td>\n" + ." </tr>\n" + ." <tr>\n" + ." <td nowrap='nowrap' class='bg3'> </td>\n" + ." <td class='bg1'>\n" + ." <input type='hidden' name='category_id' value='{$category_id}' />\n" + ." <input type='hidden' name='contents_id' value='{$contents_id}' />\n" + ." <input type='hidden' name='op' value='{$op}' />\n" + ." <input type='submit' name='contents_preview' value='" . _PREVIEW . "' /> \n" + ." <input type='submit' name='contents_submit' value='" . _SUBMIT . "' />\n" + ." </td>\n" + ." </tr>\n" + ." </table>\n" + ." </td>\n" + ." </tr>\n" + ." </table>\n" + ."</form>\n"; \ No newline at end of file Deleted: XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/footer1.php =================================================================== --- XoopsModules/xoopsfaq/trunk/admin/footer1.php 2012-03-30 14:31:56 UTC (rev 9215) +++ XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/footer1.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -1,21 +0,0 @@ -<?php -/** - * Slideshow 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 Slideshow - * @since 2.5.0 - * @author Magic.Shao <mag...@gm...> - Susheng Yang <ezs...@gm...> - * @version $Id $ -**/ -echo _AM_XOOPSFAQ_ADMIN_FOOTER; -xoops_cp_footer(); -?> Deleted: XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/header1.php =================================================================== --- XoopsModules/xoopsfaq/trunk/admin/header1.php 2012-03-30 14:31:56 UTC (rev 9215) +++ XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/header1.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -1,41 +0,0 @@ -<?php -/** - * Slideshow 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 Slideshow - * @since 2.5.0 - * @author Magic.Shao <mag...@gm...> - Susheng Yang <ezs...@gm...> - * @version $Id $ -**/ - -include("../../../include/cp_header.php"); - -defined("FRAMEWORKS_ART_FUNCTIONS_INI") || include_once XOOPS_ROOT_PATH.'/Frameworks/art/functions.ini.php'; -load_functions("admin"); - -if ( !@include_once(XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/language/" . $xoopsConfig['language'] . "/main.php")) { - include_once(XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/language/english/main.php"); -} - -if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { - include_once(XOOPS_ROOT_PATH."/class/template.php"); - $xoopsTpl = new XoopsTpl(); -} - -xoops_cp_header(); - -// Define Stylesheet and JScript -$xoTheme->addStylesheet( XOOPS_URL . "/modules/" . $xoopsModule->getVar("dirname") . "/css/admin.css" ); -//$xoTheme->addScript("browse.php?Frameworks/jquery/jquery.js"); -//$xoTheme->addScript("browse.php?modules/" . $xoopsModule->getVar("dirname") . "/js/admin.js"); - -?> Deleted: XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/help.php =================================================================== --- XoopsModules/xoopsfaq/trunk/admin/help.php 2012-03-30 14:31:56 UTC (rev 9215) +++ XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/help.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -1,27 +0,0 @@ -<?php -/** - * Ghost 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 Ghost - * @since 2.3.0 - * @author Dugris <http://www.dugris.info> - * @version $Id$ -**/ - -include "header1.php"; - -xoops_loadLanguage("help", $xoopsModule->getVar("dirname", "e")); - -$xoopsTpl->display("db: admin/" . $xoopsModule->getVar("dirname") . "_admin_help.html"); - -include "footer1.php"; -?> \ No newline at end of file Modified: XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/index.php =================================================================== --- XoopsModules/xoopsfaq/trunk/admin/index.php 2012-03-30 14:31:56 UTC (rev 9215) +++ XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/index.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -1,96 +1,74 @@ -<?php -/** - * Name: index.php - * Description: Admin Index File for Xoops FAQ Admin - * - * 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 : Xoops - * @Module : Xoops FAQ - * @subpackage : Xoops FAQ Admin - * @since 2.3.0 - * @author John Neill - * @version $Id$ - */ -include 'admin_header.php'; - -$contents_handler = &xoops_getModuleHandler( 'contents' ); - -$op = xoopsFaq_CleanVars( $_REQUEST, 'op', 'default', 'string' ); -switch ( $op ) { - case 'edit': - $contents_id = xoopsFaq_CleanVars( $_REQUEST, 'contents_id', 0, 'int' ); - $obj = ( $contents_id == 0 ) ? $contents_handler->create() : $contents_handler->get( $contents_id ); - if ( is_object( $obj ) ) { - xoops_cp_header(); - xoopsFaq_AdminMenu( 0 ); - xoopsFaq_DisplayHeading( _XO_LA_CONTENTS_HEADER, _XO_LA_CATEGORY_EDIT_DSC, false ); - $obj->displayForm(); - } else { - $contents_handler->displayError( _XO_LA_ERRORCOULDNOTEDITCAT ); - } - break; - - case 'delete': - $ok = xoopsFaq_CleanVars( $_REQUEST, 'ok', 0, 'int' ); - $contents_id = xoopsFaq_CleanVars( $_REQUEST, 'contents_id', 0, 'int' ); - if ( $ok == 1 ) { - $obj = $contents_handler->get( $contents_id ); - if ( is_object( $obj ) ) { - if ( $contents_handler->delete( $obj ) ) { - $sql = sprintf( 'DELETE FROM %s WHERE contents_id = %u', $xoopsDB->prefix( 'xoopsfaq_contents' ), $contents_id ); - $xoopsDB->query( $sql ); - // delete comments - xoops_comment_delete( $xoopsModule->getVar( 'mid' ), $contents_id ); - redirect_header( 'index.php', 1, _XO_LA_DBSUCCESS ); - } - } - $contents_handler->displayError( _XO_LA_ERRORCOULDNOTDELCAT ); - } else { - xoops_cp_header(); - xoopsFaq_AdminMenu( 0 ); - xoopsFaq_DisplayHeading( _XO_LA_CONTENTS_HEADER, _XO_LA_CATEGORY_DELETE_DSC, false ); - xoops_confirm( array( 'op' => 'delete', 'contents_id' => $contents_id, 'ok' => 1 ), 'index.php', _XO_LA_RUSURECAT ); - } - break; - - case 'save': - if ( !$GLOBALS['xoopsSecurity']->check() ) { - redirect_header( 'index.php', 0, $GLOBALS['xoopsSecurity']->getErrors( true ) ); - } - $contents_id = xoopsFaq_CleanVars( $_REQUEST, 'contents_id', 0, 'int' ); - $obj = ( $contents_id == 0 ) ? $contents_handler->create() : $contents_handler->get( $contents_id ); - if ( is_object( $obj ) ) { - $obj->setVars( $_REQUEST ); - $obj->setVar( 'contents_publish', strtotime( $_REQUEST['contents_publish'] ) ); - $obj->setVar( 'dohtml', isset( $_REQUEST['dohtml'] ) ? 1 : 0 ); - $obj->setVar( 'dosmiley', isset( $_REQUEST['dosmiley'] ) ? 1 : 0 ); - $obj->setVar( 'doxcode', isset( $_REQUEST['doxcode'] ) ? 1 : 0 ); - $obj->setVar( 'doimage', isset( $_REQUEST['doimage'] ) ? 1 : 0 ); - $obj->setVar( 'dobr', isset( $_REQUEST['dobr'] ) ? 1 : 0 ); - $ret = $contents_handler->insert( $obj, true ); - if ( $ret ) { - redirect_header( 'index.php', 1, _XO_LA_DBSUCCESS ); - } - } - $contents_handler->displayError( $ret ); - break; - - case 'default': - default: - xoops_cp_header(); - xoopsFaq_AdminMenu( 0 ); - xoopsFaq_DisplayHeading( _XO_LA_CONTENTS_HEADER, _XO_LA_CONTENTS_LIST_DSC ); - $contents_handler->displayAdminListing(); - break; -} -xoopsFaq_cp_footer(); - -?> \ No newline at end of file +<?php +// $Id$ +// ------------------------------------------------------------------------ // +// 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: Raul Recio (AKA UNFOR) // +// Project: The XOOPS Project // +// ------------------------------------------------------------------------- // +/** + * Xoops FAQ Administration + * + * @copyright:: The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license:: {@link http://www.fsf.org/copyleft/gpl.html GNU public license} + * @package:: xoopsfaq + * @since:: 1.23 + * @author:: Raul Recio (aka UNFOR) + * @version: $Id$ + */ + +include_once 'admin_header.php'; +xoops_cp_header(); + +$index_admin = new ModuleAdmin(); +//----------------------- +$xFaqHandler =& xoops_getmodulehandler('contents', $xoopsModule->getVar('dirname')); + +$totalFaqs = $xFaqHandler->getCount(); + +$criteria = new CriteriaCompo(); +$criteria->add(new Criteria('contents_active', 1, '=')); +$criteriaPublished = new CriteriaCompo(); +$criteriaPublished->add(new Criteria('contents_publish', 0, '>')); +$criteriaPublished->add(new Criteria('contents_publish', time(), '<=')); +$criteria->add($criteriaPublished); +$totalPublishedFaqs = $xFaqHandler->getCount($criteria); + +$xCatHandler =& xoops_getmodulehandler('category', $xoopsModule->getVar('dirname')); +$totalCats = $xCatHandler->getCount(); + +$totalNonpublishedFaqs = $totalFaqs - $totalPublishedFaqs; + +$index_admin->addInfoBox(_MD_XOOPSFAQ_XOOPSFAQCONF); +$index_admin->addInfoBoxLine(_MD_XOOPSFAQ_XOOPSFAQCONF, "<infolabel>" ._MD_XOOPSFAQ_TOTALCATEGORIES. "</infolabel>", $totalCats); +$index_admin->addInfoBoxLine(_MD_XOOPSFAQ_XOOPSFAQCONF, "<infolabel>" ._MD_XOOPSFAQ_TOTALPUBLISHED. "</infolabel>", $totalPublishedFaqs, 'Green'); +$index_admin->addInfoBoxLine(_MD_XOOPSFAQ_XOOPSFAQCONF, "<infolabel>" ._MD_XOOPSFAQ_TOTALNONACTIVE. "</infolabel>", $totalNonpublishedFaqs, 'Red'); +$index_admin->addInfoBoxLine(_MD_XOOPSFAQ_XOOPSFAQCONF, "<infolabel>" ._MD_XOOPSFAQ_TOTALFAQS. "</infolabel><infotext>", $totalFaqs."</infotext>"); +//---------------------------- + +echo $index_admin->addNavigation('index.php'); +echo $index_admin->renderIndex(); + +include 'admin_footer.php'; +xoops_cp_footer(); \ No newline at end of file Added: XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/main.php =================================================================== --- XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/main.php (rev 0) +++ XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/main.php 2012-04-03 06:08:35 UTC (rev 9259) @@ -0,0 +1,103 @@ +<?php +/** + * Name: main.php + * Description: Admin Main Process File for Xoops FAQ Admin + * + * 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:: {@link http://www.fsf.org/copyleft/gpl.html GNU public license} + * @package:: Xoops + * @module:: xoopsfaq + * @subpackage:: admin + * @since:: 2.3.0 + * @author:: John Neill + * @version:: $Id: main.php 8447 2011-12-09 06:56:44Z ZySpec $ + */ +include 'admin_header.php'; +xoops_cp_header(); + +$contents_handler = &xoops_getModuleHandler('contents', $xoopsModule->getVar('dirname')); +$indexAdmin = new ModuleAdmin(); + +$op = xoopsFaq_CleanVars($_REQUEST, 'op', 'default', 'string'); +switch ($op) { + case 'edit': + $contents_id = xoopsFaq_CleanVars($_REQUEST, 'contents_id', 0, 'int'); + $obj = ($contents_id == 0) ? $contents_handler->create() : $contents_handler->get($contents_id); + if (is_object($obj)) { + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation('main.php'); + //xoopsFaq_DisplayHeading(_AM_XOOPSFAQ_CONTENTS_HEADER, _AM_XOOPSFAQ_CATEGORY_EDIT_DSC, false); + xoopsFaq_DisplayHeading('', _AM_XOOPSFAQ_CATEGORY_EDIT_DSC, false); + $obj->displayForm(); + } else { + $contents_handler->displayError(_AM_XOOPSFAQ_ERRORCOULDNOTEDITCAT); + } + break; + + case 'delete': + $ok = xoopsFaq_CleanVars($_REQUEST, 'ok', 0, 'int'); + $contents_id = xoopsFaq_CleanVars($_REQUEST, 'contents_id', 0, 'int'); + if (1 == $ok) { + $obj = $contents_handler->get($contents_id); + if (is_object($obj)) { + if ($contents_handler->delete($obj)) { + $sql = sprintf('DELETE FROM %s WHERE contents_id = %u', $xoopsDB->prefix('xoopsfaq_contents'), $contents_id); + $xoopsDB->query($sql); + // delete comments + xoops_comment_delete($xoopsModule->getVar('mid'), $contents_id); + redirect_header('main.php', 1, _AM_XOOPSFAQ_DBSUCCESS); + } + } + $contents_handler->displayError(_AM_XOOPSFAQ_ERRORCOULDNOTDELCAT); + } else { + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation('main.php'); + //xoopsFaq_DisplayHeading(_AM_XOOPSFAQ_CONTENTS_HEADER, _AM_XOOPSFAQ_CATEGORY_DELETE_DSC, false); + xoopsFaq_DisplayHeading('', _AM_XOOPSFAQ_CATEGORY_DELETE_DSC, false); + xoops_confirm(array('op' => 'delete', 'contents_id' => $contents_id, 'ok' => 1), 'main.php', _AM_XOOPSFAQ_RUSURECAT); + } + break; + + case 'save': + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header('main.php', 0, $GLOBALS['xoopsSecurity']->getErrors(true)); + } + $contents_id = xoopsFaq_CleanVars($_REQUEST, 'contents_id', 0, 'int'); + $obj = ($contents_id == 0) ? $contents_handler->create() : $contents_handler->get($contents_id); + if (is_object($obj)) { + $obj->setVars($_REQUEST); + $obj->setVar('contents_publish', strtotime($_REQUEST['contents_publish'])); + $obj->setVar('dohtml', isset($_REQUEST['dohtml']) ? 1 : 0); + $obj->setVar('dosmiley', isset($_REQUEST['dosmiley']) ? 1 : 0); + $obj->setVar('doxcode', isset($_REQUEST['doxcode']) ? 1 : 0); + $obj->setVar('doimage', isset($_REQUEST['doimage']) ? 1 : 0); + $obj->setVar('dobr', isset($_REQUEST['dobr']) ? 1 : 0); + $ret = $contents_handler->insert($obj, true); + if ($ret) { + redirect_header('main.php', 1, _AM_XOOPSFAQ_DBSUCCESS); + } + } + $contents_handler->displayError($ret); + break; + + case 'default': + default: + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation('main.php'); +// xoopsFaq_DisplayHeading('', _AM_XOOPSFAQ_CONTENTS_LIST_DSC); +// xoopsFaq_DisplayHeading(_AM_XOOPSFAQ_CONTENTS_HEADER, _AM_XOOPSFAQ_CONTENTS_LIST_DSC); + +$indexAdmin->addItemButton(_AM_XOOPSFAQ_CREATENEW, 'main.php?op=edit', 'add' , ''); +echo $indexAdmin->renderButton('right', ''); + + $contents_handler->displayAdminListing(); + break; +} +include_once 'admin_footer.php'; \ No newline at end of file Modified: XoopsModules/xoopsfaq/trunk/xoopsfaq/admin/menu.php ==================================================================... [truncated message content] |