From: <txm...@us...> - 2012-02-15 13:44:44
|
Revision: 8998 http://xoops.svn.sourceforge.net/xoops/?rev=8998&view=rev Author: txmodxoops Date: 2012-02-15 13:44:29 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Module videostream v1.32 Added Paths: ----------- XoopsModules/videostream/ XoopsModules/videostream/branches/ XoopsModules/videostream/releases/ XoopsModules/videostream/releases/1.32/ XoopsModules/videostream/releases/1.32/videostream/ XoopsModules/videostream/releases/1.32/videostream/admin/ XoopsModules/videostream/releases/1.32/videostream/admin/about.php XoopsModules/videostream/releases/1.32/videostream/admin/admin_footer.php XoopsModules/videostream/releases/1.32/videostream/admin/admin_header.php XoopsModules/videostream/releases/1.32/videostream/admin/header.php XoopsModules/videostream/releases/1.32/videostream/admin/index.html XoopsModules/videostream/releases/1.32/videostream/admin/index.php XoopsModules/videostream/releases/1.32/videostream/admin/list.php XoopsModules/videostream/releases/1.32/videostream/admin/menu.php XoopsModules/videostream/releases/1.32/videostream/admin/permissions.php XoopsModules/videostream/releases/1.32/videostream/admin/stream.php XoopsModules/videostream/releases/1.32/videostream/blocks/ XoopsModules/videostream/releases/1.32/videostream/blocks/blocks_list.php XoopsModules/videostream/releases/1.32/videostream/blocks/blocks_stream.php XoopsModules/videostream/releases/1.32/videostream/blocks/index.html XoopsModules/videostream/releases/1.32/videostream/class/ XoopsModules/videostream/releases/1.32/videostream/class/index.html XoopsModules/videostream/releases/1.32/videostream/class/list.php XoopsModules/videostream/releases/1.32/videostream/class/menu.php XoopsModules/videostream/releases/1.32/videostream/class/object.php XoopsModules/videostream/releases/1.32/videostream/class/stream.php XoopsModules/videostream/releases/1.32/videostream/comment_delete.php XoopsModules/videostream/releases/1.32/videostream/comment_edit.php XoopsModules/videostream/releases/1.32/videostream/comment_new.php XoopsModules/videostream/releases/1.32/videostream/comment_post.php XoopsModules/videostream/releases/1.32/videostream/comment_reply.php XoopsModules/videostream/releases/1.32/videostream/images/ XoopsModules/videostream/releases/1.32/videostream/images/TDMLogo.png XoopsModules/videostream/releases/1.32/videostream/images/blank.gif XoopsModules/videostream/releases/1.32/videostream/images/deco/ XoopsModules/videostream/releases/1.32/videostream/images/deco/about.png XoopsModules/videostream/releases/1.32/videostream/images/deco/arrow.gif XoopsModules/videostream/releases/1.32/videostream/images/deco/contact.png XoopsModules/videostream/releases/1.32/videostream/images/deco/delete.gif XoopsModules/videostream/releases/1.32/videostream/images/deco/edit.gif XoopsModules/videostream/releases/1.32/videostream/images/deco/index.html XoopsModules/videostream/releases/1.32/videostream/images/deco/index.png XoopsModules/videostream/releases/1.32/videostream/images/deco/list_search.png XoopsModules/videostream/releases/1.32/videostream/images/deco/off.gif XoopsModules/videostream/releases/1.32/videostream/images/deco/on.gif XoopsModules/videostream/releases/1.32/videostream/images/deco/permissions.png XoopsModules/videostream/releases/1.32/videostream/images/deco/pref.png XoopsModules/videostream/releases/1.32/videostream/images/deco/topic.png XoopsModules/videostream/releases/1.32/videostream/images/deco/update.png XoopsModules/videostream/releases/1.32/videostream/images/index.html XoopsModules/videostream/releases/1.32/videostream/images/menu/ XoopsModules/videostream/releases/1.32/videostream/images/menu/bg.png XoopsModules/videostream/releases/1.32/videostream/images/menu/index.html XoopsModules/videostream/releases/1.32/videostream/images/menu/left_both.png XoopsModules/videostream/releases/1.32/videostream/images/menu/right_both.png XoopsModules/videostream/releases/1.32/videostream/include/ XoopsModules/videostream/releases/1.32/videostream/include/functions.php XoopsModules/videostream/releases/1.32/videostream/include/index.html XoopsModules/videostream/releases/1.32/videostream/include/install.php XoopsModules/videostream/releases/1.32/videostream/include/search.inc.php XoopsModules/videostream/releases/1.32/videostream/index.php XoopsModules/videostream/releases/1.32/videostream/language/ XoopsModules/videostream/releases/1.32/videostream/language/english/ XoopsModules/videostream/releases/1.32/videostream/language/english/admin.php XoopsModules/videostream/releases/1.32/videostream/language/english/blocks.php XoopsModules/videostream/releases/1.32/videostream/language/english/index.html XoopsModules/videostream/releases/1.32/videostream/language/english/main.php XoopsModules/videostream/releases/1.32/videostream/language/english/modinfo.php XoopsModules/videostream/releases/1.32/videostream/language/french/ XoopsModules/videostream/releases/1.32/videostream/language/french/admin.php XoopsModules/videostream/releases/1.32/videostream/language/french/blocks.php XoopsModules/videostream/releases/1.32/videostream/language/french/index.html XoopsModules/videostream/releases/1.32/videostream/language/french/main.php XoopsModules/videostream/releases/1.32/videostream/language/french/modinfo.php XoopsModules/videostream/releases/1.32/videostream/language/index.html XoopsModules/videostream/releases/1.32/videostream/language/italian/ XoopsModules/videostream/releases/1.32/videostream/language/italian/admin.php XoopsModules/videostream/releases/1.32/videostream/language/italian/blocks.php XoopsModules/videostream/releases/1.32/videostream/language/italian/index.html XoopsModules/videostream/releases/1.32/videostream/language/italian/main.php XoopsModules/videostream/releases/1.32/videostream/language/italian/modinfo.php XoopsModules/videostream/releases/1.32/videostream/sql/ XoopsModules/videostream/releases/1.32/videostream/sql/index.html XoopsModules/videostream/releases/1.32/videostream/sql/mysql.sql XoopsModules/videostream/releases/1.32/videostream/templates/ XoopsModules/videostream/releases/1.32/videostream/templates/blocks/ XoopsModules/videostream/releases/1.32/videostream/templates/blocks/index.html XoopsModules/videostream/releases/1.32/videostream/templates/blocks/videostream_list_block_day.html XoopsModules/videostream/releases/1.32/videostream/templates/blocks/videostream_list_block_random.html XoopsModules/videostream/releases/1.32/videostream/templates/blocks/videostream_list_block_recent.html XoopsModules/videostream/releases/1.32/videostream/templates/blocks/videostream_stream_block_day.html XoopsModules/videostream/releases/1.32/videostream/templates/blocks/videostream_stream_block_random.html XoopsModules/videostream/releases/1.32/videostream/templates/blocks/videostream_stream_block_recent.html XoopsModules/videostream/releases/1.32/videostream/templates/index.html XoopsModules/videostream/releases/1.32/videostream/xoops_version.php XoopsModules/videostream/trunk/ Added: XoopsModules/videostream/releases/1.32/videostream/admin/about.php =================================================================== --- XoopsModules/videostream/releases/1.32/videostream/admin/about.php (rev 0) +++ XoopsModules/videostream/releases/1.32/videostream/admin/about.php 2012-02-15 13:44:29 UTC (rev 8998) @@ -0,0 +1,116 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Video Stream - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://txmod.webuda.com) + * + * 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 timgno (http://txmod.webuda.com) + * @license GPL + * @package Video Stream + * @author timgno (txm...@gm...) + * + * Version : 1.32: + * **************************************************************************** + */ + +include_once("admin_header.php"); + +xoops_cp_header(); + +if ( !is_readable(XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php")) { +videostream_adminmenu(2, _AM_VIDEOSTREAM_MANAGER_ABOUT); + +echo "<style> +.CPbigTitle{ + font-size: 20px; + color: #1E90FF; + background: no-repeat left top; + font-weight: bold; + height: 40px; + vertical-align: middle; + padding: 10px 0 0 50px; + border-bottom: 3px solid #1E90FF; +} +</style>"; +} else { +include_once XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php"; +loadModuleAdminMenu (2, _AM_VIDEOSTREAM_MANAGER_ABOUT); +} + +//menu +echo "<div class=\"CPbigTitle\" style=\"background-image: url(../images/deco/about.png); background-repeat: no-repeat; background-position: left; padding-left: 50px;\"><strong>"._AM_VIDEOSTREAM_MANAGER_ABOUT."</strong> +</div><br />"; + +$versioninfo =& $module_handler->get( $xoopsModule->getVar("mid") ); + +echo "<style type=\"text/css\"> + label,text { + display: block; + float: left; + margin-bottom: 2px; + } + label { + text-align: right; + width: 150px; + padding-right: 20px; + } + br { + clear: left; + } + </style> + + <fieldset> + <legend style=\"font-weight: bold; color: #900;\">".$xoopsModule->getVar("name")."</legend> + <div style=\"padding: 8px;\"> + <img src=\"".XOOPS_URL."/modules/".$xoopsModule->getVar("dirname")."/".$versioninfo->getInfo("image")."\" alt=\"\" hspace=\"10\" vspace=\"0\" /></a>\n + <div style=\"padding: 5px;\"><strong>".$versioninfo->getInfo("name")." version ".$versioninfo->getInfo("version")."</strong></div>\n + <label>"._AM_VIDEOSTREAM_ABOUT_RELEASEDATE.":</label><text>".$versioninfo->getInfo("release")."</text><br /> + <label>"._AM_VIDEOSTREAM_ABOUT_AUTHOR.":</label><text>".$versioninfo->getInfo("author")."</text><br /> + <label>"._AM_VIDEOSTREAM_ABOUT_CREDITS.":</label><text>".$versioninfo->getInfo("credits")."</text><br /> + <label>"._AM_VIDEOSTREAM_ABOUT_LICENSE.":</label><text><a href=\"".$versioninfo->getInfo("license_file")."\" target=\"_blank\" >".$versioninfo->getInfo("license")."</a></text>\n + </div> + </fieldset> +<br clear=\"all\"/> + + <fieldset> + <legend style=\"font-weight: bold; color: #900;\">"._AM_VIDEOSTREAM_ABOUT_MODULE_INFO."</legend> + <div style=\"padding: 8px;\"> + <label>"._AM_VIDEOSTREAM_ABOUT_MODULE_STATUS.":</label><text>".$versioninfo->getInfo("module_status")."</text><br /> + <label>"._AM_VIDEOSTREAM_ABOUT_WEBSITE.":</label><text><a href=\"".$versioninfo->getInfo("module_website_url")."\" target=\"_blank\">".$versioninfo->getInfo("module_website_name")."</a></text><br /> + </div> + </fieldset> +<br clear=\"all\" /> + + <fieldset> + <legend style=\"font-weight: bold; color: #900;\">"._AM_VIDEOSTREAM_ABOUT_AUTHOR_INFO."</legend> + <div style=\"padding: 8px;\"> + <label>"._AM_VIDEOSTREAM_ABOUT_AUTHOR_NAME.":</label><text>".$versioninfo->getInfo("author")."</text><br /> + <label>"._AM_VIDEOSTREAM_ABOUT_WEBSITE.":</label><text><a href=\"".$versioninfo->getInfo("author_website_url")."\" target=\"_blank\">".$versioninfo->getInfo("author_website_name")."</a></text><br /> + </div> + </fieldset> +<br clear=\"all\" />"; + +$file = XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/changelog.txt"; + +if ( is_readable( $file ) ){ +echo "<fieldset> + <legend style=\"font-weight: bold; color: #900;\">"._AM_VIDEOSTREAM_ABOUT_CHANGELOG."</legend> + <div style=\"padding: 8px;\"> + <div>".implode("<br />", file( $file ))."</div> + </div> + </fieldset> + <br clear=\"all\" />"; + +} +include_once("admin_footer.php"); +xoops_cp_footer(); +?> \ No newline at end of file Added: XoopsModules/videostream/releases/1.32/videostream/admin/admin_footer.php =================================================================== --- XoopsModules/videostream/releases/1.32/videostream/admin/admin_footer.php (rev 0) +++ XoopsModules/videostream/releases/1.32/videostream/admin/admin_footer.php 2012-02-15 13:44:29 UTC (rev 8998) @@ -0,0 +1,29 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Video Stream - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://txmod.webuda.com) + * + * 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 timgno (http://txmod.webuda.com) + * @license GPL + * @package Video Stream + * @author timgno (txm...@gm...) + * + * Version : 1.32: + * **************************************************************************** + */ + +echo "<br /><br />\n + <div align=\"center\"><a href=\"http://www.tdmxoops.net\" target=\"_blank\">\n + <img src=\"http://www.tdmxoops.net/images/logo_modules.gif\" alt=\"TDM\" title=\"TDM\"></a></div> +"; +?> \ No newline at end of file Added: XoopsModules/videostream/releases/1.32/videostream/admin/admin_header.php =================================================================== --- XoopsModules/videostream/releases/1.32/videostream/admin/admin_header.php (rev 0) +++ XoopsModules/videostream/releases/1.32/videostream/admin/admin_header.php 2012-02-15 13:44:29 UTC (rev 8998) @@ -0,0 +1,110 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Video Stream - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://txmod.webuda.com) + * + * 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 timgno (http://txmod.webuda.com) + * @license GPL + * @package Video Stream + * @author timgno (txm...@gm...) + * + * Version : 1.32: + * **************************************************************************** + */ + +include "../../../include/cp_header.php"; + +include_once(XOOPS_ROOT_PATH."/class/xoopsmodule.php"); +include_once XOOPS_ROOT_PATH."/class/xoopstree.php"; +include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; +include_once XOOPS_ROOT_PATH."/class/tree.php"; +include_once XOOPS_ROOT_PATH."/class/xoopslists.php"; +include_once XOOPS_ROOT_PATH."/class/pagenav.php"; +include_once XOOPS_ROOT_PATH."/class/xoopstopic.php"; +include_once XOOPS_ROOT_PATH."/class/xoopsform/grouppermform.php"; +include_once("../include/functions.php"); + +$myts =& MyTextSanitizer::getInstance(); +include_once XOOPS_ROOT_PATH."/modules/videostream/class/stream.php"; + +if ( $xoopsUser ) { + $xoopsModule = XoopsModule::getByDirname("videostream"); + if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + redirect_header(XOOPS_URL."/",3,_NOPERM); + exit(); + } +} else { + redirect_header(XOOPS_URL."/",3,_NOPERM); + exit(); +} + +// Include language file +xoops_loadLanguage("admin", "system"); +xoops_loadLanguage("admin", $xoopsModule->getVar("dirname", "e")); +xoops_loadLanguage("modinfo", $xoopsModule->getVar("dirname", "e")); + +function videostream_adminmenu ($currentoption = 0, $breadcrumb = "") +{ + global $xoopsModule, $xoopsConfig; + + echo " + <style type=\"text/css\"> + #buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; } + #buttonbar { float:left; width:100%; background: #e7e7e7 url(".XOOPS_URL."/modules/videostream/images/menu/bg.png) repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; } + #buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; } + #buttonbar li { display:inline; margin:0; padding:0; } + #buttonbar a { float:left; background:url(".XOOPS_URL."/modules/videostream/images/deco/left_both.png) no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; } + #buttonbar a span { float:left; display:block; background:url(".XOOPS_URL."/modules/videostream/images/deco/right_both.png) no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; } + #buttonbar a span {float:none;} + #buttonbar a:hover span { color:#333; } + #buttonbar #current a { background-position:0 -150px; border-width:0; } + #buttonbar #current a span { background-position:100% -150px; padding-bottom:5px; color:#333; } + #buttonbar a:hover { background-position:0% -150px; } + #buttonbar a:hover span { background-position:100% -150px; } + </style> + "; + + $tblColors = Array(); + $tblColors[0] = $tblColors[1] = $tblColors[2] = $tblColors[3] = $tblColors[4] = $tblColors[5] = $tblColors[6] = $tblColors[7] = $tblColors[8] = ""; + $tblColors[$currentoption] = "current"; + if (file_exists("".XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/language/".$xoopsConfig["language"]."/modinfo.php")) { + include_once("".XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/language/".$xoopsConfig["language"]."/modinfo.php"); + } else { + include_once("".XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/english/modinfo.php"); + } + + echo "<div id=\"buttontop\"> + <table style=\"width: 100%; padding: 0;\" cellspacing=\"0\"> + <tr> + <td style=\"font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;\"> + <a class=\"nobutton\" href=\"".XOOPS_URL."/modules/system/admin.php?fct=preferences&op=showmod&mod=".$myts->displayTarea($xoopsModule->getVar("mid"))."\">_AM_VIDEOSTREAM_GENERALSET</a> + | <a href=\"".XOOPS_URL."/modules/videostream/index.php\">_AM_VIDEOSTREAM_GOINDEX</a> + | <a href=\"".XOOPS_URL."/modules/videostream/admin/upgrade.php\">_AM_VIDEOSTREAM_UPGRADE</a> + </td> + <td style=\"font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;\"><b>".$myts->displayTarea($xoopsModule->name())."</b></td> + </tr> + </table> + </div> + + <div id=\"buttonbar\"> + <ul><li id=\"$tblColors[0]\"><a href=\"".XOOPS_URL."/modules/videostream/admin/index.php\"><span>_MI_VIDEOSTREAM_MANAGER_INDEX</span></a></li> + <li id=\"$tblColors[1]\"><a href=\"".XOOPS_URL."/modules/videostream/admin/stream.php\"><span>_MI_VIDEOSTREAM_MANAGER_STREAM</span></a></li> + + <li id=\"$tblColors[2]\"><a href=\"".XOOPS_URL."/modules/videostream/admin/permissions.php\"><span>_MI_VIDEOSTREAM_MANAGER_PERMISSIONS</span></a></li> + <li id=\"$tblColors[3]\"><a href=\"".XOOPS_URL."/modules/videostream/admin/about.php\"><span>_MI_VIDEOSTREAM_MANAGER_ABOUT</span></a></li> + </ul></div>"; +} + +$streamHandler =& xoops_getModuleHandler("videostream_stream", "videostream"); + +?> \ No newline at end of file Added: XoopsModules/videostream/releases/1.32/videostream/admin/header.php =================================================================== --- XoopsModules/videostream/releases/1.32/videostream/admin/header.php (rev 0) +++ XoopsModules/videostream/releases/1.32/videostream/admin/header.php 2012-02-15 13:44:29 UTC (rev 8998) @@ -0,0 +1,110 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * videostream - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://txmod.webuda.com) + * + * 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 timgno (http://txmod.webuda.com) + * @license GPL + * @package videostream + * @author timgno (http://txmod.webuda.com) + * + * Version : 1.00: + * **************************************************************************** + */ + +include "../../../include/cp_header.php"; + +include_once(XOOPS_ROOT_PATH."/class/xoopsmodule.php"); +include_once XOOPS_ROOT_PATH."/class/xoopstree.php"; +include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; +include_once XOOPS_ROOT_PATH."/class/tree.php"; +include_once XOOPS_ROOT_PATH."/class/xoopslists.php"; +include_once XOOPS_ROOT_PATH."/class/pagenav.php"; +include_once XOOPS_ROOT_PATH."/class/xoopstopic.php"; +include_once XOOPS_ROOT_PATH."/class/xoopsform/grouppermform.php"; +include_once("../include/functions.php"); + +$myts =& MyTextSanitizer::getInstance(); +include_once XOOPS_ROOT_PATH."/modules/videostream/class/list.php"; + +if ( $xoopsUser ) { + $xoopsModule = XoopsModule::getByDirname("videostream"); + if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + redirect_header(XOOPS_URL."/",3,_NOPERM); + exit(); + } +} else { + redirect_header(XOOPS_URL."/",3,_NOPERM); + exit(); +} + +// Include language file +xoops_loadLanguage("admin", "system"); +xoops_loadLanguage("admin", $xoopsModule->getVar("dirname", "e")); +xoops_loadLanguage("modinfo", $xoopsModule->getVar("dirname", "e")); + +function videostream_adminmenu ($currentoption = 0, $breadcrumb = "") +{ + global $xoopsModule, $xoopsConfig; + + echo " + <style type=\"text/css\"> + #buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; } + #buttonbar { float:left; width:100%; background: #e7e7e7 url(".XOOPS_URL."/modules/videostream/images/menu/bg.png) repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; } + #buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; } + #buttonbar li { display:inline; margin:0; padding:0; } + #buttonbar a { float:left; background:url(".XOOPS_URL."/modules/videostream/images/deco/left_both.png) no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; } + #buttonbar a span { float:left; display:block; background:url(".XOOPS_URL."/modules/videostream/images/deco/right_both.png) no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; } + #buttonbar a span {float:none;} + #buttonbar a:hover span { color:#333; } + #buttonbar #current a { background-position:0 -150px; border-width:0; } + #buttonbar #current a span { background-position:100% -150px; padding-bottom:5px; color:#333; } + #buttonbar a:hover { background-position:0% -150px; } + #buttonbar a:hover span { background-position:100% -150px; } + </style> + "; + + $tblColors = Array(); + $tblColors[0] = $tblColors[1] = $tblColors[2] = $tblColors[3] = $tblColors[4] = $tblColors[5] = $tblColors[6] = $tblColors[7] = $tblColors[8] = ""; + $tblColors[$currentoption] = "current"; + if (file_exists("".XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/language/".$xoopsConfig["language"]."/modinfo.php")) { + include_once("".XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/language/".$xoopsConfig["language"]."/modinfo.php"); + } else { + include_once("".XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/english/modinfo.php"); + } + + echo "<div id=\"buttontop\"> + <table style=\"width: 100%; padding: 0;\" cellspacing=\"0\"> + <tr> + <td style=\"font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;\"> + <a class=\"nobutton\" href=\"".XOOPS_URL."/modules/system/admin.php?fct=preferences&op=showmod&mod=".$myts->displayTarea($xoopsModule->getVar("mid"))."\">_AM_VIDEOSTREAM_GENERALSET</a> + | <a href=\"".XOOPS_URL."/modules/videostream/index.php\">_AM_VIDEOSTREAM_GOINDEX</a> + | <a href=\"".XOOPS_URL."/modules/videostream/admin/upgrade.php\">_AM_VIDEOSTREAM_UPGRADE</a> + </td> + <td style=\"font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;\"><b>".$myts->displayTarea($xoopsModule->name())."</b></td> + </tr> + </table> + </div> + + <div id=\"buttonbar\"> + <ul><li id=\"$tblColors[0]\"><a href=\"".XOOPS_URL."/modules/videostream/admin/index.php\"><span>_MI_VIDEOSTREAM_MANAGER_INDEX</span></a></li> + <li id=\"$tblColors[1]\"><a href=\"".XOOPS_URL."/modules/videostream/admin/list.php\"><span>_MI_VIDEOSTREAM_MANAGER_LIST</span></a></li> + + <li id=\"$tblColors[2]\"><a href=\"".XOOPS_URL."/modules/videostream/admin/permissions.php\"><span>_MI_VIDEOSTREAM_MANAGER_PERMISSIONS</span></a></li> + <li id=\"$tblColors[3]\"><a href=\"".XOOPS_URL."/modules/videostream/admin/about.php\"><span>_MI_VIDEOSTREAM_MANAGER_ABOUT</span></a></li> + </ul></div>"; +} + +$listHandler =& xoops_getModuleHandler("videostream_list", "videostream"); + +?> \ No newline at end of file Added: XoopsModules/videostream/releases/1.32/videostream/admin/index.html =================================================================== --- XoopsModules/videostream/releases/1.32/videostream/admin/index.html (rev 0) +++ XoopsModules/videostream/releases/1.32/videostream/admin/index.html 2012-02-15 13:44:29 UTC (rev 8998) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/videostream/releases/1.32/videostream/admin/index.php =================================================================== --- XoopsModules/videostream/releases/1.32/videostream/admin/index.php (rev 0) +++ XoopsModules/videostream/releases/1.32/videostream/admin/index.php 2012-02-15 13:44:29 UTC (rev 8998) @@ -0,0 +1,80 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Video Stream - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://txmod.webuda.com) + * + * 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 timgno (http://txmod.webuda.com) + * @license GPL + * @package Video Stream + * @author timgno (txm...@gm...) + * + * Version : 1.32: + * **************************************************************************** + */ + +include_once("admin_header.php"); + +xoops_cp_header(); + +global $xoopsModule; + +//Apelle du menu admin +if ( !is_readable(XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php")) { +videostream_adminmenu(0, _AM_VIDEOSTREAM_MANAGER_INDEX); +} else { +include_once XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php"; +loadModuleAdminMenu (0, _AM_VIDEOSTREAM_MANAGER_INDEX); +} + + //compte "total" + $count_stream = $streamHandler->getCount(); + //compte "attente" + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria("stream_online", 1)); + $stream_online = $streamHandler->getCount($criteria); + +include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->dirname()."/class/menu.php"; + + $menu = new videostreamMenu(); + $menu->addItem("stream", "stream.php", "../images/deco/contact.png", _AM_VIDEOSTREAM_MANAGER_STREAM); + $menu->addItem("update", "../../system/admin.php?fct=modulesadmin&op=update&module=videostream", "../images/deco/update.png", _AM_VIDEOSTREAM_MANAGER_UPDATE); + $menu->addItem("permissions", "permissions.php", "../images/deco/permissions.png", _AM_VIDEOSTREAM_MANAGER_PERMISSIONS); + $menu->addItem("preference", "../../system/admin.php?fct=preferences&op=showmod&mod=".$xoopsModule->getVar("mid"). + "&&confcat_id=1", "../images/deco/pref.png", _AM_VIDEOSTREAM_MANAGER_PREFERENCES); + $menu->addItem("about", "about.php", "../images/deco/about.png", _AM_VIDEOSTREAM_MANAGER_ABOUT); + + echo $menu->getCSS(); + + +echo "<div class=\"CPbigTitle\" style=\"background-image: url(../images/deco/index.png); background-repeat: no-repeat; background-position: left; padding-left: 50px;\"><strong>"._AM_VIDEOSTREAM_MANAGER_INDEX."</strong></div><br /> + <table width=\"100%\" border=\"0\" cellspacing=\"10\" cellpadding=\"4\"> + <tr> + <td valign=\"top\">".$menu->render()."</td> + <td valign=\"top\" width=\"60%\">"; + + echo "<fieldset> + <legend class=\"CPmediumTitle\">"._AM_VIDEOSTREAM_MANAGER_STREAM."</legend> + <br />"; + printf(_AM_VIDEOSTREAM_THEREARE_STREAM, $count_stream); + echo "<br /><br />"; + printf(_AM_VIDEOSTREAM_THEREARE_STREAM_ONLINE, $stream_online); + echo "<br /> + </fieldset><br /><br />"; + + echo "</td> + </tr> + </table>"; +include_once("admin_footer.php"); +xoops_cp_footer(); + +?> \ No newline at end of file Added: XoopsModules/videostream/releases/1.32/videostream/admin/list.php =================================================================== --- XoopsModules/videostream/releases/1.32/videostream/admin/list.php (rev 0) +++ XoopsModules/videostream/releases/1.32/videostream/admin/list.php 2012-02-15 13:44:29 UTC (rev 8998) @@ -0,0 +1,185 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * videostream - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://txmod.webuda.com) + * + * 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 timgno (http://txmod.webuda.com) + * @license GPL + * @package videostream + * @author timgno (http://txmod.webuda.com) + * + * Version : 1.00: + * **************************************************************************** + */ + +include_once("./header.php"); + +xoops_cp_header(); + +if (isset($_REQUEST["op"])) { + $op = $_REQUEST["op"]; +} else { + @$op = "show_list_list"; +} + +//Menu admin +if ( !is_readable(XOOPS_ROOT_PATH . "/Frameworks/art/functions.admin.php") ) { +videostream_adminmenu(1, _AM_VIDEOSTREAM_MANAGER_LIST); +} else { +include_once XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php"; +loadModuleAdminMenu (1, _AM_VIDEOSTREAM_MANAGER_LIST); +} + +//Sous menu +echo "<div class=\"CPbigTitle\" style=\"background-image: url(../images/deco/topic.png); background-repeat: no-repeat; background-position: left; padding-left: 50px;\"> + <strong>"._AM_VIDEOSTREAM_MANAGER_LIST."</strong> + </div><br /><br>"; +switch ($op) +{ + case "save_list": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("list.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["videostream_id"])) { + $obj =& $listHandler->get($_REQUEST["videostream_id"]); + } else { + $obj =& $listHandler->create(); + } + + //Form videostream_name + $obj->setVar("videostream_name", $_REQUEST["videostream_name"]); + //Form videostream_ + $obj->setVar("videostream_", $_REQUEST["videostream_"]); + //Form videostream_ + $obj->setVar("videostream_", $_REQUEST["videostream_"]); + //Form videostream_ + $obj->setVar("videostream_", $_REQUEST["videostream_"]); + //Form videostream_submitter + $obj->setVar("videostream_submitter", $_REQUEST["videostream_submitter"]); + //Form videostream_date_created + $obj->setVar("videostream_date_created", strtotime($_REQUEST["videostream_date_created"])); + //Form videostream_online + $verif_videostream_online = ($_REQUEST["videostream_online"] == 1) ? "1" : "0"; + $obj->setVar("videostream_online", $verif_videostream_online); + + + if ($listHandler->insert($obj)) { + redirect_header("list.php?op=show_list_list", 2, _AM_VIDEOSTREAM_FORMOK); + } + //include_once("../include/forms.php"); + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + break; + + case "edit_list": + $obj = $listHandler->get($_REQUEST["videostream_id"]); + $form = $obj->getForm(); + break; + + case "delete_list": + $obj =& $listHandler->get($_REQUEST["videostream_id"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("list.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($listHandler->delete($obj)) { + redirect_header("list.php", 3, _AM_VIDEOSTREAM_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array("ok" => 1, "videostream_id" => $_REQUEST["videostream_id"], "op" => "delete_list"), $_SERVER["REQUEST_URI"], sprintf(_AM_VIDEOSTREAM_FORMSUREDEL, $obj->getVar("list"))); + } + break; + + case "update_online_list": + + if (isset($_REQUEST["videostream_id"])) { + $obj =& $listHandler->get($_REQUEST["videostream_id"]); + } + $obj->setVar("list_online", $_REQUEST["list_online"]); + + if ($listHandler->insert($obj)) { + redirect_header("list.php", 3, _AM_VIDEOSTREAM_FORMOK); + } + echo $obj->getHtmlErrors(); + + break; + + case "default": + default: + + $criteria = new CriteriaCompo(); + $criteria->setSort("videostream_id"); + $criteria->setOrder("ASC"); + $numrows = $listHandler->getCount(); + $list_arr = $listHandler->getall($criteria); + + //Affichage du tableau + if ($numrows>0) + { + echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> + <tr> + <th align=\"center\">"._AM_VIDEOSTREAM_VIDEOSTREAM_NAME."</th> + <th align=\"center\">"._AM_VIDEOSTREAM_VIDEOSTREAM_."</th> + <th align=\"center\">"._AM_VIDEOSTREAM_VIDEOSTREAM_."</th> + <th align=\"center\">"._AM_VIDEOSTREAM_VIDEOSTREAM_."</th> + <th align=\"center\">"._AM_VIDEOSTREAM_VIDEOSTREAM_SUBMITTER."</th> + <th align=\"center\">"._AM_VIDEOSTREAM_VIDEOSTREAM_DATE_CREATED."</th> + <th align=\"center\">"._AM_VIDEOSTREAM_VIDEOSTREAM_ONLINE."</th> + + <th align=\"center\" width=\"10%\">"._AM_VIDEOSTREAM_FORMACTION."</th> + </tr>"; + + $class = "odd"; + + foreach (array_keys($list_arr) as $i) + { + if ( $list_arr[$i]->getVar("topic_pid") == 0) + { + echo "<tr class=\"".$class."\">"; + $class = ($class == "even") ? "odd" : "even"; + echo "<td align=\"center\">".$list_arr[$i]->getVar("videostream_name")."</td>"; + echo "<td align=\"center\">".$list_arr[$i]->getVar("videostream_")."</td>"; + echo "<td align=\"center\">".$list_arr[$i]->getVar("videostream_")."</td>"; + echo "<td align=\"center\">".$list_arr[$i]->getVar("videostream_")."</td>"; + echo "<td align=\"center\">".XoopsUser::getUnameFromId($list_arr[$i]->getVar("videostream_submitter"),"S")."</td>"; + echo "<td align=\"center\">".formatTimeStamp($list_arr[$i]->getVar("videostream_date_created"),"S")."</td>"; + + $online = $list_arr[$i]->getVar("videostream_online"); + + if( $online == 1 ) { + echo "<td align=\"center\"><a href=\"./list.php?op=update_online_list&videostream_id=".$list_arr[$i]->getVar("videostream_id")."&list_online=0\"><img src=\"./../images/deco/on.gif\" border=\"0\" alt=\""._AM_VIDEOSTREAM_ON."\" title=\""._AM_VIDEOSTREAM_ON."\"></a></td>"; + } else { + echo "<td align=\"center\"><a href=\"./list.php?op=update_online_list&videostream_id=".$list_arr[$i]->getVar("videostream_id")."&list_online=1\"><img src=\"./../images/deco/off.gif\" border=\"0\" alt=\""._AM_VIDEOSTREAM_OFF."\" title=\""._AM_VIDEOSTREAM_OFF."\"></a></td>"; + } + echo "<td align=\"center\" width=\"10%\"> + <a href=\"list.php?op=edit_list&videostream_id=".$list_arr[$i]->getVar("videostream_id")."\"><img src=\"../images/deco/edit.gif\" alt=\""._AM_VIDEOSTREAM_EDIT."\" title=\""._AM_VIDEOSTREAM_EDIT."\"></a> + <a href=\"list.php?op=delete_list&videostream_id=".$list_arr[$i]->getVar("videostream_id")."\"><img src=\"../images/deco/delete.gif\" alt=\""._AM_VIDEOSTREAM_DELETE."\" title=\""._AM_VIDEOSTREAM_DELETE."\"></a> + </td>"; + echo "</tr>"; + } + } + echo "</table><br><br>"; + } + + // Affichage du formulaire + $obj =& $listHandler->create(); + $form = $obj->getForm(); +} +echo "<br /><br /> +<div align=\"center\"><a href=\"http://www.tdmxoops.net\" target=\"_blank\"><img src=\"http://www.tdmxoops.net/images/logo_modules.gif\" alt=\"TDM\" title=\"TDM\"></a></div> +"; +xoops_cp_footer(); + +?> \ No newline at end of file Added: XoopsModules/videostream/releases/1.32/videostream/admin/menu.php =================================================================== --- XoopsModules/videostream/releases/1.32/videostream/admin/menu.php (rev 0) +++ XoopsModules/videostream/releases/1.32/videostream/admin/menu.php 2012-02-15 13:44:29 UTC (rev 8998) @@ -0,0 +1,36 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Video Stream - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://txmod.webuda.com) + * + * 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 timgno (http://txmod.webuda.com) + * @license GPL + * @package Video Stream + * @author timgno (txm...@gm...) + * + * Version : 1.32: + * **************************************************************************** + */ + +$adminmenu = array(); +$adminmenu[0]["title"] = _MI_VIDEOSTREAM_MANAGER_INDEX; +$adminmenu[0]["link"] = "admin/index.php"; +$adminmenu[1]["title"] = _MI_VIDEOSTREAM_MANAGER_STREAM; +$adminmenu[1]["link"] = "admin/stream.php"; +$adminmenu[2]["title"] = _MI_VIDEOSTREAM_MANAGER_PERMISSIONS; +$adminmenu[2]["link"] = "admin/permissions.php"; + +$adminmenu[3]["title"] = _MI_VIDEOSTREAM_MANAGER_ABOUT; +$adminmenu[3]["link"] = "admin/about.php"; + +?> \ No newline at end of file Added: XoopsModules/videostream/releases/1.32/videostream/admin/permissions.php =================================================================== --- XoopsModules/videostream/releases/1.32/videostream/admin/permissions.php (rev 0) +++ XoopsModules/videostream/releases/1.32/videostream/admin/permissions.php 2012-02-15 13:44:29 UTC (rev 8998) @@ -0,0 +1,97 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * videostream - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://txmod.webuda.com) + * + * 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 timgno (http://txmod.webuda.com) + * @license GPL + * @package videostream + * @author timgno (http://txmod.webuda.com) + * + * Version : 1.00: + * **************************************************************************** + */ + +include("header.php"); + +if( !empty($_POST["submit"]) ) +{ + redirect_header( XOOPS_URL."/modules/".$xoopsModule->dirname()."/admin/permissions.php" , 1 , _MP_GPERMUPDATED ); +} + +xoops_cp_header(); + +global $xoopsDB; + +if ( !is_readable(XOOPS_ROOT_PATH . "/Frameworks/art/functions.admin.php")) { +videostream_adminmenu(2,_AM_VIDEOSTREAM_MANAGER_PERMISSIONS); +} else { +include_once XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php"; +loadModuleAdminMenu (2,_AM_VIDEOSTREAM_MANAGER_PERMISSIONS); +} + +//menu +echo "<div class=\"CPbigTitle\" style=\"background-image: url(../images/deco/permissions.png); background-repeat: no-repeat; background-position: left; padding-left: 50px;\"> + <strong>"._AM_VIDEOSTREAM_MANAGER_PERMISSIONS."</strong> + </div><br />"; + + $permtoset= isset($_POST["permtoset"]) ? intval($_POST["permtoset"]) : 1; + $selected=array("","",""); + $selected[$permtoset-1]=" selected"; + +echo " +<form method=\"post\" name=\"fselperm\" action=\"permissions.php\"> + <table border=0> + <tr> + <td> + <select name=\"permtoset\" onChange=\"javascript: document.fselperm.submit()\"> + <option value=\"1\"".$selected[0].">"._AM_VIDEOSTREAM_PERMISSIONS_ACCESS."</option> + <option value=\"2\"".$selected[1].">"._AM_VIDEOSTREAM_PERMISSIONS_SUBMIT."</option> + </select> + </td> + </tr> + </table> +</form>"; + +$module_id = $xoopsModule->getVar("mid"); + + switch($permtoset) + { + case 1: + $title_of_form = _AM_VIDEOSTREAM_PERMISSIONS_ACCESS; + $perm_name = "videostream_access"; + $perm_desc = ""; + break; + case 2: + $title_of_form = _AM_VIDEOSTREAM_PERMISSIONS_SUBMIT; + $perm_name = "videostream_submit"; + $perm_desc = ""; + break; + } + + $permform = new XoopsGroupPermForm($title_of_form, $module_id, $perm_name, $perm_desc, "admin/permissions.php"); + $xt = new XoopsTopic( $xoopsDB -> prefix("videostream_topic") ); + $alltopics =& $xt->getTopicsList(); + + foreach ($alltopics as $topic_id => $topic) + { + $permform->addItem($topic_id, $topic["title"], $topic["pid"]); + } + echo $permform->render(); + echo "<br /><br /><br /><br />\n"; + unset ($permform); + +echo "<br /><br /> +<div align=\"center\"><a href=\"http://www.tdmxoops.net\" target=\"_blank\"><img src=\"http://www.tdmxoops.net/images/logo_modules.gif\" alt=\"TDM\" title=\"TDM\"></a></div> +"; +?> \ No newline at end of file Added: XoopsModules/videostream/releases/1.32/videostream/admin/stream.php =================================================================== --- XoopsModules/videostream/releases/1.32/videostream/admin/stream.php (rev 0) +++ XoopsModules/videostream/releases/1.32/videostream/admin/stream.php 2012-02-15 13:44:29 UTC (rev 8998) @@ -0,0 +1,199 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Video Stream - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://txmod.webuda.com) + * + * 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 timgno (http://txmod.webuda.com) + * @license GPL + * @package Video Stream + * @author timgno (txm...@gm...) + * + * Version : 1.32: + * **************************************************************************** + */ + +include_once("admin_header.php"); + +xoops_cp_header(); + +if (isset($_REQUEST["op"])) { + $op = $_REQUEST["op"]; +} else { + @$op = "show_list_stream"; +} + +//Menu admin +if ( !is_readable(XOOPS_ROOT_PATH . "/Frameworks/art/functions.admin.php") ) { +videostream_adminmenu(1, _AM_VIDEOSTREAM_MANAGER_STREAM); +} else { +include_once XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php"; +loadModuleAdminMenu (1, _AM_VIDEOSTREAM_MANAGER_STREAM); +} + +//Sous menu +echo "<div class=\"CPbigTitle\" style=\"background-image: url(../images/deco/contact.png); background-repeat: no-repeat; background-position: left; padding-left: 50px;\"> + <strong>"._AM_VIDEOSTREAM_MANAGER_STREAM."</strong> + </div><br /><br>"; +switch ($op) +{ + case "save_stream": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("stream.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["stream_id"])) { + $obj =& $streamHandler->get($_REQUEST["stream_id"]); + } else { + $obj =& $streamHandler->create(); + } + + //Form stream_title + $obj->setVar("stream_title", $_REQUEST["stream_title"]); + //Form stream_user + $obj->setVar("stream_user", $_REQUEST["stream_user"]); + //Form stream_keyword + $obj->setVar("stream_keyword", $_REQUEST["stream_keyword"]); + //Form stream_url + $obj->setVar("stream_url", $_REQUEST["stream_url"]); + //Form stream_desc + $obj->setVar("stream_desc", $_REQUEST["stream_desc"]); + //Form stream_time + $obj->setVar("stream_time", $_REQUEST["stream_time"]); + //Form stream_publishd + $obj->setVar("stream_publishd", $_REQUEST["stream_publishd"]); + //Form stream_updated + $obj->setVar("stream_updated", $_REQUEST["stream_updated"]); + //Form stream_submitter + $obj->setVar("stream_submitter", $_REQUEST["stream_submitter"]); + //Form stream_date_created + $obj->setVar("stream_date_created", strtotime($_REQUEST["stream_date_created"])); + //Form stream_online + $verif_stream_online = ($_REQUEST["stream_online"] == 1) ? "1" : "0"; + $obj->setVar("stream_online", $verif_stream_online); + + + if ($streamHandler->insert($obj)) { + redirect_header("stream.php?op=show_list_stream", 2, _AM_VIDEOSTREAM_FORMOK); + } + //include_once("../include/forms.php"); + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + break; + + case "edit_stream": + $obj = $streamHandler->get($_REQUEST["stream_id"]); + $form = $obj->getForm(); + break; + + case "delete_stream": + $obj =& $streamHandler->get($_REQUEST["stream_id"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("stream.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($streamHandler->delete($obj)) { + redirect_header("stream.php", 3, _AM_VIDEOSTREAM_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array("ok" => 1, "stream_id" => $_REQUEST["stream_id"], "op" => "delete_stream"), $_SERVER["REQUEST_URI"], sprintf(_AM_VIDEOSTREAM_FORMSUREDEL, $obj->getVar("stream"))); + } + break; + + case "update_online_stream": + + if (isset($_REQUEST["stream_id"])) { + $obj =& $streamHandler->get($_REQUEST["stream_id"]); + } + $obj->setVar("stream_online", $_REQUEST["stream_online"]); + + if ($streamHandler->insert($obj)) { + redirect_header("stream.php", 3, _AM_VIDEOSTREAM_FORMOK); + } + echo $obj->getHtmlErrors(); + + break; + + case "default": + default: + + $criteria = new CriteriaCompo(); + $criteria->setSort("stream_id"); + $criteria->setOrder("ASC"); + $numrows = $streamHandler->getCount(); + $stream_arr = $streamHandler->getall($criteria); + + //Affichage du tableau + if ($numrows>0) + { + echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> + <tr> + <th align=\"center\">"._AM_VIDEOSTREAM_STREAM_TITLE."</th> + <th align=\"center\">"._AM_VIDEOSTREAM_STREAM_USER."</th> + <th align=\"center\">"._AM_VIDEOSTREAM_STREAM_KEYWORD."</th> + <th align=\"center\">"._AM_VIDEOSTREAM_STREAM_URL."</th> + <th align=\"center\">"._AM_VIDEOSTREAM_STREAM_DESC."</th> + <th align=\"center\">"._AM_VIDEOSTREAM_STREAM_TIME."</th> + <th align=\"center\">"._AM_VIDEOSTREAM_STREAM_PUBLISHD."</th> + <th align=\"center\">"._AM_VIDEOSTREAM_STREAM_UPDATED."</th> + <th align=\"center\">"._AM_VIDEOSTREAM_STREAM_SUBMITTER."</th> + <th align=\"center\">"._AM_VIDEOSTREAM_STREAM_DATE_CREATED."</th> + <th align=\"center\">"._AM_VIDEOSTREAM_STREAM_ONLINE."</th> + + <th align=\"center\" width=\"10%\">"._AM_VIDEOSTREAM_FORMACTION."</th> + </tr>"; + + $class = "odd"; + + foreach (array_keys($stream_arr) as $i) + { + if ( $stream_arr[$i]->getVar("topic_pid") == 0) + { + echo "<tr class=\"".$class."\">"; + $class = ($class == "even") ? "odd" : "even"; + echo "<td align=\"center\">".$stream_arr[$i]->getVar("stream_title")."</td>"; + echo "<td align=\"center\">".$stream_arr[$i]->getVar("stream_user")."</td>"; + echo "<td align=\"center\">".$stream_arr[$i]->getVar("stream_keyword")."</td>"; + echo "<td align=\"center\">".$stream_arr[$i]->getVar("stream_url")."</td>"; + echo "<td align=\"center\">".$stream_arr[$i]->getVar("stream_desc")."</td>"; + echo "<td align=\"center\">".$stream_arr[$i]->getVar("stream_time")."</td>"; + echo "<td align=\"center\">".$stream_arr[$i]->getVar("stream_publishd")."</td>"; + echo "<td align=\"center\">".$stream_arr[$i]->getVar("stream_updated")."</td>"; + echo "<td align=\"center\">".XoopsUser::getUnameFromId($stream_arr[$i]->getVar("stream_submitter"),"S")."</td>"; + echo "<td align=\"center\">".formatTimeStamp($stream_arr[$i]->getVar("stream_date_created"),"S")."</td>"; + + $online = $stream_arr[$i]->getVar("stream_online"); + + if( $online == 1 ) { + echo "<td align=\"center\"><a href=\"./stream.php?op=update_online_stream&stream_id=".$stream_arr[$i]->getVar("stream_id")."&stream_online=0\"><img src=\"./../images/deco/on.gif\" border=\"0\" alt=\""._AM_VIDEOSTREAM_ON."\" title=\""._AM_VIDEOSTREAM_ON."\"></a></td>"; + } else { + echo "<td align=\"center\"><a href=\"./stream.php?op=update_online_stream&stream_id=".$stream_arr[$i]->getVar("stream_id")."&stream_online=1\"><img src=\"./../images/deco/off.gif\" border=\"0\" alt=\""._AM_VIDEOSTREAM_OFF."\" title=\""._AM_VIDEOSTREAM_OFF."\"></a></td>"; + } + echo "<td align=\"center\" width=\"10%\"> + <a href=\"stream.php?op=edit_stream&stream_id=".$stream_arr[$i]->getVar("stream_id")."\"><img src=\"../images/deco/edit.gif\" alt=\""._AM_VIDEOSTREAM_EDIT."\" title=\""._AM_VIDEOSTREAM_EDIT."\"></a> + <a href=\"stream.php?op=delete_stream&stream_id=".$stream_arr[$i]->getVar("stream_id")."\"><img src=\"../images/deco/delete.gif\" alt=\""._AM_VIDEOSTREAM_DELETE."\" title=\""._AM_VIDEOSTREAM_DELETE."\"></a> + </td>"; + echo "</tr>"; + } + } + echo "</table><br><br>"; + } + + // Affichage du formulaire + $obj =& $streamHandler->create(); + $form = $obj->getForm(); +} +include_once("admin_footer.php"); +xoops_cp_footer(); + +?> \ No newline at end of file Added: XoopsModules/videostream/releases/1.32/videostream/blocks/blocks_list.php =================================================================== --- XoopsModules/videostream/releases/1.32/videostream/blocks/blocks_list.php (rev 0) +++ XoopsModules/videostream/releases/1.32/videostream/blocks/blocks_list.php 2012-02-15 13:44:29 UTC (rev 8998) @@ -0,0 +1,110 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * videostream - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://txmod.webuda.com) + * + * 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 timgno (http://txmod.webuda.com) + * @license GPL + * @package videostream + * @author timgno (http://txmod.webuda.com) + * + * Version : 1.00: + * **************************************************************************** + */ + +include_once XOOPS_ROOT_PATH."/modules/videostream/include/functions.php"; + +function b_videostream_list($options) { +include_once XOOPS_ROOT_PATH."/modules/videostream/class/list.php"; +$myts =& MyTextSanitizer::getInstance(); + +$list = array(); +$type_block = $options[0]; +$nb_list = $options[1]; +$lenght_title = $options[2]; + +$listHandler =& xoops_getModuleHandler("videostream_list", "videostream"); +$criteria = new CriteriaCompo(); +array_shift($options); +array_shift($options); +array_shift($options); +if (!(count($options) == 1 && $options[0] == 0)) { +$criteria->add(new Criteria("list_topic", block_addCatSelect($options),"IN")); +} + +switch ($type_block) +{ + // pour le bloc: list recents + case "recent": + $criteria->add(new Criteria("list_online", 1)); + $criteria->setSort("list_date_created"); + $criteria->setOrder("DESC"); + break; + // pour le bloc: list du jour + case "day": + $criteria->add(new Criteria("list_online", 1)); + $criteria->add(new Criteria("list_date_created", strtotime(date("Y/m/d")), ">=")); + $criteria->add(new Criteria("list_date_created", strtotime(date("Y/m/d"))+86400, "<=")); + $criteria->setSort("list_date_created"); + $criteria->setOrder("ASC"); + break; + // pour le bloc: list al\xE9atoires + case "random": + $criteria->add(new Criteria("list_online", 1)); + $criteria->setSort("RAND()"); + break; +} + + +$criteria->setLimit($nb_list); +$list_arr = $listHandler->getall($criteria); + foreach (array_keys($list_arr) as $i) + { + $list[$i]["videostream_id"] = $list_arr[$i]->getVar("videostream_id"); + $list[$i]["videostream_name"] = $list_arr[$i]->getVar("videostream_name"); + $list[$i]["videostream_"] = $list_arr[$i]->getVar("videostream_"); + $list[$i]["videostream_submitter"] = $list_arr[$i]->getVar("videostream_submitter"); + $list[$i]["videostream_date_created"] = $list_arr[$i]->getVar("videostream_date_created"); + $list[$i]["videostream_online"] = $list_arr[$i]->getVar("videostream_online"); + + } +return $list; +} + +function b_videostream_list_edit($options) { + include_once XOOPS_ROOT_PATH."/modules/videostream/class/topic.php"; + + $topicHandler =& xoops_getModuleHandler("videostream_topic", "videostream"); + $criteria = new CriteriaCompo(); + $criteria->setSort("topic_title"); + $criteria->setOrder("ASC"); + $topic_arr = $topicHandler->getall($criteria); + + $form = ""._MB_VIDEOSTREAM_LIST_DISPLAY."\n"; + $form .= "<input type=\"hidden\" name=\"options[0]\" value=\"".$options[0]."\" />"; + $form .= "<input name=\"options[1]\" size=\"5\" maxlength=\"255\" value=\"".$options[1]."\" type=\"text\" /> <br />"; + $form .= ""._MB_VIDEOSTREAM_LIST_TITLELENGTH." : <input name=\"options[2]\" size=\"5\" maxlength=\"255\" value=\"".$options[2]."\" type=\"text\" /><br /><br />"; + array_shift($options); + array_shift($options); + array_shift($options); + $form .= ""._MB_VIDEOSTREAM_LIST_CATTODISPLAY."<br /><select name=\"options[]\" multiple=\"multiple\" size=\"5\">"; + $form .= "<option value=\"0\" " . (array_search(0, $options) === false ? "" : "selected=\"selected\"") . ">" ._MB_VIDEOSTREAM_LIST_ALLCAT . "</option>"; + foreach (array_keys($topic_arr) as $i) { + $form .= "<option value=\"" . $topic_arr[$i]->getVar("topic_id") . "\" " . (array_search($topic_arr[$i]->getVar("topic_id"), $options) === false ? "" : "selected=\"selected\"") . ">".$topic_arr[$i]->getVar("topic_title")."</option>"; + } + $form .= "</select>"; + + return $form; +} + +?> \ No newline at end of file Added: XoopsModules/videostream/releases/1.32/videostream/blocks/blocks_stream.php =================================================================== --- XoopsModules/videostream/releases/1.32/videostream/blocks/blocks_stream.php (rev 0) +++ XoopsModules/videostream/releases/1.32/videostream/blocks/blocks_stream.php 2012-02-15 13:44:29 UTC (rev 8998) @@ -0,0 +1,98 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Video Stream - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://txmod.webuda.com) + * + * 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 timgno (http://txmod.webuda.com) + * @license GPL + * @package Video Stream + * @author timgno (txm...@gm...) + * + * Version : 1.32: + * **************************************************************************** + */ + +include_once XOOPS_ROOT_PATH."/modules/videostream/include/functions.php"; + +function b_videostream_stream($options) { + include_once XOOPS_ROOT_PATH."/modules/videostream/class/stream.php"; + $myts =& MyTextSanitizer::getInstance(); + + $stream = array(); + $type_block = $options[0]; + $nb_stream = $options[1]; + $lenght_title = $options[2]; + + $streamHandler =& xoops_getModuleHandler("videostream_stream", "videostream"); + $criteria = new CriteriaC... [truncated message content] |