From: <txm...@us...> - 2012-01-31 20:06:25
|
Revision: 8860 http://xoops.svn.sourceforge.net/xoops/?rev=8860&view=rev Author: txmodxoops Date: 2012-01-31 20:06:11 +0000 (Tue, 31 Jan 2012) Log Message: ----------- Alpha 1 Added Paths: ----------- XoopsModules/mytube/branches/mytube/ XoopsModules/mytube/branches/mytube/admin/ XoopsModules/mytube/branches/mytube/admin/about.php XoopsModules/mytube/branches/mytube/admin/admin_footer.php XoopsModules/mytube/branches/mytube/admin/admin_header.php XoopsModules/mytube/branches/mytube/admin/altcat.php XoopsModules/mytube/branches/mytube/admin/broken.php XoopsModules/mytube/branches/mytube/admin/cat.php XoopsModules/mytube/branches/mytube/admin/index.html XoopsModules/mytube/branches/mytube/admin/index.php XoopsModules/mytube/branches/mytube/admin/menu.php XoopsModules/mytube/branches/mytube/admin/mod.php XoopsModules/mytube/branches/mytube/admin/permissions.php XoopsModules/mytube/branches/mytube/admin/videos.php XoopsModules/mytube/branches/mytube/admin/votedata.php XoopsModules/mytube/branches/mytube/altcat.php XoopsModules/mytube/branches/mytube/blocks/ XoopsModules/mytube/branches/mytube/blocks/blocks_altcat.php XoopsModules/mytube/branches/mytube/blocks/blocks_broken.php XoopsModules/mytube/branches/mytube/blocks/blocks_cat.php XoopsModules/mytube/branches/mytube/blocks/blocks_mod.php XoopsModules/mytube/branches/mytube/blocks/blocks_videos.php XoopsModules/mytube/branches/mytube/blocks/blocks_votedata.php XoopsModules/mytube/branches/mytube/blocks/index.html XoopsModules/mytube/branches/mytube/broken.php XoopsModules/mytube/branches/mytube/cat.php XoopsModules/mytube/branches/mytube/class/ XoopsModules/mytube/branches/mytube/class/index.html XoopsModules/mytube/branches/mytube/class/myts_extended.php XoopsModules/mytube/branches/mytube/class/mytube_altcat.php XoopsModules/mytube/branches/mytube/class/mytube_broken.php XoopsModules/mytube/branches/mytube/class/mytube_cat.php XoopsModules/mytube/branches/mytube/class/mytube_mod.php XoopsModules/mytube/branches/mytube/class/mytube_videos.php XoopsModules/mytube/branches/mytube/class/mytube_votedata.php XoopsModules/mytube/branches/mytube/css/ XoopsModules/mytube/branches/mytube/css/admin.css XoopsModules/mytube/branches/mytube/css/index.html XoopsModules/mytube/branches/mytube/css/style.css XoopsModules/mytube/branches/mytube/docs/ XoopsModules/mytube/branches/mytube/docs/changelog.txt XoopsModules/mytube/branches/mytube/docs/credits.txt XoopsModules/mytube/branches/mytube/docs/index.html XoopsModules/mytube/branches/mytube/docs/install.txt XoopsModules/mytube/branches/mytube/docs/lang_diff.txt XoopsModules/mytube/branches/mytube/docs/licence.txt XoopsModules/mytube/branches/mytube/docs/readme.txt XoopsModules/mytube/branches/mytube/header.php XoopsModules/mytube/branches/mytube/images/ XoopsModules/mytube/branches/mytube/images/icons/ XoopsModules/mytube/branches/mytube/images/icons/index.html XoopsModules/mytube/branches/mytube/images/icons/off.png XoopsModules/mytube/branches/mytube/images/icons/on.png XoopsModules/mytube/branches/mytube/images/index.html XoopsModules/mytube/branches/mytube/images/menu/ XoopsModules/mytube/branches/mytube/images/menu/bg.png XoopsModules/mytube/branches/mytube/images/menu/index.html XoopsModules/mytube/branches/mytube/images/menu/left_both.png XoopsModules/mytube/branches/mytube/images/menu/right_both.png XoopsModules/mytube/branches/mytube/images/mytube_slogo.png XoopsModules/mytube/branches/mytube/include/ XoopsModules/mytube/branches/mytube/include/configs.php XoopsModules/mytube/branches/mytube/include/functions.php XoopsModules/mytube/branches/mytube/include/index.html XoopsModules/mytube/branches/mytube/include/install.php XoopsModules/mytube/branches/mytube/index.php XoopsModules/mytube/branches/mytube/language/ XoopsModules/mytube/branches/mytube/language/index.html XoopsModules/mytube/branches/mytube/language/italian/ XoopsModules/mytube/branches/mytube/language/italian/admin.php XoopsModules/mytube/branches/mytube/language/italian/blocks.php XoopsModules/mytube/branches/mytube/language/italian/help/ XoopsModules/mytube/branches/mytube/language/italian/help/help.html XoopsModules/mytube/branches/mytube/language/italian/help/index.html XoopsModules/mytube/branches/mytube/language/italian/index.html XoopsModules/mytube/branches/mytube/language/italian/main.php XoopsModules/mytube/branches/mytube/language/italian/modinfo.php XoopsModules/mytube/branches/mytube/mod.php XoopsModules/mytube/branches/mytube/sql/ XoopsModules/mytube/branches/mytube/sql/index.html XoopsModules/mytube/branches/mytube/sql/mysql.sql XoopsModules/mytube/branches/mytube/templates/ XoopsModules/mytube/branches/mytube/templates/admin/ XoopsModules/mytube/branches/mytube/templates/admin/index.html XoopsModules/mytube/branches/mytube/templates/blocks/ XoopsModules/mytube/branches/mytube/templates/blocks/index.html XoopsModules/mytube/branches/mytube/templates/blocks/mytube_altcat_block_day.html XoopsModules/mytube/branches/mytube/templates/blocks/mytube_altcat_block_random.html XoopsModules/mytube/branches/mytube/templates/blocks/mytube_altcat_block_recent.html XoopsModules/mytube/branches/mytube/templates/blocks/mytube_broken_block_day.html XoopsModules/mytube/branches/mytube/templates/blocks/mytube_broken_block_random.html XoopsModules/mytube/branches/mytube/templates/blocks/mytube_broken_block_recent.html XoopsModules/mytube/branches/mytube/templates/blocks/mytube_cat_block_day.html XoopsModules/mytube/branches/mytube/templates/blocks/mytube_cat_block_random.html XoopsModules/mytube/branches/mytube/templates/blocks/mytube_cat_block_recent.html XoopsModules/mytube/branches/mytube/templates/blocks/mytube_mod_block_day.html XoopsModules/mytube/branches/mytube/templates/blocks/mytube_mod_block_random.html XoopsModules/mytube/branches/mytube/templates/blocks/mytube_mod_block_recent.html XoopsModules/mytube/branches/mytube/templates/blocks/mytube_videos_block_day.html XoopsModules/mytube/branches/mytube/templates/blocks/mytube_videos_block_random.html XoopsModules/mytube/branches/mytube/templates/blocks/mytube_videos_block_recent.html XoopsModules/mytube/branches/mytube/templates/blocks/mytube_votedata_block_day.html XoopsModules/mytube/branches/mytube/templates/blocks/mytube_votedata_block_random.html XoopsModules/mytube/branches/mytube/templates/blocks/mytube_votedata_block_recent.html XoopsModules/mytube/branches/mytube/templates/index.html XoopsModules/mytube/branches/mytube/templates/mytube_altcat.html XoopsModules/mytube/branches/mytube/templates/mytube_broken.html XoopsModules/mytube/branches/mytube/templates/mytube_cat.html XoopsModules/mytube/branches/mytube/templates/mytube_footer.html XoopsModules/mytube/branches/mytube/templates/mytube_header.html XoopsModules/mytube/branches/mytube/templates/mytube_index.html XoopsModules/mytube/branches/mytube/templates/mytube_mod.html XoopsModules/mytube/branches/mytube/templates/mytube_videos.html XoopsModules/mytube/branches/mytube/templates/mytube_votedata.html XoopsModules/mytube/branches/mytube/videos.php XoopsModules/mytube/branches/mytube/votedata.php XoopsModules/mytube/branches/mytube/xoops_version.php Added: XoopsModules/mytube/branches/mytube/admin/about.php =================================================================== --- XoopsModules/mytube/branches/mytube/admin/about.php (rev 0) +++ XoopsModules/mytube/branches/mytube/admin/about.php 2012-01-31 20:06:11 UTC (rev 8860) @@ -0,0 +1,43 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * - Revision By TXMod Xoops (http://www.txmodxoops.org) + * **************************************************************************** + * MYTUBE - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package mytube + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.05 Sat 2012/01/14 6:37:04 : Timgno 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/mytube/branches/mytube/admin/admin_footer.php =================================================================== --- XoopsModules/mytube/branches/mytube/admin/admin_footer.php (rev 0) +++ XoopsModules/mytube/branches/mytube/admin/admin_footer.php 2012-01-31 20:06:11 UTC (rev 8860) @@ -0,0 +1,41 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * - Revision By TXMod Xoops (http://www.txmodxoops.org) + * **************************************************************************** + * MYTUBE - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package mytube + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.05 Sat 2012/01/14 6:37:04 : Timgno Exp $ + * **************************************************************************** + */ + +global $pathImageAdmin; +echo "<div align=\"center\"><a href=\"http://www.xoops.org\" target=\"_blank\"><img src='" . $pathImageAdmin."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a></div>"; +echo "<div class='center smallsmall italic pad5'><strong>" . $xoopsModule->getVar("name") . "</strong> "._AM_MYTUBE_MAINTAINEDBY." <a class='tooltip' rel='external' href='http://www.xoops.org/' title='Visit XOOPS Community'>XOOPS Community</a></div>"; + xoops_cp_footer(); Added: XoopsModules/mytube/branches/mytube/admin/admin_header.php =================================================================== --- XoopsModules/mytube/branches/mytube/admin/admin_header.php (rev 0) +++ XoopsModules/mytube/branches/mytube/admin/admin_header.php 2012-01-31 20:06:11 UTC (rev 8860) @@ -0,0 +1,98 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * - Revision By TXMod Xoops (http://www.txmodxoops.org) + * **************************************************************************** + * MYTUBE - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package mytube + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.05 Sat 2012/01/14 6:37:04 : Timgno Exp $ + * **************************************************************************** + */ + +include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; +include_once XOOPS_ROOT_PATH . '/include/cp_functions.php'; +include_once '../include/functions.php'; + +$pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin'); +$globlang = $GLOBALS['xoopsConfig']['language']; + +if ( file_exists($pathDir.'/language/'.$globlang.'/main.php')){ + include_once $pathDir.'/language/'.$globlang.'/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_MYTUBE_MODULEADMIN_MISSING); + 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'); +$altcatHandler=& xoops_getModuleHandler('mytube_altcat', $dirname ); +$brokenHandler=& xoops_getModuleHandler('mytube_broken', $dirname ); +$catHandler=& xoops_getModuleHandler('mytube_cat', $dirname ); +$modHandler=& xoops_getModuleHandler('mytube_mod', $dirname ); +$videosHandler=& xoops_getModuleHandler('mytube_videos', $dirname ); +$votedataHandler=& xoops_getModuleHandler('mytube_votedata', $dirname ); + +$myts =& MyTextSanitizer::getInstance(); + +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); + +$style_admin = "../css/admin.css"; + +//Load languages +xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); Added: XoopsModules/mytube/branches/mytube/admin/altcat.php =================================================================== --- XoopsModules/mytube/branches/mytube/admin/altcat.php (rev 0) +++ XoopsModules/mytube/branches/mytube/admin/altcat.php 2012-01-31 20:06:11 UTC (rev 8860) @@ -0,0 +1,156 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * - Revision By TXMod Xoops (http://www.txmodxoops.org) + * **************************************************************************** + * MYTUBE - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package mytube + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.05 Sat 2012/01/14 6:37:04 : Timgno Exp $ + * **************************************************************************** + */ + +include "admin_header.php"; +xoops_cp_header(); +global $pathImageIcon; + +//It retrieves the value of the argument in op URL$ +$op = mytube_CleanVars($_REQUEST, 'op', 'list_altcat', 'string'); +// counts the number of uncommitted gets +$criteria = new CriteriaCompo(); +$criteria->add(new Criteria('status', 0)); +$altcat_waiting = $altcatHandler->getCount($criteria); +$status_menu = mytube_CleanVars($_REQUEST, 'status_display', 1, 'int'); + +switch ($op) { +default: + case "list_altcat": + $altcat_admin = new ModuleAdmin(); + echo $altcat_admin->addNavigation('altcat.php'); + if ($status_menu == 1){ + $altcat_admin->addItemButton(_AM_MYTUBE_ALTCATNEW, 'altcat.php?op=new_altcat', 'add'); + }else{ + $altcat_admin->addItemButton(_AM_MYTUBE_ALTCAT_LIST, 'altcat.php?op=list_altcat', 'list'); + $altcat_admin->addItemButton(_AM_MYTUBE_ALTCATNEW, 'altcat.php?op=new_altcat', 'add'); + } + echo $altcat_admin->renderButton(); + $criteria = new CriteriaCompo(); + $criteria->setSort("altcat_lid"); + $criteria->setOrder("ASC"); + $numrows = $altcatHandler->getCount(); + $altcat_arr = $altcatHandler->getall($criteria); + + //Table view + if ($numrows>0) + { + echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> + <tr> + <th align=\"center\">"._AM_MYTUBE_ALTCAT_CID."</th> + <th align=\"center\" width=\"10%\">"._AM_MYTUBE_FORMACTION."</th> + </tr>"; + $class = "odd"; + foreach (array_keys($altcat_arr) as $i) + { + if ( $altcat_arr[$i]->getVar("topic_pid") == 0) + { + echo "<tr class=\"".$class."\">"; + $class = ($class == "even") ? "odd" : "even";echo "<td align='center'>".$altcat_arr[$i]->getVar("altcat_cid")."</td>"; + + echo "<td align=\"center\" width=\"10%\"> + <a href=\"altcat.php?op=edit_altcat&altcat_lid=".$altcat_arr[$i]->getVar("altcat_lid")."\"><img src=".$pathImageIcon."/edit.png alt=\""._EDIT."\" title=\""._EDIT."\"></a> + <a href=\"altcat.php?op=delete_altcat&altcat_lid=".$altcat_arr[$i]->getVar("altcat_lid")."\"><img src=".$pathImageIcon."/delete.png alt=\""._DELETE."\" title=\""._DELETE."\"></a> + </td>"; + echo "</tr>"; + } + } + echo "</table><br><br>"; + } + + // Form display + //$obj =& $altcatHandler->create(); + //$form = $obj->getForm(); + //$form->display(); + break; + + case "new_altcat": + $member_admin = new ModuleAdmin(); + echo $member_admin->addNavigation("altcat.php"); + $member_admin->addItemButton(_AM_MYTUBE_ALTCAT_LIST, 'altcat.php?op=list_altcat', 'list'); + echo $member_admin->renderButton(); + + $obj =& $altcatHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case "save_altcat": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("altcat.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["altcat_lid"])) { + $obj =& $altcatHandler->get($_REQUEST["altcat_lid"]); + } else { + $obj =& $altcatHandler->create(); + } + //Form altcat_cid + $obj->setVar("altcat_cid", $_REQUEST["altcat_cid"]); + + + if ($altcatHandler->insert($obj)) { + redirect_header("altcat.php?op=list_altcat", 2, _AM_MYTUBE_FORMOK); + } + //include_once("../include/forms.php"); + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + break; + + case "edit_altcat": + $obj = $altcatHandler->get($_REQUEST["altcat_lid"]); + $form = $obj->getForm(); + $form->display(); + break; + + case "delete_altcat": + $obj =& $altcatHandler->get($_REQUEST["altcat_lid"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("altcat.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($altcatHandler->delete($obj)) { + redirect_header("altcat.php", 3, _AM_MYTUBE_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array("ok" => 1, "altcat_lid" => $_REQUEST["altcat_lid"], "op" => "delete_altcat"), $_SERVER["REQUEST_URI"], sprintf(_AM_MYTUBE_FORMSUREDEL, $obj->getVar("altcat"))); + } + break; + +} +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/mytube/branches/mytube/admin/broken.php =================================================================== --- XoopsModules/mytube/branches/mytube/admin/broken.php (rev 0) +++ XoopsModules/mytube/branches/mytube/admin/broken.php 2012-01-31 20:06:11 UTC (rev 8860) @@ -0,0 +1,180 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * - Revision By TXMod Xoops (http://www.txmodxoops.org) + * **************************************************************************** + * MYTUBE - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package mytube + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.05 Sat 2012/01/14 6:37:04 : Timgno Exp $ + * **************************************************************************** + */ + +include "admin_header.php"; +xoops_cp_header(); +global $pathImageIcon; + +//It retrieves the value of the argument in op URL$ +$op = mytube_CleanVars($_REQUEST, 'op', 'list_broken', 'string'); +// counts the number of uncommitted gets +$criteria = new CriteriaCompo(); +$criteria->add(new Criteria('status', 0)); +$broken_waiting = $brokenHandler->getCount($criteria); +$status_menu = mytube_CleanVars($_REQUEST, 'status_display', 1, 'int'); + +switch ($op) { +default: + case "list_broken": + $broken_admin = new ModuleAdmin(); + echo $broken_admin->addNavigation('broken.php'); + if ($status_menu == 1){ + $broken_admin->addItemButton(_AM_MYTUBE_BROKENNEW, 'broken.php?op=new_broken', 'add'); + }else{ + $broken_admin->addItemButton(_AM_MYTUBE_BROKEN_LIST, 'broken.php?op=list_broken', 'list'); + $broken_admin->addItemButton(_AM_MYTUBE_BROKENNEW, 'broken.php?op=new_broken', 'add'); + } + echo $broken_admin->renderButton(); + $criteria = new CriteriaCompo(); + $criteria->setSort("broken_reportid"); + $criteria->setOrder("ASC"); + $numrows = $brokenHandler->getCount(); + $broken_arr = $brokenHandler->getall($criteria); + + //Table view + if ($numrows>0) + { + echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> + <tr> + <th align=\"center\">"._AM_MYTUBE_BROKEN_LID."</th> + <th align=\"center\">"._AM_MYTUBE_BROKEN_SENDER."</th> + <th align=\"center\">"._AM_MYTUBE_BROKEN_IP."</th> + <th align=\"center\">"._AM_MYTUBE_BROKEN_DATE."</th> + <th align=\"center\">"._AM_MYTUBE_BROKEN_CONFIRMED."</th> + <th align=\"center\">"._AM_MYTUBE_BROKEN_ACKNOWLEDGED."</th> + <th align=\"center\">"._AM_MYTUBE_BROKEN_TITLE."</th> + <th align=\"center\" width=\"10%\">"._AM_MYTUBE_FORMACTION."</th> + </tr>"; + $class = "odd"; + foreach (array_keys($broken_arr) as $i) + { + if ( $broken_arr[$i]->getVar("topic_pid") == 0) + { + echo "<tr class=\"".$class."\">"; + $class = ($class == "even") ? "odd" : "even";echo "<td align='center'>".$broken_arr[$i]->getVar("broken_lid")."</td>"; + echo "<td align='center'>".XoopsUser::getUnameFromId($broken_arr[$i]->getVar("broken_sender"),"S")."</td>"; + echo "<td align='center'>".$broken_arr[$i]->getVar("broken_ip")."</td>"; + echo "<td align='center'>".formatTimeStamp($broken_arr[$i]->getVar("broken_date"),"S")."</td>"; + echo "<td align='center'>".$broken_arr[$i]->getVar("broken_confirmed")."</td>"; + echo "<td align='center'>".$broken_arr[$i]->getVar("broken_acknowledged")."</td>"; + echo "<td align='center'>".$broken_arr[$i]->getVar("broken_title")."</td>"; + + echo "<td align=\"center\" width=\"10%\"> + <a href=\"broken.php?op=edit_broken&broken_reportid=".$broken_arr[$i]->getVar("broken_reportid")."\"><img src=".$pathImageIcon."/edit.png alt=\""._EDIT."\" title=\""._EDIT."\"></a> + <a href=\"broken.php?op=delete_broken&broken_reportid=".$broken_arr[$i]->getVar("broken_reportid")."\"><img src=".$pathImageIcon."/delete.png alt=\""._DELETE."\" title=\""._DELETE."\"></a> + </td>"; + echo "</tr>"; + } + } + echo "</table><br><br>"; + } + + // Form display + //$obj =& $brokenHandler->create(); + //$form = $obj->getForm(); + //$form->display(); + break; + + case "new_broken": + $member_admin = new ModuleAdmin(); + echo $member_admin->addNavigation("broken.php"); + $member_admin->addItemButton(_AM_MYTUBE_BROKEN_LIST, 'broken.php?op=list_broken', 'list'); + echo $member_admin->renderButton(); + + $obj =& $brokenHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case "save_broken": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("broken.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["broken_reportid"])) { + $obj =& $brokenHandler->get($_REQUEST["broken_reportid"]); + } else { + $obj =& $brokenHandler->create(); + } + //Form broken_lid + $obj->setVar("broken_lid", $_REQUEST["broken_lid"]); + //Form broken_sender + $obj->setVar("broken_sender", $_REQUEST["broken_sender"]); + //Form broken_ip + $obj->setVar("broken_ip", $_REQUEST["broken_ip"]); + //Form broken_date + $obj->setVar("broken_date", mytube_convertDate($_REQUEST["broken_date"])); + //Form broken_confirmed + $obj->setVar("broken_confirmed", $_REQUEST["broken_confirmed"]); + //Form broken_acknowledged + $obj->setVar("broken_acknowledged", $_REQUEST["broken_acknowledged"]); + //Form broken_title + $obj->setVar("broken_title", $_REQUEST["broken_title"]); + + + if ($brokenHandler->insert($obj)) { + redirect_header("broken.php?op=list_broken", 2, _AM_MYTUBE_FORMOK); + } + //include_once("../include/forms.php"); + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + break; + + case "edit_broken": + $obj = $brokenHandler->get($_REQUEST["broken_reportid"]); + $form = $obj->getForm(); + $form->display(); + break; + + case "delete_broken": + $obj =& $brokenHandler->get($_REQUEST["broken_reportid"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("broken.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($brokenHandler->delete($obj)) { + redirect_header("broken.php", 3, _AM_MYTUBE_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array("ok" => 1, "broken_reportid" => $_REQUEST["broken_reportid"], "op" => "delete_broken"), $_SERVER["REQUEST_URI"], sprintf(_AM_MYTUBE_FORMSUREDEL, $obj->getVar("broken"))); + } + break; + +} +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/mytube/branches/mytube/admin/cat.php =================================================================== --- XoopsModules/mytube/branches/mytube/admin/cat.php (rev 0) +++ XoopsModules/mytube/branches/mytube/admin/cat.php 2012-01-31 20:06:11 UTC (rev 8860) @@ -0,0 +1,245 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * - Revision By TXMod Xoops (http://www.txmodxoops.org) + * **************************************************************************** + * MYTUBE - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package mytube + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.05 Sat 2012/01/14 6:37:04 : Timgno Exp $ + * **************************************************************************** + */ + +include "admin_header.php"; +xoops_cp_header(); +global $pathImageIcon; + +//It retrieves the value of the argument in op URL$ +$op = mytube_CleanVars($_REQUEST, 'op', 'list_cat', 'string'); +// counts the number of uncommitted gets +$criteria = new CriteriaCompo(); +$criteria->add(new Criteria('status', 0)); +$cat_waiting = $catHandler->getCount($criteria); +$status_menu = mytube_CleanVars($_REQUEST, 'status_display', 1, 'int'); + +switch ($op) { +default: + case "list_cat": + $cat_admin = new ModuleAdmin(); + echo $cat_admin->addNavigation('cat.php'); + if ($status_menu == 1){ + $cat_admin->addItemButton(_AM_MYTUBE_CATNEW, 'cat.php?op=new_cat', 'add'); + }else{ + $cat_admin->addItemButton(_AM_MYTUBE_CAT_LIST, 'cat.php?op=list_cat', 'list'); + $cat_admin->addItemButton(_AM_MYTUBE_CATNEW, 'cat.php?op=new_cat', 'add'); + } + echo $cat_admin->renderButton(); + $criteria = new CriteriaCompo(); + $criteria->setSort("cat_cid"); + $criteria->setOrder("ASC"); + $numrows = $catHandler->getCount(); + $cat_arr = $catHandler->getall($criteria); + + //Table view + if ($numrows>0) + { + echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> + <tr> + <th align=\"center\">"._AM_MYTUBE_CAT_PID."</th> + <th align=\"center\">"._AM_MYTUBE_CAT_TITLE."</th> + <th align=\"center\">"._AM_MYTUBE_CAT_IMGURL."</th> + <th align=\"center\">"._AM_MYTUBE_CAT_DESCRIPTION."</th> + <th align=\"center\">"._AM_MYTUBE_CAT_TOTAL."</th> + <th align=\"center\">"._AM_MYTUBE_CAT_SPOTLIGHTTOP."</th> + <th align=\"center\">"._AM_MYTUBE_CAT_SPOTLIGHTHIS."</th> + <th align=\"center\">"._AM_MYTUBE_CAT_NOHTML."</th> + <th align=\"center\">"._AM_MYTUBE_CAT_NOSMILEY."</th> + <th align=\"center\">"._AM_MYTUBE_CAT_NOXCODES."</th> + <th align=\"center\">"._AM_MYTUBE_CAT_NOIMAGES."</th> + <th align=\"center\">"._AM_MYTUBE_CAT_NOBREAK."</th> + <th align=\"center\">"._AM_MYTUBE_CAT_WEIGHT."</th> + <th align=\"center\">"._AM_MYTUBE_CAT_CLIENT_ID."</th> + <th align=\"center\">"._AM_MYTUBE_CAT_BANNER_ID."</th> + <th align=\"center\" width=\"10%\">"._AM_MYTUBE_FORMACTION."</th> + </tr>"; + $class = "odd"; + foreach (array_keys($cat_arr) as $i) + { + if ( $cat_arr[$i]->getVar("topic_pid") == 0) + { + echo "<tr class=\"".$class."\">"; + $class = ($class == "even") ? "odd" : "even";echo "<td align='center'>".$cat_arr[$i]->getVar("cat_pid")."</td>"; + echo "<td align='center'>".$cat_arr[$i]->getVar("cat_title")."</td>"; + echo "<td align='center'><img src='".XOOPS_URL."/uploads/mytube/cat/cat_imgurl/".$cat_arr[$i]->getVar("cat_imgurl")."' height='30px' title='cat_imgurl' alt='cat_imgurl'></td>"; + echo "<td align='center'>".$cat_arr[$i]->getVar("cat_description")."</td>"; + echo "<td align='center'>".$cat_arr[$i]->getVar("cat_total")."</td>"; + echo "<td align='center'>".$cat_arr[$i]->getVar("cat_spotlighttop")."</td>"; + echo "<td align='center'>".$cat_arr[$i]->getVar("cat_spotlighthis")."</td>"; + + $verif_cat_nohtml = ( $cat_arr[$i]->getVar("cat_nohtml") == 1 ) ? _YES : _NO; + echo "<td align='center'>".$verif_cat_nohtml."</td>"; + + $verif_cat_nosmiley = ( $cat_arr[$i]->getVar("cat_nosmiley") == 1 ) ? _YES : _NO; + echo "<td align='center'>".$verif_cat_nosmiley."</td>"; + + $verif_cat_noxcodes = ( $cat_arr[$i]->getVar("cat_noxcodes") == 1 ) ? _YES : _NO; + echo "<td align='center'>".$verif_cat_noxcodes."</td>"; + + $verif_cat_noimages = ( $cat_arr[$i]->getVar("cat_noimages") == 1 ) ? _YES : _NO; + echo "<td align='center'>".$verif_cat_noimages."</td>"; + + $verif_cat_nobreak = ( $cat_arr[$i]->getVar("cat_nobreak") == 1 ) ? _YES : _NO; + echo "<td align='center'>".$verif_cat_nobreak."</td>"; + echo "<td align='center'>".$cat_arr[$i]->getVar("cat_weight")."</td>"; + echo "<td align='center'>".XoopsUser::getUnameFromId($cat_arr[$i]->getVar("cat_client_id"),"S")."</td>"; + echo "<td align='center'>".$cat_arr[$i]->getVar("cat_banner_id")."</td>"; + + echo "<td align=\"center\" width=\"10%\"> + <a href=\"cat.php?op=edit_cat&cat_cid=".$cat_arr[$i]->getVar("cat_cid")."\"><img src=".$pathImageIcon."/edit.png alt=\""._EDIT."\" title=\""._EDIT."\"></a> + <a href=\"cat.php?op=delete_cat&cat_cid=".$cat_arr[$i]->getVar("cat_cid")."\"><img src=".$pathImageIcon."/delete.png alt=\""._DELETE."\" title=\""._DELETE."\"></a> + </td>"; + echo "</tr>"; + } + } + echo "</table><br><br>"; + } + + // Form display + //$obj =& $catHandler->create(); + //$form = $obj->getForm(); + //$form->display(); + break; + + case "new_cat": + $member_admin = new ModuleAdmin(); + echo $member_admin->addNavigation("cat.php"); + $member_admin->addItemButton(_AM_MYTUBE_CAT_LIST, 'cat.php?op=list_cat', 'list'); + echo $member_admin->renderButton(); + + $obj =& $catHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case "save_cat": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("cat.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["cat_cid"])) { + $obj =& $catHandler->get($_REQUEST["cat_cid"]); + } else { + $obj =& $catHandler->create(); + } + //Form cat_pid + $obj->setVar("cat_pid", $_REQUEST["cat_pid"]); + //Form cat_title + $obj->setVar("cat_title", $_REQUEST["cat_title"]); + //Form cat_imgurl + include_once XOOPS_ROOT_PATH."/class/uploader.php"; + $uploaddir_cat_imgurl = XOOPS_ROOT_PATH."/uploads/mytube/cat/cat_imgurl/"; + $uploader_cat_imgurl = new XoopsMediaUploader($uploaddir_cat_imgurl, + $GLOBALS["xoopsModuleConfig"]["cat_imgurl_mimetypes"], + $GLOBALS["xoopsModuleConfig"]["cat_imgurl_size"], + null, null); + + if ($uploader_cat_imgurl->fetchMedia("cat_imgurl")) { + $uploader_cat_imgurl->setPrefix("cat_imgurl_") ; + $uploader_cat_imgurl->fetchMedia("cat_imgurl"); + if (!$uploader_cat_imgurl->upload()) { + $errors = $uploader_cat_imgurl->getErrors(); + redirect_header("javascript:history.go(-1)",3, $errors); + } else { + $obj->setVar("cat_imgurl", $uploader_cat_imgurl->getSavedFileName()); + } + } else { + $obj->setVar("cat_imgurl", $_REQUEST["cat_imgurl"]); + } + //Form cat_description + $obj->setVar("cat_description", $_REQUEST["cat_description"]); + //Form cat_total + $obj->setVar("cat_total", $_REQUEST["cat_total"]); + //Form cat_spotlighttop + $obj->setVar("cat_spotlighttop", $_REQUEST["cat_spotlighttop"]); + //Form cat_spotlighthis + $obj->setVar("cat_spotlighthis", $_REQUEST["cat_spotlighthis"]); + //Form cat_nohtml + $verif_cat_nohtml = ($_REQUEST["cat_nohtml"] == 1) ? "1" : "0"; + $obj->setVar("cat_nohtml", $verif_cat_nohtml); + //Form cat_nosmiley + $verif_cat_nosmiley = ($_REQUEST["cat_nosmiley"] == 1) ? "1" : "0"; + $obj->setVar("cat_nosmiley", $verif_cat_nosmiley); + //Form cat_noxcodes + $verif_cat_noxcodes = ($_REQUEST["cat_noxcodes"] == 1) ? "1" : "0"; + $obj->setVar("cat_noxcodes", $verif_cat_noxcodes); + //Form cat_noimages + $verif_cat_noimages = ($_REQUEST["cat_noimages"] == 1) ? "1" : "0"; + $obj->setVar("cat_noimages", $verif_cat_noimages); + //Form cat_nobreak + $verif_cat_nobreak = ($_REQUEST["cat_nobreak"] == 1) ? "1" : "0"; + $obj->setVar("cat_nobreak", $verif_cat_nobreak); + //Form cat_weight + $obj->setVar("cat_weight", $_REQUEST["cat_weight"]); + //Form cat_client_id + $obj->setVar("cat_client_id", $_REQUEST["cat_client_id"]); + //Form cat_banner_id + $obj->setVar("cat_banner_id", $_REQUEST["cat_banner_id"]); + + + if ($catHandler->insert($obj)) { + redirect_header("cat.php?op=list_cat", 2, _AM_MYTUBE_FORMOK); + } + //include_once("../include/forms.php"); + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + break; + + case "edit_cat": + $obj = $catHandler->get($_REQUEST["cat_cid"]); + $form = $obj->getForm(); + $form->display(); + break; + + case "delete_cat": + $obj =& $catHandler->get($_REQUEST["cat_cid"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("cat.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($catHandler->delete($obj)) { + redirect_header("cat.php", 3, _AM_MYTUBE_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array("ok" => 1, "cat_cid" => $_REQUEST["cat_cid"], "op" => "delete_cat"), $_SERVER["REQUEST_URI"], sprintf(_AM_MYTUBE_FORMSUREDEL, $obj->getVar("cat"))); + } + break; + +} +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/mytube/branches/mytube/admin/index.html =================================================================== --- XoopsModules/mytube/branches/mytube/admin/index.html (rev 0) +++ XoopsModules/mytube/branches/mytube/admin/index.html 2012-01-31 20:06:11 UTC (rev 8860) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/mytube/branches/mytube/admin/index.php =================================================================== --- XoopsModules/mytube/branches/mytube/admin/index.php (rev 0) +++ XoopsModules/mytube/branches/mytube/admin/index.php 2012-01-31 20:06:11 UTC (rev 8860) @@ -0,0 +1,68 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * - Revision By TXMod Xoops (http://www.txmodxoops.org) + * **************************************************************************** + * MYTUBE - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package mytube + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.05 Sat 2012/01/14 6:37:04 : Timgno Exp $ + * **************************************************************************** + */ + +include "admin_header.php"; +xoops_cp_header(); + $indexAdmin = new ModuleAdmin(); + //account "total" + $count_altcat = $altcatHandler->getCount(); + //account "total" + $count_broken = $brokenHandler->getCount(); + //account "total" + $count_cat = $catHandler->getCount(); + //account "total" + $count_mod = $modHandler->getCount(); + //account "total" + $count_videos = $videosHandler->getCount(); + //account "total" + $count_votedata = $votedataHandler->getCount(); + $indexAdmin->addInfoBox(_AM_MYTUBE_ALTCAT); + $indexAdmin->addInfoBoxLine(_AM_MYTUBE_ALTCAT,_AM_MYTUBE_THEREARE_ALTCAT, $count_altcat) ; + $indexAdmin->addInfoBox(_AM_MYTUBE_BROKEN); + $indexAdmin->addInfoBoxLine(_AM_MYTUBE_BROKEN,_AM_MYTUBE_THEREARE_BROKEN, $count_broken) ; + $indexAdmin->addInfoBox(_AM_MYTUBE_CAT); + $indexAdmin->addInfoBoxLine(_AM_MYTUBE_CAT,_AM_MYTUBE_THEREARE_CAT, $count_cat) ; + $indexAdmin->addInfoBox(_AM_MYTUBE_MOD); + $indexAdmin->addInfoBoxLine(_AM_MYTUBE_MOD,_AM_MYTUBE_THEREARE_MOD, $count_mod) ; + $indexAdmin->addInfoBox(_AM_MYTUBE_VIDEOS); + $indexAdmin->addInfoBoxLine(_AM_MYTUBE_VIDEOS,_AM_MYTUBE_THEREARE_VIDEOS, $count_videos) ; + $indexAdmin->addInfoBox(_AM_MYTUBE_VOTEDATA); + $indexAdmin->addInfoBoxLine(_AM_MYTUBE_VOTEDATA,_AM_MYTUBE_THEREARE_VOTEDATA, $count_votedata) ; + echo $indexAdmin->addNavigation("index.php"); + echo $indexAdmin->renderIndex(); +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/mytube/branches/mytube/admin/menu.php =================================================================== --- XoopsModules/mytube/branches/mytube/admin/menu.php (rev 0) +++ XoopsModules/mytube/branches/mytube/admin/menu.php 2012-01-31 20:06:11 UTC (rev 8860) @@ -0,0 +1,89 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * - Revision By TXMod Xoops (http://www.txmodxoops.org) + * **************************************************************************** + * MYTUBE - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package mytube + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.05 Sat 2012/01/14 6:37:04 : Timgno Exp $ + * **************************************************************************** + */ + + +$dirname = basename( dirname( dirname( __FILE__ ) ) ) ; + +$module_handler =& xoops_gethandler("module"); +$xoopsModule =& XoopsModule::getByDirname($dirname); +$moduleInfo =& $module_handler->get($xoopsModule->getVar("mid")); +$pathImageAdmin = $moduleInfo->getInfo("icons32"); + +$adminmenu = array(); + +$i = 1; +$adminmenu[$i]["title"] = _MI_MYTUBE_ADMENU1; +$adminmenu[$i]["link"] = "admin/index.php"; +//$adminmenu[$i]["desc"] = _MI_MYTUBE_ADMENU1_DESC; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/home.png"; +$i++; +$adminmenu[$i]["title"] = _MI_MYTUBE_ADMENU2; +$adminmenu[$i]["link"] = "admin/altcat.php"; +//$adminmenu[$i]["desc"] = _MI_MYTUBE_ADMENU2_DESC +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/video_clip.png"; +$i++; +$adminmenu[$i]["title"] = _MI_MYTUBE_ADMENU3; +$adminmenu[$i]["link"] = "admin/broken.php"; +//$adminmenu[$i]["desc"] = _MI_MYTUBE_ADMENU3_DESC +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/video_broken.png"; +$i++; +$adminmenu[$i]["title"] = _MI_MYTUBE_ADMENU4; +$adminmenu[$i]["link"] = "admin/cat.php"; +//$adminmenu[$i]["desc"] = _MI_MYTUBE_ADMENU4_DESC +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/video_cat.png"; +$i++; +$adminmenu[$i]["title"] = _MI_MYTUBE_ADMENU5; +$adminmenu[$i]["link"] = "admin/mod.php"; +//$adminmenu[$i]["desc"] = _MI_MYTUBE_ADMENU5_DESC +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/video_mod.png"; +$i++; +$adminmenu[$i]["title"] = _MI_MYTUBE_ADMENU6; +$adminmenu[$i]["link"] = "admin/videos.php"; +//$adminmenu[$i]["desc"] = _MI_MYTUBE_ADMENU6_DESC +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/New video.png"; +$i++; +$adminmenu[$i]["title"] = _MI_MYTUBE_ADMENU7; +$adminmenu[$i]["link"] = "admin/votedata.php"; +//$adminmenu[$i]["desc"] = _MI_MYTUBE_ADMENU7_DESC +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/video_votedata.png"; +$i++; +$adminmenu[$i]["title"] = _MI_MYTUBE_ADMENU8; +$adminmenu[$i]["link"] = "admin/about.php"; +//$adminmenu[$i]["desc"] = _MI_MYTUBE_ADMENU8_DESC; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/about.png"; +unset( $i ); +?> \ No newline at end of file Added: XoopsModules/mytube/branches/mytube/admin/mod.php =================================================================== --- XoopsModules/mytube/branches/mytube/admin/mod.php (rev 0) +++ XoopsModules/mytube/branches/mytube/admin/mod.php 2012-01-31 20:06:11 UTC (rev 8860) @@ -0,0 +1,256 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * - Revision By TXMod Xoops (http://www.txmodxoops.org) + * **************************************************************************** + * MYTUBE - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package mytube + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.05 Sat 2012/01/14 6:37:04 : Timgno Exp $ + * **************************************************************************** + */ + +include "admin_header.php"; +xoops_cp_header(); +global $pathImageIcon; + +//It retrieves the value of the argument in op URL$ +$op = mytube_CleanVars($_REQUEST, 'op', 'list_mod', 'string'); +// counts the number of uncommitted gets +$criteria = new CriteriaCompo(); +$criteria->add(new Criteria('status', 0)); +$mod_waiting = $modHandler->getCount($criteria); +$status_menu = mytube_CleanVars($_REQUEST, 'status_display', 1, 'int'); + +switch ($op) { +default: + case "list_mod": + $mod_admin = new ModuleAdmin(); + echo $mod_admin->addNavigation('mod.php'); + if ($status_menu == 1){ + $mod_admin->addItemButton(_AM_MYTUBE_MODNEW, 'mod.php?op=new_mod', 'add'); + }else{ + $mod_admin->addItemButton(_AM_MYTUBE_MOD_LIST, 'mod.php?op=list_mod', 'list'); + $mod_admin->addItemButton(_AM_MYTUBE_MODNEW, 'mod.php?op=new_mod', 'add'); + } + echo $mod_admin->renderButton(); + $criteria = new CriteriaCompo(); + $criteria->setSort("mod_requestid"); + $criteria->setOrder("ASC"); + $numrows = $modHandler->getCount(); + $mod_arr = $modHandler->getall($criteria); + + //Table view + if ($numrows>0) + { + echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> + <tr> + <th align=\"center\">"._AM_MYTUBE_MOD_LID."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_CID."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_TITLE."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_VIDID."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_SCREENSHOT."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_SUBMITTER."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_PUBLISHER."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_STATUS."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_DATE."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_HITS."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_RATING."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_VOTES."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_COMMENTS."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_VIDSOURCE."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_PUBLISHED."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_EXPIRED."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_UPDATED."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_OFFLINE."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_DESCRIPTION."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_MODIFYSUBMITTER."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_REQUESTDATE."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_VIDRATING."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_TIME."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_KEYWORDS."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_ITEM_TAG."</th> + <th align=\"center\">"._AM_MYTUBE_MOD_PICURL."</th> + <th align=\"center\" width=\"10%\">"._AM_MYTUBE_FORMACTION."</th> + </tr>"; + $class = "odd"; + foreach (array_keys($mod_arr) as $i) + { + if ( $mod_arr[$i]->getVar("topic_pid") == 0) + { + echo "<tr class=\"".$class."\">"; + $class = ($class == "even") ? "odd" : "even";echo "<td align='center'>".$mod_arr[$i]->getVar("mod_lid")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_cid")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_title")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_vidid")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_screenshot")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_submitter")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_publisher")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_status")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_date")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_hits")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_rating")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_votes")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_comments")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_vidsource")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_published")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_expired")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_updated")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_offline")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_description")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_modifysubmitter")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_requestdate")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_vidrating")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_time")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_keywords")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_item_tag")."</td>"; + echo "<td align='center'>".$mod_arr[$i]->getVar("mod_picurl")."</td>"; + + echo "<td align=\"center\" width=\"10%\"> + <a href=\"mod.php?op=edit_mod&mod_requestid=".$mod_arr[$i]->getVar("mod_requestid")."\"><img src=".$pathImageIcon."/edit.png alt=\""._EDIT."\" title=\""._EDIT."\"></a> + <a href=\"mod.php?op=delete_mod&mod_requestid=".$mod_arr[$i]->getVar("mod_requestid")."\"><img src=".$pathImageIcon."/delete.png alt=\""._DELETE."\" title=\""._DELETE."\"></a> + </td>"; + echo "</tr>"; + } + } + echo "</table><br><br>"; + } + + // Form display + //$obj =& $modHandler->create(); + //$form = $obj->getForm(); + //$form->display(); + break; + + case "new_mod": + $member_admin = new ModuleAdmin(); + echo $member_admin->addNavigation("mod.php"); + $member_admin->addItemButton(_AM_MYTUBE_MOD_LIST, 'mod.php?op=list_mod', 'list'); + echo $member_admin->renderButton(); + + $obj =& $modHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case "save_mod": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("mod.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["mod_requestid"])) { + $obj =& $modHandler->get($_REQUEST["mod_requestid"]); + } else { + $obj =& $modHandler->create(); + } + //Form mod_lid + $obj->setVar("mod_lid", $_REQUEST["mod_lid"]); + //Form mod_cid + $obj->setVar("mod_cid", $_REQUEST["mod_cid"]); + //Form mod_title + $obj->setVar("mod_title", $_REQUEST["mod_title"]); + //Form mod_vidid + $obj->setVar("mod_vidid", $_REQUEST["mod_vidid"]); + //Form mod_screenshot + $obj->setVar("mod_screenshot", $_REQUEST["mod_screenshot"]); + //Form mod_submitter + $obj->setVar("mod_submitter", $_REQUEST["mod_submitter"]); + //Form mod_publisher + $obj->setVar("mod_publisher", $_REQUEST["mod_publisher"]); + //Form mod_status + $obj->setVar("mod_status", $_REQUEST["mod_status"]); + //Form mod_date + $obj->setVar("mod_date", $_REQUEST["mod_date"]); + //Form mod_hits + $obj->setVar("mod_hits", $_REQUEST["mod_hits"]); + //Form mod_rating + $obj->setVar("mod_rating", $_REQUEST["mod_rating"]); + //Form mod_votes + $obj->setVar("mod_votes", $_REQUEST["mod_votes"]); + //Form mod_comments + $obj->setVar("mod_comments", $_REQUEST["mod_comments"]); + //Form mod_vidsource + $obj->setVar("mod_vidsource", $_REQUEST["mod_vidsource"]); + //Form mod_published + $obj->setVar("mod_published", $_REQUEST["mod_published"]); + //Form mod_expired + $obj->setVar("mod_expired", $_REQUEST["mod_expired"]); + //Form mo... [truncated message content] |