From: <be...@us...> - 2012-02-06 21:57:19
|
Revision: 8893 http://xoops.svn.sourceforge.net/xoops/?rev=8893&view=rev Author: beckmi Date: 2012-02-06 21:57:09 +0000 (Mon, 06 Feb 2012) Log Message: ----------- Adding Newsslider module. Added Paths: ----------- XoopsModules/newsslider/ XoopsModules/newsslider/branches/ XoopsModules/newsslider/releases/ XoopsModules/newsslider/trunk/ XoopsModules/newsslider/trunk/newsslider/ XoopsModules/newsslider/trunk/newsslider/admin/ XoopsModules/newsslider/trunk/newsslider/admin/admin.php XoopsModules/newsslider/trunk/newsslider/admin/admin_header.php XoopsModules/newsslider/trunk/newsslider/admin/functions.php XoopsModules/newsslider/trunk/newsslider/admin/index.html XoopsModules/newsslider/trunk/newsslider/admin/index.php XoopsModules/newsslider/trunk/newsslider/admin/menu.php XoopsModules/newsslider/trunk/newsslider/admin/myblockform.php XoopsModules/newsslider/trunk/newsslider/admin/myblocksadmin.php XoopsModules/newsslider/trunk/newsslider/admin/myblocksadmin2.php XoopsModules/newsslider/trunk/newsslider/admin/mygroupperm.php XoopsModules/newsslider/trunk/newsslider/admin/mygrouppermform.php XoopsModules/newsslider/trunk/newsslider/admin/mymenu.php XoopsModules/newsslider/trunk/newsslider/blocks/ XoopsModules/newsslider/trunk/newsslider/blocks/index.html XoopsModules/newsslider/trunk/newsslider/blocks/news_bxslider.php XoopsModules/newsslider/trunk/newsslider/blocks/news_feature.php XoopsModules/newsslider/trunk/newsslider/blocks/news_glider.php XoopsModules/newsslider/trunk/newsslider/blocks/news_s3slider.php XoopsModules/newsslider/trunk/newsslider/blocks/news_scrolling.php XoopsModules/newsslider/trunk/newsslider/bx_styles.css XoopsModules/newsslider/trunk/newsslider/changelog.txt XoopsModules/newsslider/trunk/newsslider/gpl.txt XoopsModules/newsslider/trunk/newsslider/images/ XoopsModules/newsslider/trunk/newsslider/images/attention.gif XoopsModules/newsslider/trunk/newsslider/images/bg.gif XoopsModules/newsslider/trunk/newsslider/images/bxslider/ XoopsModules/newsslider/trunk/newsslider/images/bxslider/blue_auto.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/blue_next.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/blue_pager.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/blue_prev.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/gray_auto.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/gray_next.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/gray_pager.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/gray_prev.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/green_auto.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/green_next.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/green_pager.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/green_prev.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/index.html XoopsModules/newsslider/trunk/newsslider/images/bxslider/orange_auto.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/orange_next.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/orange_pager.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/orange_prev.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/purple_auto.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/purple_next.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/purple_pager.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/purple_prev.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/red_auto.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/red_next.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/red_pager.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/red_prev.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/yellow_auto.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/yellow_next.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/yellow_pager.png XoopsModules/newsslider/trunk/newsslider/images/bxslider/yellow_prev.png XoopsModules/newsslider/trunk/newsslider/images/image1-small.jpg XoopsModules/newsslider/trunk/newsslider/images/image1.jpg XoopsModules/newsslider/trunk/newsslider/images/image2-small.jpg XoopsModules/newsslider/trunk/newsslider/images/image2.jpg XoopsModules/newsslider/trunk/newsslider/images/image3-small.jpg XoopsModules/newsslider/trunk/newsslider/images/image3.jpg XoopsModules/newsslider/trunk/newsslider/images/image4-small.jpg XoopsModules/newsslider/trunk/newsslider/images/image4.jpg XoopsModules/newsslider/trunk/newsslider/images/image5-small.jpg XoopsModules/newsslider/trunk/newsslider/images/image5.jpg XoopsModules/newsslider/trunk/newsslider/images/index.html XoopsModules/newsslider/trunk/newsslider/images/left_both.gif XoopsModules/newsslider/trunk/newsslider/images/right_both.gif XoopsModules/newsslider/trunk/newsslider/images/s3/ XoopsModules/newsslider/trunk/newsslider/images/s3/image1.jpg XoopsModules/newsslider/trunk/newsslider/images/s3/image2.jpg XoopsModules/newsslider/trunk/newsslider/images/s3/image3.jpg XoopsModules/newsslider/trunk/newsslider/images/s3/image4.jpg XoopsModules/newsslider/trunk/newsslider/images/s3/image5.jpg XoopsModules/newsslider/trunk/newsslider/images/s3/image6.jpg XoopsModules/newsslider/trunk/newsslider/images/s3/image7.jpg XoopsModules/newsslider/trunk/newsslider/images/selected-item.gif XoopsModules/newsslider/trunk/newsslider/images/slogo.png XoopsModules/newsslider/trunk/newsslider/images/square-blue-left.gif XoopsModules/newsslider/trunk/newsslider/images/square-blue-right.gif XoopsModules/newsslider/trunk/newsslider/images/square-gray-left.gif XoopsModules/newsslider/trunk/newsslider/images/square-gray-right.gif XoopsModules/newsslider/trunk/newsslider/images/transparent-bg.gif XoopsModules/newsslider/trunk/newsslider/images/transparent-bg.png XoopsModules/newsslider/trunk/newsslider/include/ XoopsModules/newsslider/trunk/newsslider/include/.htaccess XoopsModules/newsslider/trunk/newsslider/include/blocksadmin.inc.php XoopsModules/newsslider/trunk/newsslider/include/gtickets.php XoopsModules/newsslider/trunk/newsslider/include/index.html XoopsModules/newsslider/trunk/newsslider/include/onupdate.inc.php XoopsModules/newsslider/trunk/newsslider/include/updateblock.inc.php XoopsModules/newsslider/trunk/newsslider/index.html XoopsModules/newsslider/trunk/newsslider/js/ XoopsModules/newsslider/trunk/newsslider/js/domticker.js XoopsModules/newsslider/trunk/newsslider/js/featuredcontentglider.js XoopsModules/newsslider/trunk/newsslider/js/index.html XoopsModules/newsslider/trunk/newsslider/js/jquery-easing-1.3.pack.js XoopsModules/newsslider/trunk/newsslider/js/jquery-ui.min.js XoopsModules/newsslider/trunk/newsslider/js/jquery.bxSlider.min.js XoopsModules/newsslider/trunk/newsslider/js/jquery.easing.1.3.js XoopsModules/newsslider/trunk/newsslider/js/pausescroller.js XoopsModules/newsslider/trunk/newsslider/js/s3Slider.js XoopsModules/newsslider/trunk/newsslider/js/s3SliderPacked.js XoopsModules/newsslider/trunk/newsslider/language/ XoopsModules/newsslider/trunk/newsslider/language/english/ XoopsModules/newsslider/trunk/newsslider/language/english/admin.php XoopsModules/newsslider/trunk/newsslider/language/english/blocks.php XoopsModules/newsslider/trunk/newsslider/language/english/index.html XoopsModules/newsslider/trunk/newsslider/language/english/main.php XoopsModules/newsslider/trunk/newsslider/language/english/modinfo.php XoopsModules/newsslider/trunk/newsslider/language/german/ XoopsModules/newsslider/trunk/newsslider/language/german/admin.php XoopsModules/newsslider/trunk/newsslider/language/german/blocks.php XoopsModules/newsslider/trunk/newsslider/language/german/index.html XoopsModules/newsslider/trunk/newsslider/language/german/main.php XoopsModules/newsslider/trunk/newsslider/language/german/modinfo.php XoopsModules/newsslider/trunk/newsslider/language/index.html XoopsModules/newsslider/trunk/newsslider/readme.txt XoopsModules/newsslider/trunk/newsslider/s3_style.css XoopsModules/newsslider/trunk/newsslider/style.css XoopsModules/newsslider/trunk/newsslider/templates/ XoopsModules/newsslider/trunk/newsslider/templates/blocks/ XoopsModules/newsslider/trunk/newsslider/templates/blocks/index.html XoopsModules/newsslider/trunk/newsslider/templates/blocks/news_bxslider.html XoopsModules/newsslider/trunk/newsslider/templates/blocks/news_feature.html XoopsModules/newsslider/trunk/newsslider/templates/blocks/news_glider.html XoopsModules/newsslider/trunk/newsslider/templates/blocks/news_s3slider.html XoopsModules/newsslider/trunk/newsslider/templates/blocks/news_scrolling.html XoopsModules/newsslider/trunk/newsslider/templates/index.html XoopsModules/newsslider/trunk/newsslider/xoops_version.php Added: XoopsModules/newsslider/trunk/newsslider/admin/admin.php =================================================================== --- XoopsModules/newsslider/trunk/newsslider/admin/admin.php (rev 0) +++ XoopsModules/newsslider/trunk/newsslider/admin/admin.php 2012-02-06 21:57:09 UTC (rev 8893) @@ -0,0 +1,172 @@ +<?php +// $Id: admin.php,v 1.7 2003/04/11 13:00:53 okazu Exp $ +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +// Author: Kazumi Ono (AKA onokazu) // +// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // +// Project: The XOOPS Project // +// ------------------------------------------------------------------------- // + +#global $xoopsConfig; + +$admin_mydirname = basename( dirname( dirname( __FILE__ ) ) ) ; + +$fct = empty( $_POST['fct'] ) ? '' : trim( $_POST['fct'] ) ; +$fct = empty( $_GET['fct'] ) ? $fct : trim( $_GET['fct'] ) ; +if ( empty( $fct ) ) $fct = 'preferences' ; +//if (isset($fct) && $fct == "users") { +// $xoopsOption['pagetype'] = "user"; +//} +include "../../../mainfile.php"; +// include "../../mainfile.php"; GIJ +include XOOPS_ROOT_PATH."/include/cp_functions.php"; + +include_once XOOPS_ROOT_PATH."/class/xoopsmodule.php"; +include_once "../include/gtickets.php" ;// GIJ + +$admintest = 0; + +if (is_object($xoopsUser)) { + $xoopsModule =& XoopsModule::getByDirname("system"); + if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + redirect_header(XOOPS_URL.'/user.php',3,_NOPERM); + exit(); + } + $admintest=1; +} else { + redirect_header(XOOPS_URL.'/user.php',3,_NOPERM); + exit(); +} + +// include system category definitions +include_once XOOPS_ROOT_PATH."/modules/system/constants.php"; +$error = false; +if ($admintest != 0) { + if (isset($fct) && $fct != '') { + if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php")) { + + if ( file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php") ) { + include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php"; + } else { + include XOOPS_ROOT_PATH."/modules/system/language/english/admin.php"; + } + + if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php")) { + include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php"; + } + elseif (file_exists(XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php")) { + include XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php"; + } + include XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php"; + // addendum for Xoops 2.3+ + if (file_exists(XOOPS_ROOT_PATH . '/modules/newsslider/language/' . $xoopsConfig['language'] . '/main.php')) { + include_once XOOPS_ROOT_PATH . '/modules/newsslider/language/' . $xoopsConfig['language'] . '/main.php'; + } else { + include_once XOOPS_ROOT_PATH . '/modules/newsslider/language/english/main.php'; + } + + $sysperm_handler =& xoops_gethandler('groupperm'); + $category = !empty($modversion['category']) ? intval($modversion['category']) : 0; + unset($modversion); + if ($category > 0) { + $groups = $xoopsUser->getGroups(); + if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $sysperm_handler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))) { +// if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php")) { +// include_once XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php"; GIJ + if (file_exists("../include/{$fct}.inc.php")) { + include_once "../include/{$fct}.inc.php" ; + } else { + $error = true; + } + } else { + $error = true; + } + } + elseif ($fct == 'version') { + if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/version/main.php")) { + include_once XOOPS_ROOT_PATH."/modules/system/admin/version/main.php"; + } else { + $error = true; + } + } + else { + $error = true; + } + } else { + $error = true; + } + } else { + $error = true; + } +} + +if (false != $error) { + xoops_cp_header(); + echo "<h4>System Configuration</h4>"; + echo '<table class="outer" cellpadding="4" cellspacing="1">'; + echo '<tr>'; + $groups = $xoopsUser->getGroups(); + $all_ok = false; + if (!in_array(XOOPS_GROUP_ADMIN, $groups)) { + $sysperm_handler =& xoops_gethandler('groupperm'); + $ok_syscats = $sysperm_handler->getItemIds('system_admin', $groups); + } else { + $all_ok = true; + } + $admin_dir = XOOPS_ROOT_PATH."/modules/system/admin"; + $handle = opendir($admin_dir); + $counter = 0; + $class = 'even'; + while ($file = readdir($handle)) { + if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir($admin_dir.'/'.$file)) { + include $admin_dir.'/'.$file.'/xoops_version.php'; + if ($modversion['hasAdmin']) { + $category = isset($modversion['category']) ? intval($modversion['category']) : 0; + if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) { + echo "<td class='$class' align='center' valign='bottom' width='19%'>"; + echo "<a href='".XOOPS_URL."/modules/system/admin.php?fct=".$file."'><b>" .trim($modversion['name'])."</b></a>\n"; + echo "</td>"; + $counter++; + $class = ($class == 'even') ? 'odd' : 'even'; + } + if ( $counter > 4 ) { + $counter = 0; + echo "</tr>"; + echo "<tr>"; + } + } + unset($modversion); + } + } + while ($counter < 5) { + echo '<td class="'.$class.'"> </td>'; + $class = ($class == 'even') ? 'odd' : 'even'; + $counter++; + } + echo '</tr></table>'; + xoops_cp_footer(); +} + +?> \ No newline at end of file Added: XoopsModules/newsslider/trunk/newsslider/admin/admin_header.php =================================================================== --- XoopsModules/newsslider/trunk/newsslider/admin/admin_header.php (rev 0) +++ XoopsModules/newsslider/trunk/newsslider/admin/admin_header.php 2012-02-06 21:57:09 UTC (rev 8893) @@ -0,0 +1,36 @@ +<?php +/** + * $Id: admin_header.php v 1.0 21 Jan 2012 Yerres Exp $ + * Module: newsslider + * Version: 1.1 + * Author: yerres + * Licence: GNU + */ + +include("../../../mainfile.php"); +include '../../../include/cp_header.php'; +global $xoopsModule,$xoopsConfig; + +if (file_exists(XOOPS_ROOT_PATH . '/modules/newsslider/language/' . $xoopsConfig['language'] . '/main.php')) { + include_once XOOPS_ROOT_PATH . '/modules/newsslider/language/' . $xoopsConfig['language'] . '/main.php'; +} else { + include_once XOOPS_ROOT_PATH . '/modules/newsslider/language/english/main.php'; +} + + +include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->dirname()."/admin/functions.php"; + +$myts =& MyTextSanitizer::getInstance(); + +if ( is_object( $xoopsUser) ) { + $xoopsModule = XoopsModule::getByDirname("newsslider"); + if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + redirect_header(XOOPS_URL."/",1,_NOPERM); + exit(); + } +} else { + redirect_header(XOOPS_URL."/",1,_NOPERM); + exit(); +} + +?> \ No newline at end of file Added: XoopsModules/newsslider/trunk/newsslider/admin/functions.php =================================================================== --- XoopsModules/newsslider/trunk/newsslider/admin/functions.php (rev 0) +++ XoopsModules/newsslider/trunk/newsslider/admin/functions.php 2012-02-06 21:57:09 UTC (rev 8893) @@ -0,0 +1,89 @@ +<?php +/** + * $Id: functions.php v 1.0 21 Jan 2012 Yerres Exp $ + * Module: newsslider + * Version: 1.1 + * Author: yerres + * Licence: GNU + */ + +if ( is_object( $xoopsUser) ) { + $xoopsModule = XoopsModule::getByDirname("newsslider"); + if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + redirect_header(XOOPS_URL."/",1,_NOPERM); + exit(); + } +} else { + redirect_header(XOOPS_URL."/",1,_NOPERM); + exit(); +} + +/** + * Function used to display an horizontal menu inside the admin panel + * Enable webmasters to navigate thru the module's features. + * Each time you select an option in the admin panel of the news module, this option is highlighted in this menu + * @orig author: hsalazar, The smartfactory + * @copyright (c) The Xoops Project - www.xoops.org + */ + +function nws_adminmenu($currentoption = 0, $breadcrumb = '') { + echo " + <style type='text/css'> + #buttontop { float:left; width:100%; background: #DAE0D2; 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: #DAE0D2 url('" . XOOPS_URL . "/modules/newsslider/images/bg.gif') repeat-x left bottom; font-size: 12px; 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 5px 0; list-style:none; } + #buttonbar li { display:inline; margin:0; padding:0; } + #buttonbar a { float:left; background:url('" . XOOPS_URL . "/modules/newsslider/images/left_both.gif') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; white-space: nowrap} + #buttonbar a span { float:left; display:block; background:url('" . XOOPS_URL . "/modules/newsslider/images/right_both.gif') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; white-space: nowrap} + /* Commented Backslash Hack hides rule from IE5-Mac \*/ + #buttonbar a span {float:none;} + /* End IE5-Mac hack */ + #buttonbar a:hover span { color:#333; } + #buttonbar #current a { background-position:0 -150px; border-width:0; } + #buttonbar #current a span { background-position:100% -150px; padding-bottom:5px; color:#333; } + #buttonbar a:hover { background-position:0% -150px; } + #buttonbar a:hover span { background-position:100% -150px; } + </style> + "; + + + global $xoopsModule, $xoopsConfig; + $myts = &MyTextSanitizer::getInstance(); + + $tblColors = Array_Fill(0,8,''); + $tblColors[$currentoption] = 'current'; + + if (file_exists(XOOPS_ROOT_PATH . '/modules/newsslider/language/' . $xoopsConfig['language'] . '/modinfo.php')) { + include_once XOOPS_ROOT_PATH . '/modules/newsslider/language/' . $xoopsConfig['language'] . '/modinfo.php'; + } else { + include_once XOOPS_ROOT_PATH . '/modules/newsslider/language/english/modinfo.php'; + } + + include 'menu.php'; + + echo '<div id="buttontop">'; + echo '<table style="width: 100%; padding: 0;" cellspacing="0"><tr>'; + echo '<td style="font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;">'; + for( $i=0; $i<count($headermenu); $i++ ){ + echo '<a class="nobutton" href="' . $headermenu[$i]['link'] .'">' . $headermenu[$i]['title'] . '</a> '; + if ($i < count($headermenu)-1) { + echo "| "; + } + } + echo '</td>'; + echo '<td style="font-size: 12px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px; font-weight: bold;">' . $breadcrumb . '</td>'; + echo '</tr></table>'; + echo '</div>'; + + echo '<div id="buttonbar">'; + echo "<ul>"; + + for( $i=0; $i<count($adminmenu); $i++ ){ + echo '<li id="' . $tblColors[$i] . '"><a href="' . XOOPS_URL . '/modules/newsslider/' . $adminmenu[$i]['link'] . '"><span>' . $adminmenu[$i]['title'] . '</span></a></li>'; + } + echo '</ul></div>'; + echo '<div style="float: left; width: 100%; text-align: center; margin: 0px; padding: 0px">'; + echo '</div>'; +} +?> \ No newline at end of file Added: XoopsModules/newsslider/trunk/newsslider/admin/index.html =================================================================== --- XoopsModules/newsslider/trunk/newsslider/admin/index.html (rev 0) +++ XoopsModules/newsslider/trunk/newsslider/admin/index.html 2012-02-06 21:57:09 UTC (rev 8893) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/newsslider/trunk/newsslider/admin/index.php =================================================================== --- XoopsModules/newsslider/trunk/newsslider/admin/index.php (rev 0) +++ XoopsModules/newsslider/trunk/newsslider/admin/index.php 2012-02-06 21:57:09 UTC (rev 8893) @@ -0,0 +1,18 @@ +<?php +/** + * $Id: index.php v 1.0 21 Jan 2012 Yerres Exp $ + * Module: slider + * Version: v 1.00 + * Licence: GNU + */ + +include_once "admin_header.php"; + +xoops_cp_header(); +nws_adminmenu (0,_CPHOME); + +echo "<P>"._AM_NWS_INTRO."</P><br/>"; + +xoops_cp_footer(); +exit(); +?> \ No newline at end of file Added: XoopsModules/newsslider/trunk/newsslider/admin/menu.php =================================================================== --- XoopsModules/newsslider/trunk/newsslider/admin/menu.php (rev 0) +++ XoopsModules/newsslider/trunk/newsslider/admin/menu.php 2012-02-06 21:57:09 UTC (rev 8893) @@ -0,0 +1,29 @@ +<?php +/** + * $Id: menu.php v 1.0 21 Jan 2012 Yerres Exp $ + * Module: newsslider + * Version: 1.1 + * Author: Yerres + * Licence: GNU + */ +global $xoopsModule; +$module_handler =& xoops_gethandler("module"); +$xoopsModule =& XoopsModule::getByDirname('newsslider'); +$modid =& $module_handler->get($xoopsModule->getVar("mid")); + +$i = 0; +if (strstr(XOOPS_VERSION, "XOOPS 2.0")){ + $adminmenu[$i]['title'] = _NWS_MENU; + $adminmenu[$i]['link'] = "admin/myblocksadmin.php"; +} else { + $adminmenu[$i]['title'] = _NWS_MENU;// uncomment if necessary, this can cause errors + $adminmenu[$i]['link'] = '../../modules/system/admin.php?fct=blocksadmin&op=list&filter=1&selgen=' . $xoopsModule->getVar('mid') . '&selmod=-2&selgrp=-1&selvis=-1'; + //$adminmenu[$i]['link'] = '../../modules/system/admin.php?fct=blocksadmin&op=list'; +} + +if (isset($xoopsModule)) { + $i=0; + $headermenu[$i]['title'] = _MI_NWS_UPDATEMODULE; + $headermenu[$i]['link'] = XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=update&module=" . $xoopsModule->getVar('dirname'); +} +?> \ No newline at end of file Added: XoopsModules/newsslider/trunk/newsslider/admin/myblockform.php =================================================================== --- XoopsModules/newsslider/trunk/newsslider/admin/myblockform.php (rev 0) +++ XoopsModules/newsslider/trunk/newsslider/admin/myblockform.php 2012-02-06 21:57:09 UTC (rev 8893) @@ -0,0 +1,141 @@ +<?php +// $Id: myblockform.php,v 1.8 2003/03/10 13:32:05 okazu Exp $ +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // + +if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ; + +$usespaw = empty( $_GET['usespaw'] ) ? 0 : 1 ; + +require_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; +//$form = new XoopsThemeForm($block['form_title'], 'blockform', XOOPS_URL."/modules/blocksadmin/admin/admin.php" ) ; +$form = new XoopsThemeForm($block['form_title'], 'blockform', "admin.php" ) ; +if (isset($block['name'])) { + $form->addElement(new XoopsFormLabel(_AM_NAME, $block['name'])); +} +$side_select = new XoopsFormSelect(_AM_BLKTYPE, "bside", $block['side']); +// xoops 2013 +// $side_select->addOptionArray(array(0 => _AM_SBLEFT, 1 => _AM_SBRIGHT, 3 => _AM_CBLEFT, 4 => _AM_CBRIGHT, 5 => _AM_CBCENTER, )); +$side_select->addOptionArray(array(0 => _AM_SBLEFT, 1 => _AM_SBRIGHT, 3 => _AM_CBLEFT, 4 => _AM_CBRIGHT, 5 => _AM_CBCENTER, 7 => _AM_CBBOTTOMLEFT, 8 => _AM_CBBOTTOMRIGHT, 9 => _AM_CBBOTTOM, )); +$form->addElement($side_select); +$form->addElement(new XoopsFormText(_AM_WEIGHT, "bweight", 2, 5, $block['weight'])); +$form->addElement(new XoopsFormRadioYN(_AM_VISIBLE, 'bvisible', $block['visible'])); +$mod_select = new XoopsFormSelect(_AM_VISIBLEIN, "bmodule", $block['modules'], 5, true); +$module_handler =& xoops_gethandler('module'); +$criteria = new CriteriaCompo(new Criteria('hasmain', 1)); +$criteria->add(new Criteria('isactive', 1)); +$module_list =& $module_handler->getList($criteria); +$module_list[-1] = _AM_TOPPAGE; +$module_list[0] = _AM_ALLPAGES; +ksort($module_list); +$mod_select->addOptionArray($module_list); +$form->addElement($mod_select); +$form->addElement(new XoopsFormText(_AM_TITLE, 'btitle', 50, 255, $block['title']), false); + +if ( $block['is_custom'] ) { + + // Custom Block's textarea + $notice_for_tags = '<span style="font-size:x-small;font-weight:bold;">'._AM_USEFULTAGS.'</span><br /><span style="font-size:x-small;font-weight:normal;">'.sprintf(_AM_BLOCKTAG1, '{X_SITEURL}', XOOPS_URL.'/').'</span>' ; + $current_op = @$_GET['op'] == 'clone' ? 'clone' : 'edit' ; + $uri_to_myself = XOOPS_URL . "/modules/blocksadmin/admin/admin.php?fct=blocksadmin&op=$current_op&bid={$block['bid']}" ; + // $can_use_spaw = check_browser_can_use_spaw() ; + $can_use_spaw = true ; + if( $usespaw && $can_use_spaw ) { + // SPAW Config + include XOOPS_ROOT_PATH.'/common/spaw/spaw_control.class.php' ; + ob_start() ; + $sw = new SPAW_Wysiwyg( 'bcontent' , $block['content'] ) ; + $sw->show() ; + $textarea = new XoopsFormLabel( _AM_CONTENT , ob_get_contents() ) ; + $textarea->setDescription( $notice_for_tags . "<br /><br /><a href='$uri_to_myself&usespaw=0'>NORMAL</a>" ) ; + ob_end_clean() ; + } else { + $myts =& MyTextSanitizer::getInstance(); + $textarea = new XoopsFormDhtmlTextArea(_AM_CONTENT, 'bcontent', $myts->htmlSpecialChars( $block['content'] ) , 15, 70); + if( $can_use_spaw ) { + $textarea->setDescription( $notice_for_tags . "<br /><br /><a href='$uri_to_myself&usespaw=1'>SPAW</a>" ) ; + } else { + $textarea->setDescription( $notice_for_tags ) ; + } + } + $form->addElement($textarea, true); + + $ctype_select = new XoopsFormSelect(_AM_CTYPE, 'bctype', $block['ctype']); + $ctype_select->addOptionArray(array('H' => _AM_HTML, 'P' => _AM_PHP, 'S' => _AM_AFWSMILE, 'T' => _AM_AFNOSMILE)); + $form->addElement($ctype_select); +} else { + if ($block['template'] != '' && ! defined('XOOPS_ORETEKI') ) { + $tplfile_handler =& xoops_gethandler('tplfile'); + $btemplate =& $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $block['bid']); + if (count($btemplate) > 0) { + $form->addElement(new XoopsFormLabel(_AM_CONTENT, '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=tplsets&op=edittpl&id='.$btemplate[0]->getVar('tpl_id').'">'._AM_EDITTPL.'</a>')); + } else { + $btemplate2 =& $tplfile_handler->find('default', 'block', $block['bid']); + if (count($btemplate2) > 0) { + $form->addElement(new XoopsFormLabel(_AM_CONTENT, '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=tplsets&op=edittpl&id='.$btemplate2[0]->getVar('tpl_id').'" target="_blank">'._AM_EDITTPL.'</a>')); + } + } + } + if ($block['edit_form'] != false) { + $form->addElement(new XoopsFormLabel(_AM_OPTIONS, $block['edit_form'])); + } +} +$cache_select = new XoopsFormSelect(_AM_BCACHETIME, 'bcachetime', $block['cachetime']); +$cache_select->addOptionArray(array('0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK, '2592000' => _MONTH)); +$form->addElement($cache_select); +if (isset($block['bid'])) { + $form->addElement(new XoopsFormHidden('bid', $block['bid'])); +} +// $form->addElement(new XoopsFormHidden('options', $block['options'])); +$form->addElement(new XoopsFormHidden('op', $block['op'])); +$form->addElement(new XoopsFormHidden('fct', 'blocksadmin')); +$button_tray = new XoopsFormElementTray('', ' '); +if ($block['is_custom']) { + $button_tray->addElement(new XoopsFormButton('', 'previewblock', _PREVIEW, "submit")); +} +$button_tray->addElement(new XoopsFormButton('', 'submitblock', $block['submit_button'], "submit")); +$form->addElement($button_tray); + + +// checks browser compatibility with the control +function check_browser_can_use_spaw() { + $browser = $_SERVER['HTTP_USER_AGENT'] ; + // check if msie + if( eregi( "MSIE[^;]*" , $browser , $msie ) ) { + // get version + if( eregi( "[0-9]+\.[0-9]+" , $msie[0] , $version ) ) { + // check version + if( (float)$version[0] >= 5.5 ) { + // finally check if it's not opera impersonating ie + if( ! eregi( "opera" , $browser ) ) { + return true ; + } + } + } + } + return false ; +} + +?> \ No newline at end of file Added: XoopsModules/newsslider/trunk/newsslider/admin/myblocksadmin.php =================================================================== --- XoopsModules/newsslider/trunk/newsslider/admin/myblocksadmin.php (rev 0) +++ XoopsModules/newsslider/trunk/newsslider/admin/myblocksadmin.php 2012-02-06 21:57:09 UTC (rev 8893) @@ -0,0 +1,331 @@ +<?php +// ------------------------------------------------------------------------- // +// myblocksadmin.php // +// - XOOPS block admin for each modules - // +// GIJOE <http://www.peak.ne.jp/> // +// ------------------------------------------------------------------------- // + +include_once( '../../../include/cp_header.php' ) ; + +if (strstr(XOOPS_VERSION, "XOOPS 2.2")) { + include 'myblocksadmin2.php' ; + exit ; +} + +include_once( 'mygrouppermform.php' ) ; +include_once( XOOPS_ROOT_PATH.'/class/xoopsblock.php' ) ; +include_once "../include/gtickets.php" ;// GIJ + +$xoops_system_path = XOOPS_ROOT_PATH . '/modules/system' ; + +// language files +$language = $xoopsConfig['language'] ; +if( ! file_exists( "$xoops_system_path/language/$language/admin/blocksadmin.php") ) $language = 'english' ; + +// to prevent from notice that constants already defined +$error_reporting_level = error_reporting( 0 ) ; +include_once( "$xoops_system_path/constants.php" ) ; +include_once( "$xoops_system_path/language/$language/admin.php" ) ; +include_once( "$xoops_system_path/language/$language/admin/blocksadmin.php" ) ; + +error_reporting( $error_reporting_level ) ; + +$group_defs = file( "$xoops_system_path/language/$language/admin/groups.php" ) ; +foreach( $group_defs as $def ) { + if( strstr( $def , '_AM_ACCESSRIGHTS' ) || strstr( $def , '_AM_ACTIVERIGHTS' ) ) eval( $def ) ; +} +// check $xoopsModule +if( ! is_object( $xoopsModule ) ) redirect_header( XOOPS_URL.'/user.php' , 1 , _NOPERM ) ; + +// set target_module if specified by $_GET['dirname'] +$module_handler =& xoops_gethandler('module'); +if( ! empty( $_GET['dirname'] ) ) { + $target_module =& $module_handler->getByDirname($_GET['dirname']); +}/* else if( ! empty( $_GET['mid'] ) ) { + $target_module =& $module_handler->get( intval( $_GET['mid'] ) ); +}*/ + +if( ! empty( $target_module ) && is_object( $target_module ) ) { + // specified by dirname + $target_mid = $target_module->getVar( 'mid' ) ; + $target_mname = $target_module->getVar( 'name' ) . " " . sprintf( "(%2.2f)" , $target_module->getVar('version') / 100.0 ) ; + $query4redirect = '?dirname='.urlencode(strip_tags($_GET['dirname'])) ; +} else if( isset( $_GET['mid'] ) && $_GET['mid'] == 0 || $xoopsModule->getVar('dirname') == 'blocksadmin' ) { + $target_mid = 0 ; + $target_mname = '' ; + $query4redirect = '?mid=0' ; +} else { + $target_mid = $xoopsModule->getVar( 'mid' ) ; + $target_mname = $xoopsModule->getVar( 'name' ) ; + $query4redirect = '' ; +} + +// check access right (needs system_admin of BLOCK) +$sysperm_handler =& xoops_gethandler('groupperm'); +if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_BLOCK, $xoopsUser->getGroups())) redirect_header( XOOPS_URL.'/user.php' , 1 , _NOPERM ) ; + +// get blocks owned by the module (Imported from xoopsblock.php then modified) +//$block_arr =& XoopsBlock::getByModule( $target_mid ) ; +$db =& Database::getInstance(); +$sql = "SELECT * FROM ".$db->prefix("newblocks")." WHERE mid='$target_mid' ORDER BY visible DESC,side,weight"; +$result = $db->query($sql); +$block_arr = array(); +while( $myrow = $db->fetchArray($result) ) { + $block_arr[] = new XoopsBlock($myrow); +} + +function list_blocks() { + global $query4redirect , $block_arr , $xoopsGTicket ; + + // cachetime options + $cachetimes = array('0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK, '2592000' => _MONTH); + + // displaying TH + echo " + <form action='admin.php' name='blockadmin' method='post'> + <table width='95%' class='outer' cellpadding='4' cellspacing='1'> + <tr valign='middle'> + <th>"._AM_TITLE."</th> + <th align='center' nowrap='nowrap'>"._AM_SIDE."<div style='font-size:smaller'>"._AM_LEFT."-"._AM_CENTER."-"._AM_RIGHT."</div></th> + <th align='center'>"._AM_WEIGHT."</th> + <th align='center'>"._AM_VISIBLEIN."</th> + <th align='center'>"._AM_BCACHETIME."</th> + <th align='right'>"._AM_ACTION."</th> + </tr>\n" ; + + // blocks displaying loop + $class = 'even' ; + $block_configs = get_block_configs() ; + foreach( array_keys( $block_arr ) as $i ) { + $sseln = $ssel0 = $ssel1 = $ssel2 = $ssel3 = $ssel4 = $ssel5 = $ssel6 = $ssel7 = ""; + $scoln = $scol0 = $scol1 = $scol2 = $scol3 = $scol4 = $ssel5 = $ssel6 = $ssel7 = ""; + + $weight = $block_arr[$i]->getVar("weight") ; + $title = $block_arr[$i]->getVar("title") ; + $name = $block_arr[$i]->getVar("name") ; + $bcachetime = $block_arr[$i]->getVar("bcachetime") ; + $bid = $block_arr[$i]->getVar("bid") ; + + // visible and side + if ( $block_arr[$i]->getVar("visible") != 1 ) { + $sseln = " checked='checked'"; + $scoln = "#FF9966"; + } else switch( $block_arr[$i]->getVar("side") ) { + default : + case XOOPS_SIDEBLOCK_LEFT : + $ssel0 = " checked='checked'"; + $scol0 = "#00FF00"; + break ; + case XOOPS_SIDEBLOCK_RIGHT : + $ssel1 = " checked='checked'"; + $scol1 = "#00FF00"; + break ; + case XOOPS_CENTERBLOCK_LEFT : + $ssel2 = " checked='checked'"; + $scol2 = "#00FF00"; + break ; + case XOOPS_CENTERBLOCK_RIGHT : + $ssel4 = " checked='checked'"; + $scol4 = "#00FF00"; + break ; + case XOOPS_CENTERBLOCK_CENTER : + $ssel3 = " checked='checked'"; + $scol3 = "#00FF00"; + break ; + case XOOPS_CENTERBLOCK_BOTTOMLEFT : + $ssel5 = " checked='checked'"; + $scol5 = "#00FF00"; + break ; + case XOOPS_CENTERBLOCK_BOTTOMRIGHT : + $ssel6 = " checked='checked'"; + $scol6 = "#00FF00"; + break ; + case XOOPS_CENTERBLOCK_BOTTOM : + $ssel7 = " checked='checked'"; + $scol7 = "#00FF00"; + break ; + } + + // bcachetime + $cachetime_options = '' ; + foreach( $cachetimes as $cachetime => $cachetime_name ) { + if( $bcachetime == $cachetime ) { + $cachetime_options .= "<option value='$cachetime' selected='selected'>$cachetime_name</option>\n" ; + } else { + $cachetime_options .= "<option value='$cachetime'>$cachetime_name</option>\n" ; + } + } + + // target modules + $db =& Database::getInstance(); + $result = $db->query( "SELECT module_id FROM ".$db->prefix('block_module_link')." WHERE block_id='$bid'" ) ; + $selected_mids = array(); + while ( list( $selected_mid ) = $db->fetchRow( $result ) ) { + $selected_mids[] = intval( $selected_mid ) ; + } + $module_handler =& xoops_gethandler('module'); + $criteria = new CriteriaCompo(new Criteria('hasmain', 1)); + $criteria->add(new Criteria('isactive', 1)); + $module_list =& $module_handler->getList($criteria); + $module_list[-1] = _AM_TOPPAGE; + $module_list[0] = _AM_ALLPAGES; + ksort($module_list); + $module_options = '' ; + foreach( $module_list as $mid => $mname ) { + if( in_array( $mid , $selected_mids ) ) { + $module_options .= "<option value='$mid' selected='selected'>$mname</option>\n" ; + } else { + $module_options .= "<option value='$mid'>$mname</option>\n" ; + } + } + + // delete link if it is cloned block + if( $block_arr[$i]->getVar("block_type") == 'D' || $block_arr[$i]->getVar("block_type") == 'C' ) { + $delete_link = "<br /><a href='admin.php?fct=blocksadmin&op=delete&bid=$bid'>"._DELETE."</a>" ; + } else { + $delete_link = '' ; + } + + // clone link if it is marked as cloneable block + // $modversion['blocks'][n]['can_clone'] + if( $block_arr[$i]->getVar("block_type") == 'D' || $block_arr[$i]->getVar("block_type") == 'C' ) { + $can_clone = true ; + } else { + $can_clone = false ; + foreach( $block_configs as $bconf ) { + if( $block_arr[$i]->getVar("show_func") == $bconf['show_func'] && $block_arr[$i]->getVar("func_file") == $bconf['file'] && ( empty( $bconf['template'] ) || $block_arr[$i]->getVar("template") == $bconf['template'] ) ) { + if( ! empty( $bconf['can_clone'] ) ) $can_clone = true ; + } + } + } + if( $can_clone ) { + $clone_link = "<br /><a href='admin.php?fct=blocksadmin&op=clone&bid=$bid'>"._CLONE."</a>" ; + } else { + $clone_link = '' ; + } + + // displaying part + echo " + <tr valign='middle'> + <td class='$class'> + $name + <br /> + <input type='text' name='title[$bid]' value='$title' size='20' /> + </td> + <td class='$class' align='center' nowrap='nowrap' width='125px'> + <div align='center' > + <input type='radio' name='side[$bid]' value='".XOOPS_CENTERBLOCK_LEFT."'$ssel2 /> + <input type='radio' name='side[$bid]' value='".XOOPS_CENTERBLOCK_CENTER."'$ssel3 /> + <input type='radio' name='side[$bid]' value='".XOOPS_CENTERBLOCK_RIGHT."'$ssel4 /> + </div> + <div> + <span style='float:right'><input type='radio' name='side[$bid]' value='".XOOPS_SIDEBLOCK_RIGHT."'$ssel1 /></span> + <div align='left'><input type='radio' name='side[$bid]' value='".XOOPS_SIDEBLOCK_LEFT."'$ssel0 /></div> + </div> + <div align='center'> + <input type='radio' name='side[$bid]' value='".XOOPS_CENTERBLOCK_BOTTOMLEFT."'$ssel5 /> + <input type='radio' name='side[$bid]' value='".XOOPS_CENTERBLOCK_BOTTOM."'$ssel7 /> + <input type='radio' name='side[$bid]' value='".XOOPS_CENTERBLOCK_BOTTOMRIGHT."'$ssel6 /> + </div> + <br /> + <div style='float:left;width:30%;'> </div> + <div style='float:left;background-color:$scoln;'> + <input type='radio' name='side[$bid]' value='-1' $sseln /> + </div> + <div style='float:left;'>"._NONE."</div> + </td> + <td class='$class' align='center'> + <input type='text' name=weight[$bid] value='$weight' size='3' maxlength='5' style='text-align:right;' /> + </td> + <td class='$class' align='center'> + <select name='bmodule[$bid][]' size='5' multiple='multiple'> + $module_options + </select> + </td> + <td class='$class' align='center'> + <select name='bcachetime[$bid]' size='1'> + $cachetime_options + </select> + </td> + <td class='$class' align='right'> + <a href='admin.php?fct=blocksadmin&op=edit&bid=$bid'>"._EDIT."</a>{$delete_link}{$clone_link} + <input type='hidden' name='bid[$bid]' value='$bid' /> + </td> + </tr>\n" ; + + $class = ( $class == 'even' ) ? 'odd' : 'even' ; + } + + echo " + <tr> + <td class='foot' align='center' colspan='6'> + <input type='hidden' name='query4redirect' value='$query4redirect' /> + <input type='hidden' name='fct' value='blocksadmin' /> + <input type='hidden' name='op' value='order' /> + ".$xoopsGTicket->getTicketHtml( __LINE__ , 1800 , 'myblocksadmin' )." + <input type='submit' name='submit' value='"._SUBMIT."' /> + </td> + </tr> + </table> + </form>\n" ; + echo "</div>"; +} + + +function get_block_configs() { + $error_reporting_level = error_reporting( 0 ) ; + if( preg_match( '/^[.0-9a-zA-Z_-]+$/' , @$_GET['dirname'] ) ) { + include dirname(dirname(dirname(__FILE__))).'/'.$_GET['dirname'].'/xoops_version.php' ; + } else { + include '../xoops_version.php' ; + } + error_reporting( $error_reporting_level ) ; + if( empty( $modversion['blocks'] ) ) return array() ; + else return $modversion['blocks'] ; +} + + +function list_groups() { + global $target_mid , $target_mname , $block_arr ; + $item_list = array() ; + foreach( array_keys( $block_arr ) as $i ) { + $item_list[ $block_arr[$i]->getVar("bid") ] = $block_arr[$i]->getVar("title") ; + } + + $form = new MyXoopsGroupPermForm( _MD_AM_ADGS , 1 , 'block_read' , '' ) ; + if( $target_mid > 1 ) { + $form->addAppendix( 'module_admin' , $target_mid , $target_mname . ' ' . _AM_ACTIVERIGHTS ) ; + $form->addAppendix( 'module_read' , $target_mid , $target_mname .' ' . _AM_ACCESSRIGHTS ) ; + } + foreach( $item_list as $item_id => $item_name) { + $form->addItem( $item_id , $item_name ) ; + } + echo $form->render() ; + echo "</div>"; +} + + + +if( ! empty( $_POST['submit'] ) ) { + if ( ! $xoopsGTicket->check( true , 'myblocksadmin' ) ) { + redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors()); + } + + include( "mygroupperm.php" ) ; + redirect_header( XOOPS_URL."/modules/".$xoopsModule->dirname()."/admin/myblocksadmin.php$query4redirect" , 1 , _MD_AM_DBUPDATED ); +} + +xoops_cp_header() ; +include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->dirname()."/admin/functions.php"; +nws_adminmenu (0, _AM_BADMIN); + +if( ! empty( $block_arr ) ) { + echo "<h4 style='text-align:left;'>$target_mname : "._AM_BADMIN."</h4>\n" ; + list_blocks() ; +} + +list_groups() ; +xoops_cp_footer() ; + + +?> Added: XoopsModules/newsslider/trunk/newsslider/admin/myblocksadmin2.php =================================================================== --- XoopsModules/newsslider/trunk/newsslider/admin/myblocksadmin2.php (rev 0) +++ XoopsModules/newsslider/trunk/newsslider/admin/myblocksadmin2.php 2012-02-06 21:57:09 UTC (rev 8893) @@ -0,0 +1,348 @@ +<?php +// ------------------------------------------------------------------------- // +// myblocksadmin_for_2.2.php // +// - XOOPS block admin for each modules - // +// GIJOE <http://www.peak.ne.jp/> // +// ------------------------------------------------------------------------- // + +if ( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ; + +include_once( '../../../include/cp_header.php' ) ; + +include_once( 'mygrouppermform.php' ) ; +include_once( XOOPS_ROOT_PATH.'/class/xoopsblock.php' ) ; +include_once "../include/gtickets.php" ; + +$xoops_system_path = XOOPS_ROOT_PATH . '/modules/system' ; + +// language files +$language = $xoopsConfig['language'] ; +if ( ! file_exists( "$xoops_system_path/language/$language/admin/blocksadmin.php") ) $language = 'english' ; + +// to prevent from notice that constants already defined +$error_reporting_level = error_reporting( 0 ) ; +include_once( "$xoops_system_path/constants.php" ) ; +include_once( "$xoops_system_path/language/$language/admin.php" ) ; +include_once( "$xoops_system_path/language/$language/admin/blocksadmin.php" ) ; +error_reporting( $error_reporting_level ) ; + +$group_defs = file( "$xoops_system_path/language/$language/admin/groups.php" ) ; +foreach( $group_defs as $def ) { + if ( strstr( $def , '_AM_NWS_ACCESSRIGHTS' ) || strstr( $def , '_AM_NWS_ACTIVERIGHTS' ) ) eval( $def ) ; +} + + +// check $xoopsModule +if ( ! is_object( $xoopsModule ) ) redirect_header( XOOPS_URL.'/user.php' , 1 , _NOPERM ) ; + +// set target_module if specified by $_GET['dirname'] +$module_handler =& xoops_gethandler('module'); +if ( ! empty( $_GET['dirname'] ) ) { + $target_module =& $module_handler->getByDirname($_GET['dirname']); +}/* else if( ! empty( $_GET['mid'] ) ) { + $target_module =& $module_handler->get( intval( $_GET['mid'] ) ); +}*/ + +if ( ! empty( $target_module ) && is_object( $target_module ) ) { + // specified by dirname + $target_mid = $target_module->getVar( 'mid' ) ; + $target_mname = $target_module->getVar( 'name' ) . " " . sprintf( "(%2.2f)" , $target_module->getVar('version') / 100.0 ) ; + $query4redirect = '?dirname='.urlencode(strip_tags($_GET['dirname'])) ; +} else if ( isset( $_GET['mid'] ) && $_GET['mid'] == 0 || $xoopsModule->getVar('dirname') == 'blocksadmin' ) { + $target_mid = 0 ; + $target_mname = '' ; + $query4redirect = '?mid=0' ; +} else { + $target_mid = $xoopsModule->getVar( 'mid' ) ; + $target_mname = $xoopsModule->getVar( 'name' ) ; + $query4redirect = '' ; +} + +// check access right (needs system_admin of BLOCK) +$sysperm_handler =& xoops_gethandler('groupperm'); +if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_BLOCK, $xoopsUser->getGroups())) redirect_header( XOOPS_URL.'/user.php' , 1 , _NOPERM ) ; + +// get blocks owned by the module (Imported from xoopsblock.php then modified) +$db =& Database::getInstance(); +$sql = "SELECT bid,name,show_func,func_file,template FROM ".$db->prefix("newblocks")." WHERE mid='$target_mid'"; +$result = $db->query($sql); +$block_arr = array(); +while ( list( $bid , $bname , $show_func , $func_file , $template ) = $db->fetchRow( $result ) ) { + $block_arr[$bid] = array( + 'name' => $bname , + 'show_func' => $show_func , + 'func_file' => $func_file , + 'template' => $template + ) ; +} + + +// for 2.2 +function list_blockinstances() { + global $query4redirect , $block_arr , $xoopsGTicket ; + + $myts =& MyTextSanitizer::getInstance() ; + + // cachetime options + $cachetimes = array('0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK, '2592000' => _MONTH); + + // displaying TH + echo " + <form action='admin.php' name='blockadmin' method='post'> + <table width='95%' class='outer' cellpadding='4' cellspacing='1'> + <tr valign='middle'> + <th>"._AM_NWS_TITLE."</th> + <th align='center' nowrap='nowrap'>"._AM_NWS_SIDE."</th> + <th align='center'>"._AM_NWS_WEIGHT."</th> + <th align='center'>"._AM_NWS_VISIBLEIN."</th> + <th align='center'>"._AM_NWS_BCACHETIME."</th> + <th align='right'>"._AM_NWS_ACTION."</th> + </tr>\n" ; + + // get block instances + $crit = new Criteria("bid", "(".implode(",",array_keys($block_arr)).")", "IN"); + $criteria = new CriteriaCompo($crit); + $criteria->setSort('visible DESC, side ASC, weight'); + $instance_handler =& xoops_gethandler('blockinstance'); + $instances =& $instance_handler->getObjects($criteria, true, true); + + //Get modules and pages for visible in + $module_list[_AM_SYSTEMLEVEL]["0-2"] = _AM_ADMINBLOCK; + $module_list[_AM_SYSTEMLEVEL]["0-1"] = _AM_NWS_TOPPAGE; + $module_list[_AM_SYSTEMLEVEL]["0-0"] = _AM_NWS_ALLPAGES; + $criteria = new CriteriaCompo(new Criteria('hasmain', 1)); + $criteria->add(new Criteria('isactive', 1)); + $module_handler =& xoops_gethandler('module'); + $module_main =& $module_handler->getObjects($criteria, true, true); + if (count($module_main) > 0) { + foreach (array_keys($module_main) as $mid) { + $module_list[$module_main[$mid]->getVar('name')][$mid."-0"] = _AM_ALLMODULEPAGES; + $pages = $module_main[$mid]->getInfo("pages"); + if ($pages == false) { + $pages = $module_main[$mid]->getInfo("sub"); + } + if (is_array($pages) && $pages != array()) { + foreach ($pages as $id => $pageinfo) { + $module_list[$module_main[$mid]->getVar('name')][$mid."-".$id] = $pageinfo['name']; + } + } + } + } + + // blocks displaying loop + $class = 'even' ; + $block_configs = get_block_configs() ; + foreach( array_keys( $instances ) as $i ) { + $sseln = $ssel0 = $ssel1 = $ssel2 = $ssel3 = $ssel4 = ""; + $scoln = $scol0 = $scol1 = $scol2 = $scol3 = $scol4 = "#FFFFFF"; + + $weight = $instances[$i]->getVar("weight") ; + $title = $instances[$i]->getVar("title") ; + $bcachetime = $instances[$i]->getVar("bcachetime") ; + $bid = $instances[$i]->getVar("bid") ; + $name = $myts->makeTboxData4Edit( $block_arr[$bid]['name'] ) ; + + $visiblein = $instances[$i]->getVisibleIn(); + + // visible and side + if ( $instances[$i]->getVar("visible") != 1 ) { + $sseln = " checked='checked'"; + $scoln = "#FF0000"; + } else switch ( $instances[$i]->getVar("side") ) { + default : + case XOOPS_SIDEBLOCK_LEFT : + $ssel0 = " checked='checked'"; + $scol0 = "#00FF00"; + break ; + case XOOPS_SIDEBLOCK_RIGHT : + $ssel1 = " checked='checked'"; + $scol1 = "#00FF00"; + break ; + case XOOPS_CENTERBLOCK_LEFT : + $ssel2 = " checked='checked'"; + $scol2 = "#00FF00"; + break ; + case XOOPS_CENTERBLOCK_RIGHT : + $ssel4 = " checked='checked'"; + $scol4 = "#00FF00"; + break ; + case XOOPS_CENTERBLOCK_CENTER : + $ssel3 = " checked='checked'"; + $scol3 = "#00FF00"; + break ; + } + + // bcachetime + $cachetime_options = '' ; + foreach( $cachetimes as $cachetime => $cachetime_name ) { + if ( $bcachetime == $cachetime ) { + $cachetime_options .= "<option value='$cachetime' selected='selected'>$cachetime_name</option>\n" ; + } else { + $cachetime_options .= "<option value='$cachetime'>$cachetime_name</option>\n" ; + } + } + + $module_options = '' ; + foreach( $module_list as $mname => $module ) { + $module_options .= "<optgroup label='$mname'>\n" ; + foreach( $module as $mkey => $mval ) { + if ( in_array( $mkey , $visiblein ) ) { + $module_options .= "<option value='$mkey' selected='selected'>$mval</option>\n" ; + } else { + $module_options .= "<option label='$mval' value='$mkey'>$mval</option>\n" ; + } + } + $module_options .= "</optgroup>\n" ; + } + + // delete link if it is cloned block + $delete_link = "<br /><a href='".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=delete&id=$i&selmod=$mid'>"._DELETE."</a>" ; + + // displaying part + echo " + <tr valign='middle'> + <td class='$class'> + $name + <br /> + <input type='text' name='title[$i]' value='$title' size='20' /> + </td> + <td class='$class' align='center' nowrap='nowrap' width='125px'> + <div style='float:left;background-color:$scol0;'> + <input type='radio' name='side[$i]' value='".XOOPS_SIDEBLOCK_LEFT."' style='background-color:$scol0;' $ssel0 /> + </div> + <div style='float:left;'>-</div> + <div style='float:left;background-color:$scol2;'> + <input type='radio' name='side[$i]' value='".XOOPS_CENTERBLOCK_LEFT."' style='background-color:$scol2;' $ssel2 /> + </div> + <div style='float:left;background-color:$scol3;'> + <input type='radio' name='side[$i]' value='".XOOPS_CENTERBLOCK_CENTER."' style='background-color:$scol3;' $ssel3 /> + </div> + <div style='float:left;background-color:$scol4;'> + <input type='radio' name='side[$i]' value='".XOOPS_CENTERBLOCK_RIGHT."' style='background-color:$scol4;' $ssel4 /> + </div> + <div style='float:left;'>-</div> + <div style='float:left;background-color:$scol1;'> + <input type='radio' name='side[$i]' value='".XOOPS_SIDEBLOCK_RIGHT."' style='background-color:$scol1;' $ssel1 /> + </div> + <br /> + <br /> + <div style='float:left;width:40px;'> </div> + <div style='float:left;background-color:$scoln;'> + <input type='radio' name='side[$i]' value='-1' style='background-color:$scoln;' $sseln /> + </div> + <div style='float:left;'>"._NONE."</div> + </td> + <td class='$class' align='center'> + <input type='text' name=weight[$i] value='$weight' size='3' maxlength='5' style='text-align:right;' /> + </td> + <td class='$class' align='center'> + <select name='bmodule[$i][]' size='5' multiple='multiple'> + $module_options + </select> + </td> + <td class='$class' align='center'> + <select name='bcachetime[$i]' size='1'> + $cachetime_options + </select> + </td> + <td class='$class' align='right'> + <a href='".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=edit&id=$i'>"._EDIT."</a>{$delete_link} + <input type='hidden' name='id[$i]' value='$i' /> + </td> + </tr>\n" ; + + $class = ( $class == 'even' ) ? 'odd' : 'even' ; + } + + // list block classes for add (not instances) + foreach( $block_arr as $bid => $block ) { + + $description4show = '' ; + foreach( $block_configs as $bconf ) { + if ( $block['show_func'] == $bconf['show_func'] && $block['func_file'] == $bconf['file'] && ( empty( $bconf['template'] ) || $block['template'] == $bconf['template'] ) ) { + if ( ! empty( $bconf['description'] ) ) $description4show = $myts->makeTboxData4Show( $bconf['description'] ) ; + } + } + + echo " + <tr> + <td class='$class' align='left'> + ".$myts->makeTboxData4Edit($block['name'])." + </td> + <td class='$class' align='left' colspan='4'> + $description4show + </td> + <td class='$class' align='center'> + <input type='submit' name='addblock[$bid]' value='"._ADD."' /> + </td> + </tr> + \n" ; + $class = ( $class == 'even' ) ? 'odd' : 'even' ; + } + + echo " + <tr> + <td class='foot' align='center' colspan='6'> + <input type='hidden' name='query4redirect' value='$query4redirect' /> + <input type='hidden' name='fct' value='blocksadmin' /> + <input type='hidden' name='op' value='order2' /> + ".$xoopsGTicket->getTicketHtml( __LINE__ , 1800 , 'myblocksadmin' )." + <input type='submit' name='submit' value='"._SUBMIT."' /> + </td> + </tr> + </table> + </form>\n" ; +} + + +// for 2.2 +function list_groups2() { + global $target_mid , $target_mname , $xoopsDB ; + + $r... [truncated message content] |
From: <be...@us...> - 2012-02-06 23:37:08
|
Revision: 8894 http://xoops.svn.sourceforge.net/xoops/?rev=8894&view=rev Author: beckmi Date: 2012-02-06 23:36:59 +0000 (Mon, 06 Feb 2012) Log Message: ----------- Adding Lexikon Added Paths: ----------- XoopsModules/lexikon/ XoopsModules/lexikon/branches/ XoopsModules/lexikon/releases/ XoopsModules/lexikon/trunk/ XoopsModules/lexikon/trunk/lexikon/ XoopsModules/lexikon/trunk/lexikon/admin/ XoopsModules/lexikon/trunk/lexikon/admin/about.php XoopsModules/lexikon/trunk/lexikon/admin/admin.php XoopsModules/lexikon/trunk/lexikon/admin/admin_header.php XoopsModules/lexikon/trunk/lexikon/admin/category.php XoopsModules/lexikon/trunk/lexikon/admin/entry.php XoopsModules/lexikon/trunk/lexikon/admin/functions.php XoopsModules/lexikon/trunk/lexikon/admin/importdictionary.php XoopsModules/lexikon/trunk/lexikon/admin/importglossaire.php XoopsModules/lexikon/trunk/lexikon/admin/importwiwimod.php XoopsModules/lexikon/trunk/lexikon/admin/importwordbook.php XoopsModules/lexikon/trunk/lexikon/admin/importxwords.php XoopsModules/lexikon/trunk/lexikon/admin/index.html XoopsModules/lexikon/trunk/lexikon/admin/index.php XoopsModules/lexikon/trunk/lexikon/admin/menu.php XoopsModules/lexikon/trunk/lexikon/admin/myblockform.php XoopsModules/lexikon/trunk/lexikon/admin/myblocksadmin.php XoopsModules/lexikon/trunk/lexikon/admin/myblocksadmin2.php XoopsModules/lexikon/trunk/lexikon/admin/mygroupperm.php XoopsModules/lexikon/trunk/lexikon/admin/mygrouppermform.php XoopsModules/lexikon/trunk/lexikon/admin/preferences.php XoopsModules/lexikon/trunk/lexikon/admin/statistics.php XoopsModules/lexikon/trunk/lexikon/admin/submissions.php XoopsModules/lexikon/trunk/lexikon/admin/upgrade.php XoopsModules/lexikon/trunk/lexikon/authorlist.php XoopsModules/lexikon/trunk/lexikon/blocks/ XoopsModules/lexikon/trunk/lexikon/blocks/categories_block.php XoopsModules/lexikon/trunk/lexikon/blocks/entries_initial.php XoopsModules/lexikon/trunk/lexikon/blocks/entries_new.php XoopsModules/lexikon/trunk/lexikon/blocks/entries_spot.php XoopsModules/lexikon/trunk/lexikon/blocks/entries_top.php XoopsModules/lexikon/trunk/lexikon/blocks/index.html XoopsModules/lexikon/trunk/lexikon/blocks/random_term.php XoopsModules/lexikon/trunk/lexikon/category.php XoopsModules/lexikon/trunk/lexikon/changelog.txt XoopsModules/lexikon/trunk/lexikon/class/ XoopsModules/lexikon/trunk/lexikon/class/index.html XoopsModules/lexikon/trunk/lexikon/class/keyhighlighter.class.php XoopsModules/lexikon/trunk/lexikon/comment_delete.php XoopsModules/lexikon/trunk/lexikon/comment_edit.php XoopsModules/lexikon/trunk/lexikon/comment_new.php XoopsModules/lexikon/trunk/lexikon/comment_post.php XoopsModules/lexikon/trunk/lexikon/comment_reply.php XoopsModules/lexikon/trunk/lexikon/content.php XoopsModules/lexikon/trunk/lexikon/entry.php XoopsModules/lexikon/trunk/lexikon/gpl.txt XoopsModules/lexikon/trunk/lexikon/header.php XoopsModules/lexikon/trunk/lexikon/images/ XoopsModules/lexikon/trunk/lexikon/images/addthis_button0-bm.gif XoopsModules/lexikon/trunk/lexikon/images/addthis_button1-bm.gif XoopsModules/lexikon/trunk/lexikon/images/arrow.gif XoopsModules/lexikon/trunk/lexikon/images/arrow2.gif XoopsModules/lexikon/trunk/lexikon/images/bg.gif XoopsModules/lexikon/trunk/lexikon/images/blank.png XoopsModules/lexikon/trunk/lexikon/images/bookmark/ XoopsModules/lexikon/trunk/lexikon/images/bookmark/blinklist.gif XoopsModules/lexikon/trunk/lexikon/images/bookmark/delicious.gif XoopsModules/lexikon/trunk/lexikon/images/bookmark/diggman.gif XoopsModules/lexikon/trunk/lexikon/images/bookmark/furl.gif XoopsModules/lexikon/trunk/lexikon/images/bookmark/google.gif XoopsModules/lexikon/trunk/lexikon/images/bookmark/index.html XoopsModules/lexikon/trunk/lexikon/images/bookmark/newsvine.gif XoopsModules/lexikon/trunk/lexikon/images/bookmark/reddit.gif XoopsModules/lexikon/trunk/lexikon/images/bookmark/simpy.png XoopsModules/lexikon/trunk/lexikon/images/bookmark/spurl.gif XoopsModules/lexikon/trunk/lexikon/images/bookmark/technorati.png XoopsModules/lexikon/trunk/lexikon/images/bookmark/wong.gif XoopsModules/lexikon/trunk/lexikon/images/bookmark/yahoomyweb.gif XoopsModules/lexikon/trunk/lexikon/images/bubble_bottom.gif XoopsModules/lexikon/trunk/lexikon/images/bubble_middle.gif XoopsModules/lexikon/trunk/lexikon/images/bubble_top.gif XoopsModules/lexikon/trunk/lexikon/images/close12.gif XoopsModules/lexikon/trunk/lexikon/images/comments.gif XoopsModules/lexikon/trunk/lexikon/images/delete.gif XoopsModules/lexikon/trunk/lexikon/images/dialog-important.png XoopsModules/lexikon/trunk/lexikon/images/edit.gif XoopsModules/lexikon/trunk/lexikon/images/friend.gif XoopsModules/lexikon/trunk/lexikon/images/icon/ XoopsModules/lexikon/trunk/lexikon/images/icon/delete.gif XoopsModules/lexikon/trunk/lexikon/images/icon/edit.gif XoopsModules/lexikon/trunk/lexikon/images/icon/index.html XoopsModules/lexikon/trunk/lexikon/images/icon/off.gif XoopsModules/lexikon/trunk/lexikon/images/icon/on.gif XoopsModules/lexikon/trunk/lexikon/images/index.html XoopsModules/lexikon/trunk/lexikon/images/left_both.gif XoopsModules/lexikon/trunk/lexikon/images/lx.png XoopsModules/lexikon/trunk/lexikon/images/lx_slogo.png XoopsModules/lexikon/trunk/lexikon/images/magnifier.gif XoopsModules/lexikon/trunk/lexikon/images/open12.gif XoopsModules/lexikon/trunk/lexikon/images/print.gif XoopsModules/lexikon/trunk/lexikon/images/rarrow.gif XoopsModules/lexikon/trunk/lexikon/images/rarrow.png XoopsModules/lexikon/trunk/lexikon/images/right_both.gif XoopsModules/lexikon/trunk/lexikon/images/rss.gif XoopsModules/lexikon/trunk/lexikon/images/square-green.gif XoopsModules/lexikon/trunk/lexikon/images/square-red.gif XoopsModules/lexikon/trunk/lexikon/images/uploads/ XoopsModules/lexikon/trunk/lexikon/images/uploads/blank.png XoopsModules/lexikon/trunk/lexikon/images/uploads/index.html XoopsModules/lexikon/trunk/lexikon/images/uploads/xoops.gif XoopsModules/lexikon/trunk/lexikon/images/uploads/xoops.png XoopsModules/lexikon/trunk/lexikon/include/ XoopsModules/lexikon/trunk/lexikon/include/.htaccess XoopsModules/lexikon/trunk/lexikon/include/blocksadmin.inc.php XoopsModules/lexikon/trunk/lexikon/include/comment_functions.php XoopsModules/lexikon/trunk/lexikon/include/common.inc.php XoopsModules/lexikon/trunk/lexikon/include/functions.php XoopsModules/lexikon/trunk/lexikon/include/gtickets.php XoopsModules/lexikon/trunk/lexikon/include/index.html XoopsModules/lexikon/trunk/lexikon/include/notification.inc.php XoopsModules/lexikon/trunk/lexikon/include/onupdate.inc.php XoopsModules/lexikon/trunk/lexikon/include/requestform.php XoopsModules/lexikon/trunk/lexikon/include/search.inc.php XoopsModules/lexikon/trunk/lexikon/include/sitemap.plugin.php XoopsModules/lexikon/trunk/lexikon/include/storyform.inc.php XoopsModules/lexikon/trunk/lexikon/include/syndication.inc.php XoopsModules/lexikon/trunk/lexikon/include/updateblock.inc.php XoopsModules/lexikon/trunk/lexikon/include/waiting.plugin.php XoopsModules/lexikon/trunk/lexikon/index.php XoopsModules/lexikon/trunk/lexikon/js/ XoopsModules/lexikon/trunk/lexikon/js/balloontooltip.js XoopsModules/lexikon/trunk/lexikon/js/index.html XoopsModules/lexikon/trunk/lexikon/js/popup.js XoopsModules/lexikon/trunk/lexikon/js/shadowtooltip.js XoopsModules/lexikon/trunk/lexikon/js/tooltipscript2.js XoopsModules/lexikon/trunk/lexikon/language/ XoopsModules/lexikon/trunk/lexikon/language/.htaccess XoopsModules/lexikon/trunk/lexikon/language/english/ XoopsModules/lexikon/trunk/lexikon/language/english/admin.php XoopsModules/lexikon/trunk/lexikon/language/english/blocks.php XoopsModules/lexikon/trunk/lexikon/language/english/index.html XoopsModules/lexikon/trunk/lexikon/language/english/mail_template/ XoopsModules/lexikon/trunk/lexikon/language/english/mail_template/category_newterm_notify.tpl XoopsModules/lexikon/trunk/lexikon/language/english/mail_template/category_termsubmit_notify.tpl XoopsModules/lexikon/trunk/lexikon/language/english/mail_template/global_termrequest_notify.tpl XoopsModules/lexikon/trunk/lexikon/language/english/mail_template/global_termsubmit_notify.tpl XoopsModules/lexikon/trunk/lexikon/language/english/mail_template/index.html XoopsModules/lexikon/trunk/lexikon/language/english/mail_template/lexikon_newcat_notify.tpl XoopsModules/lexikon/trunk/lexikon/language/english/mail_template/lexikon_newpost_notify.tpl XoopsModules/lexikon/trunk/lexikon/language/english/mail_template/term_approve_notify.tpl XoopsModules/lexikon/trunk/lexikon/language/english/main.php XoopsModules/lexikon/trunk/lexikon/language/english/modinfo.php XoopsModules/lexikon/trunk/lexikon/language/german/ XoopsModules/lexikon/trunk/lexikon/language/german/admin.php XoopsModules/lexikon/trunk/lexikon/language/german/blocks.php XoopsModules/lexikon/trunk/lexikon/language/german/index.html XoopsModules/lexikon/trunk/lexikon/language/german/mail_template/ XoopsModules/lexikon/trunk/lexikon/language/german/mail_template/category_newterm_notify.tpl XoopsModules/lexikon/trunk/lexikon/language/german/mail_template/category_termsubmit_notify.tpl XoopsModules/lexikon/trunk/lexikon/language/german/mail_template/global_termrequest_notify.tpl XoopsModules/lexikon/trunk/lexikon/language/german/mail_template/global_termsubmit_notify.tpl XoopsModules/lexikon/trunk/lexikon/language/german/mail_template/index.html XoopsModules/lexikon/trunk/lexikon/language/german/mail_template/lexikon_newcat_notify.tpl XoopsModules/lexikon/trunk/lexikon/language/german/mail_template/lexikon_newpost_notify.tpl XoopsModules/lexikon/trunk/lexikon/language/german/mail_template/term_approve_notify.tpl XoopsModules/lexikon/trunk/lexikon/language/german/main.php XoopsModules/lexikon/trunk/lexikon/language/german/modinfo.php XoopsModules/lexikon/trunk/lexikon/language/index.html XoopsModules/lexikon/trunk/lexikon/letter.php XoopsModules/lexikon/trunk/lexikon/linkterms.css XoopsModules/lexikon/trunk/lexikon/notification_update.php XoopsModules/lexikon/trunk/lexikon/popup.php XoopsModules/lexikon/trunk/lexikon/print.php XoopsModules/lexikon/trunk/lexikon/profile.php XoopsModules/lexikon/trunk/lexikon/readme.txt XoopsModules/lexikon/trunk/lexikon/request.php XoopsModules/lexikon/trunk/lexikon/rss.php XoopsModules/lexikon/trunk/lexikon/search.php XoopsModules/lexikon/trunk/lexikon/sql/ XoopsModules/lexikon/trunk/lexikon/sql/index.html XoopsModules/lexikon/trunk/lexikon/sql/mysql.sql XoopsModules/lexikon/trunk/lexikon/style.css XoopsModules/lexikon/trunk/lexikon/submit.php XoopsModules/lexikon/trunk/lexikon/syndication.php XoopsModules/lexikon/trunk/lexikon/templates/ XoopsModules/lexikon/trunk/lexikon/templates/blocks/ XoopsModules/lexikon/trunk/lexikon/templates/blocks/categories_block.html XoopsModules/lexikon/trunk/lexikon/templates/blocks/entries_initial.html XoopsModules/lexikon/trunk/lexikon/templates/blocks/entries_new.html XoopsModules/lexikon/trunk/lexikon/templates/blocks/entries_random.html XoopsModules/lexikon/trunk/lexikon/templates/blocks/entries_spot.html XoopsModules/lexikon/trunk/lexikon/templates/blocks/entries_top.html XoopsModules/lexikon/trunk/lexikon/templates/blocks/index.html XoopsModules/lexikon/trunk/lexikon/templates/index.html XoopsModules/lexikon/trunk/lexikon/templates/lx_adminmenu.html XoopsModules/lexikon/trunk/lexikon/templates/lx_authorlist.html XoopsModules/lexikon/trunk/lexikon/templates/lx_bookmark.html XoopsModules/lexikon/trunk/lexikon/templates/lx_category.html XoopsModules/lexikon/trunk/lexikon/templates/lx_content.html XoopsModules/lexikon/trunk/lexikon/templates/lx_entry.html XoopsModules/lexikon/trunk/lexikon/templates/lx_header.html XoopsModules/lexikon/trunk/lexikon/templates/lx_index.html XoopsModules/lexikon/trunk/lexikon/templates/lx_letter.html XoopsModules/lexikon/trunk/lexikon/templates/lx_profile.html XoopsModules/lexikon/trunk/lexikon/templates/lx_request.html XoopsModules/lexikon/trunk/lexikon/templates/lx_rss.xml XoopsModules/lexikon/trunk/lexikon/templates/lx_search.html XoopsModules/lexikon/trunk/lexikon/templates/lx_submit.html XoopsModules/lexikon/trunk/lexikon/templates/lx_syndication.html XoopsModules/lexikon/trunk/lexikon/xoops_version.php Added: XoopsModules/lexikon/trunk/lexikon/admin/about.php =================================================================== --- XoopsModules/lexikon/trunk/lexikon/admin/about.php (rev 0) +++ XoopsModules/lexikon/trunk/lexikon/admin/about.php 2012-02-06 23:36:59 UTC (rev 8894) @@ -0,0 +1,159 @@ +<?php +/** + * $Id: about.php v 1.5 23 August 2004 hsalazar Exp $ + * Module: lexikon - glossary module + * Version: v 1.5 + * Release Date: + * Author: hsalazar + * License: GNU + */ + +include 'admin_header.php'; +$myts =& MyTextSanitizer::getInstance(); + +xoops_cp_header(); + +$module_handler =& xoops_gethandler('module'); +$versioninfo =& $module_handler->get($xoopsModule->getVar('mid')); +echo " + <style type=\"text/css\"> + label,text { + display: block; + float: left; + margin-bottom: 2px; + margin-top: 2px; + } + label { + text-align: right; + width: 150px; + padding-right: 20px; + } + br { + clear: left; + } +</style>"; +/** + * display module info + */ + +function about() { + $op = 'default'; + global $xoopsConfig, $xoopsModuleConfig, $xoopsModule, $versioninfo; + + echo "<br clear=\"all\" />"; + echo "<img src='".XOOPS_URL."/modules/".$xoopsModule->dirname()."/".$versioninfo->getInfo('image')."' alt='' hspace='0' vspace='0' align='left' style='margin-right: 10px; '>"; + echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>".$versioninfo->getInfo('name')." v. ".$versioninfo->getInfo('version')."</div>"; + if ($versioninfo->getInfo('author_realname') != '') { + $author_name = $versioninfo->getInfo('author')." (".$versioninfo->getInfo('author_realname').")"; + } else { + $author_name = $versioninfo->getInfo('author'); + } + echo "<br clear=\"all\" /><BR />"; + + echo "<div style='padding: 8px;'>"; + echo "<table width='100%' cellspacing='2' cellpadding='2' border='0' class='outer'>"; + echo "<tr>"; + echo "<td colspan='2' class='even' align='left'><b>" . $versioninfo->getInfo( 'name' ) . " " . $versioninfo->getInfo( 'version' ) . "</b></td>"; + echo "</tr></table>"; + echo "<br clear=\"all\" />"; + + echo "<label>" . _AM_LX_ABOUT_RELEASEDATE . ":</label><text>" . $versioninfo->getInfo( 'release' ) . "</text><br />"; + echo "<label>" . _AM_LX_ABOUT_AUTHOR . ":</label><text>" . $versioninfo->getInfo( 'author' ) . "</text><br />"; + echo "<label>" . _AM_LX_ABOUT_CREDITS . ":</label><text>" . $versioninfo->getInfo( 'credits' ) . "</text><br />"; + echo "<label>" . _AM_LX_ABOUT_LICENSE . ":</label><text><a href=\"".$versioninfo->getInfo( 'license_file' )."\" target=\"_blank\" >" . $versioninfo->getInfo( 'license' ) . "</a></text>\n"; + echo "</div>"; + echo "<br clear=\"all\" />"; + + // information + echo "<div style='padding: 8px;'>"; + echo "<table width='100%' cellspacing='2' cellpadding='2' border='0' class='outer'>"; + echo "<tr>"; + echo "<td colspan='2' class='even' align='left'><b>". _AM_LX_ABOUT_MODULE_INFO ."</b></td>"; + echo "</tr></table>"; + + echo "<label>" . _AM_LX_ABOUT_MODULE_STATUS . ":</label><text>" . $versioninfo->getInfo( 'module_status' ) . "</text><br />"; + echo "<label>" . _AM_LX_ABOUT_WEBSITE . ":</label><text>" . "<a href='" . $versioninfo->getInfo( 'module_website_url' ) . "' target='_blank'>" . $versioninfo->getInfo( 'module_website_name' ) . "</a>" . "</text><br />"; + + If ($versioninfo->getInfo('submit_bug') != '') { + echo "<label>" . _AM_LX_ABOUT_SUBMIT_BUG . "</label><text><a href='" . $versioninfo->getInfo('submit_bug') . "' target='blank'>" . _AM_LX_ABOUT_SUBMIT_BUG_TEXT . "</a></text><BR />"; + } + If ($versioninfo->getInfo('submit_feature') != '') { + echo "<label>" . _AM_LX_ABOUT_SUBMIT_FEATURE . "</label><text'><a href='" . $versioninfo->getInfo('submit_feature') . "' target='blank'>" . _AM_LX_ABOUT_SUBMIT_FEATURE_TEXT . "</a></text><BR />"; + } + echo "</div>"; + echo "<br clear=\"all\" />"; + + + echo "<div style='padding: 8px;'>"; + echo "<table width='100%' cellspacing='2' cellpadding='2' border='0' class='outer'>"; + echo "<tr>"; + echo "<td colspan='2' class='even' align='left'><b>". _AM_LX_ABOUT_DISCLAIMER ."</b></td>"; + echo "</tr></table>"; + echo "<div>". _AM_LX_ABOUT_DISCLAIMER_TEXT . "</div>"; + echo "</div>"; + echo "<br clear=\"all\" />"; + $file = XOOPS_ROOT_PATH. "/modules/" . $xoopsModule->dirname()."/changelog.txt"; + if ( is_readable( $file ) ) { + echo "<div style='padding: 8px;'>"; + echo "<table width='100%' cellspacing='2' cellpadding='2' border='0' class='outer'>"; + echo "<tr>"; + echo "<td colspan='2' class='even' align='left'><b>". _AM_LX_ABOUT_CHANGELOG ."</b></td>"; + echo "</tr></table>"; + + echo "". implode("<br />", file( $file )) . ""; + echo "</div>"; + + echo "<br clear=\"all\" />"; + } + +} + +/** + * readme file + */ + +function readme() { + global $xoopsConfig, $xoopsModuleConfig, $xoopsModule, $versioninfo; + + echo "<br clear=\"all\" />"; + echo "<img src='".XOOPS_URL."/modules/".$xoopsModule->dirname()."/".$versioninfo->getInfo('image')."' alt='' hspace='0' vspace='0' align='left' style='margin-right: 10px; '></a>"; + echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>".$versioninfo->getInfo('name')." v. ".$versioninfo->getInfo('version')."</div>"; + if ($versioninfo->getInfo('author_realname') != '') { + $author_name = $versioninfo->getInfo('author')." (".$versioninfo->getInfo('author_realname').")"; + } else { + $author_name = $versioninfo->getInfo('author'); + } + echo "<br clear=\"all\" /><BR />"; + + + $file = XOOPS_ROOT_PATH. "/modules/" . $xoopsModule->dirname()."/readme.txt"; + if ( is_readable( $file ) ) { + echo "<div style='padding: 8px;'>"; + echo "<table width='100%' cellspacing='2' cellpadding='2' border='0' class='outer'>"; + echo "<tr>"; + echo "<td colspan='2' class='even' align='left'><b>". _AM_LX_ABOUT_README ."</b></td>"; + echo "</tr></table>"; + + + echo "". implode("<br />", file( $file )) . ""; + echo "</div>"; + echo "<br clear=\"all\" />"; + } + +} + +/* -- Available operations -- */ +$op = isset($_GET['op']) ? $_GET['op'] : (isset($_POST['op']) ? $_POST['op'] : ''); +switch ( $op ) { + case "readme": + lx_adminMenu(47); + readme(); + break; + case "about": + default: + lx_adminMenu(11); + about(); + break; +} +xoops_cp_footer(); +?> \ No newline at end of file Added: XoopsModules/lexikon/trunk/lexikon/admin/admin.php =================================================================== --- XoopsModules/lexikon/trunk/lexikon/admin/admin.php (rev 0) +++ XoopsModules/lexikon/trunk/lexikon/admin/admin.php 2012-02-06 23:36:59 UTC (rev 8894) @@ -0,0 +1,160 @@ +<?php +// $Id: admin.php,v 1.7 2003/04/11 13:00:53 okazu Exp $ +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +// Author: Kazumi Ono (AKA onokazu) // +// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // +// Project: The XOOPS Project // +// ------------------------------------------------------------------------- // + +$admin_mydirname = basename( dirname( dirname( __FILE__ ) ) ) ; + +$fct = empty( $_POST['fct'] ) ? '' : trim( $_POST['fct'] ) ; +$fct = empty( $_GET['fct'] ) ? $fct : trim( $_GET['fct'] ) ; +if( empty( $fct ) ) $fct = 'preferences' ; +//if (isset($fct) && $fct == "users") { +// $xoopsOption['pagetype'] = "user"; +//} +include "../../../mainfile.php"; +// include "../../mainfile.php"; GIJ +include XOOPS_ROOT_PATH."/include/cp_functions.php"; + +include_once XOOPS_ROOT_PATH."/class/xoopsmodule.php"; +include_once "../include/gtickets.php" ;// GIJ + +$admintest = 0; + +if (is_object($xoopsUser)) { + $xoopsModule =& XoopsModule::getByDirname("system"); + if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + redirect_header(XOOPS_URL.'/user.php',3,_NOPERM); + exit(); + } + $admintest=1; +} else { + redirect_header(XOOPS_URL.'/user.php',3,_NOPERM); + exit(); +} + +// include system category definitions +include_once XOOPS_ROOT_PATH."/modules/system/constants.php"; +$error = false; +if ($admintest != 0) { + if (isset($fct) && $fct != '') { + if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php")) { + + if ( file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php") ) { + include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php"; + } else { + include XOOPS_ROOT_PATH."/modules/system/language/english/admin.php"; + } + + if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php")) { + include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php"; + } elseif (file_exists(XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php")) { + include XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php"; + } + include XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php"; + $sysperm_handler =& xoops_gethandler('groupperm'); + $category = !empty($modversion['category']) ? intval($modversion['category']) : 0; + unset($modversion); + if ($category > 0) { + $groups = $xoopsUser->getGroups(); + if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $sysperm_handler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))){ +// if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php")) { +// include_once XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php"; GIJ + if (file_exists("../include/{$fct}.inc.php")) { + include_once "../include/{$fct}.inc.php" ; + } else { + $error = true; + } + } else { + $error = true; + } + } elseif ($fct == 'version') { + if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/version/main.php")) { + include_once XOOPS_ROOT_PATH."/modules/system/admin/version/main.php"; + } else { + $error = true; + } + } else { + $error = true; + } + } else { + $error = true; + } + } else { + $error = true; + } +} + +if (false != $error) { + xoops_cp_header(); + echo "<h4>System Configuration</h4>"; + echo '<table class="outer" cellpadding="4" cellspacing="1">'; + echo '<tr>'; + $groups = $xoopsUser->getGroups(); + $all_ok = false; + if (!in_array(XOOPS_GROUP_ADMIN, $groups)) { + $sysperm_handler =& xoops_gethandler('groupperm'); + $ok_syscats = $sysperm_handler->getItemIds('system_admin', $groups); + } else { + $all_ok = true; + } + $admin_dir = XOOPS_ROOT_PATH."/modules/system/admin"; + $handle = opendir($admin_dir); + $counter = 0; + $class = 'even'; + while ($file = readdir($handle)) { + if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir($admin_dir.'/'.$file)) { + include $admin_dir.'/'.$file.'/xoops_version.php'; + if ($modversion['hasAdmin']) { + $category = isset($modversion['category']) ? intval($modversion['category']) : 0; + if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) { + echo "<td class='$class' align='center' valign='bottom' width='19%'>"; + echo "<a href='".XOOPS_URL."/modules/system/admin.php?fct=".$file."'><b>" .trim($modversion['name'])."</b></a>\n"; + echo "</td>"; + $counter++; + $class = ($class == 'even') ? 'odd' : 'even'; + } + if ( $counter > 4 ) { + $counter = 0; + echo "</tr>"; + echo "<tr>"; + } + } + unset($modversion); + } + } + while ($counter < 5) { + echo '<td class="'.$class.'"> </td>'; + $class = ($class == 'even') ? 'odd' : 'even'; + $counter++; + } + echo '</tr></table>'; + xoops_cp_footer(); +} + +?> \ No newline at end of file Added: XoopsModules/lexikon/trunk/lexikon/admin/admin_header.php =================================================================== --- XoopsModules/lexikon/trunk/lexikon/admin/admin_header.php (rev 0) +++ XoopsModules/lexikon/trunk/lexikon/admin/admin_header.php 2012-02-06 23:36:59 UTC (rev 8894) @@ -0,0 +1,37 @@ +<?php +/** + * $Id: admin_header.php v 1.0 8 May 2004 hsalazar Exp $ + * Module: lexikon - glossary module + * Version: v 1.00 + * Release Date: 8 May 2004 + * Author: hsalazar + * Licence: GNU + */ + +include("../../../mainfile.php"); +include '../../../include/cp_header.php'; + +if ( file_exists("../language/".$xoopsConfig['language']."/main.php") ) { + include "../language/".$xoopsConfig['language']."/main.php"; +} else { + include "../language/english/main.php"; +} +include_once XOOPS_ROOT_PATH."/modules/lexikon/include/functions.php"; +include_once XOOPS_ROOT_PATH."/modules/lexikon/admin/functions.php"; +include_once XOOPS_ROOT_PATH."/class/xoopsmodule.php"; +include_once XOOPS_ROOT_PATH."/class/xoopstree.php"; +include_once XOOPS_ROOT_PATH."/class/xoopslists.php"; +include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; +$myts =& MyTextSanitizer::getInstance(); + +if ( is_object( $xoopsUser) ) { + $xoopsModule = XoopsModule::getByDirname("lexikon"); + if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + redirect_header(XOOPS_URL."/",1,_NOPERM); + exit(); + } +} else { + redirect_header(XOOPS_URL."/",1,_NOPERM); + exit(); +} +?> \ No newline at end of file Added: XoopsModules/lexikon/trunk/lexikon/admin/category.php =================================================================== --- XoopsModules/lexikon/trunk/lexikon/admin/category.php (rev 0) +++ XoopsModules/lexikon/trunk/lexikon/admin/category.php 2012-02-06 23:36:59 UTC (rev 8894) @@ -0,0 +1,362 @@ +<?php +/** + * $Id: category.php v 1.0 8 May 2004 hsalazar Exp $ + * Module: lexikon - glossary module + * Version: v 1.00 + * Release Date: 8 May 2004 + * Author: hsalazar + * Licence: GNU + */ + +// -- General Stuff -- // +include( "admin_header.php" ); +$myts =& MyTextSanitizer::getInstance(); +xoops_cp_header(); +$op = ''; + + +/* -- Available operations -- */ + +function categoryDefault() { + $op = 'default'; + include_once XOOPS_ROOT_PATH . "/class/xoopslists.php"; + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + + $startentry = isset( $_GET['startentry'] ) ? intval( $_GET['startentry'] ) : 0; + $startcat = isset( $_GET['startcat'] ) ? intval( $_GET['startcat'] ) : 0; + $startsub = isset( $_GET['startsub'] ) ? intval( $_GET['startsub'] ) : 0; + $datesub = isset( $_GET['datesub'] ) ? intval( $_GET['datesub'] ) : 0; + + global $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule, $entryID; + + $myts =& MyTextSanitizer::getInstance(); + lx_adminMenu(1, _AM_LX_CATS); + $result01 = $xoopsDB -> query( "SELECT COUNT(*) + FROM " . $xoopsDB -> prefix( "lxcategories" ) . " " ); + list( $totalcategories ) = $xoopsDB -> fetchRow( $result01 ); + + $result02 = $xoopsDB -> query( "SELECT COUNT(*) + FROM " . $xoopsDB -> prefix( "lxentries" ) . " + WHERE submit = 0" ); + list( $totalpublished ) = $xoopsDB -> fetchRow( $result02 ); + + $result03 = $xoopsDB -> query( "SELECT COUNT(*) + FROM " . $xoopsDB -> prefix( "lxentries" ) . " + WHERE submit = '1' AND request = '0' " ); + list( $totalsubmitted ) = $xoopsDB -> fetchRow( $result03 ); + + $result04 = $xoopsDB -> query( "SELECT COUNT(*) + FROM " . $xoopsDB -> prefix( "lxentries" ) . " + WHERE submit = '1' AND request = '1' " ); + list( $totalrequested ) = $xoopsDB -> fetchRow( $result04 ); + + echo "<table width='100%' class='outer' style=\"margin-top: 6px; clear:both;\" cellspacing='2' cellpadding='3' border='0' ><tr>"; + echo "<td class='odd'>" . _AM_LX_TOTALENTRIES . "</td><td align='center' class='even'>" . $totalpublished . "</td>"; + if ($xoopsModuleConfig['multicats'] == 1) { + echo "<td class='odd'>" . _AM_LX_TOTALCATS . "</td><td align='center' class='even'>" . $totalcategories . "</td>"; + } + echo "<td class='odd'>" . _AM_LX_TOTALSUBM . "</td><td align='center' class='even'>" . $totalsubmitted . "</td> + <td class='odd'>" . _AM_LX_TOTALREQ . "</td><td align='center' class='even'>" . $totalrequested . "</td> + </tr></table> + <br /><br />"; + + if ($xoopsModuleConfig['multicats'] == 1) { + /** + * Code to show existing categories + **/ + + lx_collapsableBar('lexikoncat', 'lexikoncaticon'); + echo " <img onclick=\"toggle('cattable'); toggleIcon('cattableicon');\" id='lexikoncaticon' name='lexikoncaticon' src='" . XOOPS_URL . "/modules/lexikon/images/close12.gif' alt='' /></a> <A href='category.php?op=addcat'>"._AM_LX_CREATECAT."</a><br /><br />"; + echo" <div id='lexikoncat' style='float:left; width:100%;'> + <table class='outer' width='100%' border='0'> + <tr> + <td colspan='7' class='odd'> + <strong>". _AM_LX_SHOWCATS . ' (' . $totalcategories . ')'. "</strong></td></TR>"; + echo "<tr>"; + // create existing columns table //doppio + $resultC1 = $xoopsDB -> query( "SELECT COUNT(*) + FROM " . $xoopsDB -> prefix( "lxcategories" ) . " " ); + list( $numrows ) = $xoopsDB -> fetchRow( $resultC1 ); + + $sql = "SELECT * + FROM " . $xoopsDB -> prefix( "lxcategories" ) . " + ORDER BY weight"; + $resultC2 = $xoopsDB -> query( $sql, $xoopsModuleConfig['perpage'], $startcat ); + + echo "<td width='40' class='odd' align='center'><b>" . _AM_LX_ID . "</b></td> + <td class='odd' align='center'><b>" . _AM_LX_WEIGHT . "</b></td> + <td width='30%' class='odd' align='center'><b>" . _AM_LX_CATNAME . "</b></td> + <td width='10' class='odd' align='center'><b>" . _AM_LX_ENTRIES . "</b></td> + <td width='*' class='odd' align='center'><b>" . _AM_LX_DESCRIP . "</b></td> + <td width='60' class='odd' align='center'><b>" . _AM_LX_ACTION . "</b></td> + </tr>"; + + if ( $numrows > 0 ) // That is, if there ARE columns in the system + { + while ( list( $categoryID, $name, $description, $total, $weight ) = $xoopsDB -> fetchrow( $resultC2 ) ) + //while ( list( $categoryID, $name, $description, $total, $weight, ) = $xoopsDB -> fetchrow( $resultC2 ) ) + { + $name = $myts -> htmlSpecialChars( $name ); + $description = $myts -> htmlSpecialChars(xoops_substr( strip_tags( $description ),0,60)); + $modify = "<a href='category.php?op=mod&categoryID=" . $categoryID . "'><img src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/edit.gif width='24' height='24' ALT='"._AM_LX_EDITCAT."'></a>"; + $delete = "<a href='category.php?op=del&categoryID=" . $categoryID . "'><img src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/delete.gif width='24' height='24' ALT='"._AM_LX_DELETECAT."'></a>"; + + echo "<tr> + <td class='even' align='center'>" . $categoryID . "</td> + <td class='odd' width='10' align='center'>" . $weight . "</td> + <td class='odd' align='left'><a href='../category.php?categoryID=" . $categoryID . "'>" . $name . "</td> + <td class='odd' align='left'>" . $total . "</td> + <td class='odd' align='left'>" . $description . "</td> + <td class='even' align='center'> $modify $delete </td> + </tr></DIV>"; + } + } + else // that is, $numrows = 0, there's no columns yet + { + echo "<tr>"; + echo "<td class='odd' align='center' colspan= '7'>"._AM_LX_NOCATS."</td>"; + echo "</tr></DIV>"; + $categoryID = '0'; + } + echo "</table>\n"; + $pagenav = new XoopsPageNav( $numrows, $xoopsModuleConfig['perpage'], $startcat, 'startcat'); + echo '<div style="text-align:right;">' . $pagenav -> renderNav(8) . '</div>'; + echo "<br /><br />\n"; + echo "</div>"; + } else { + redirect_header( "index.php", 1, sprintf( _AM_LX_SINGLECAT, '' ) ); + } +} + + +/** + * Code to edit categories + **/ +function categoryEdit( $categoryID = '' ) { + $weight = 1; + $name = ''; + $description = ''; + $logourl = ''; + + Global $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule; + + // If there is a parameter, and the id exists, retrieve data: we're editing a column + if ( $categoryID ) { + $result = $xoopsDB -> query( " + SELECT categoryID, name, description, total, weight,logourl + FROM " . $xoopsDB -> prefix( "lxcategories" ) . " + WHERE categoryID = '$categoryID'" ); + + list( $categoryID, $name, $description, $total, $weight, $logourl ) = $xoopsDB -> fetchrow( $result ); + $myts =& MyTextSanitizer::getInstance(); + $name = $myts->htmlSpecialChars($name); + + if ( $xoopsDB -> getRowsNum( $result ) == 0 ) { + redirect_header( "index.php", 1, _AM_LX_NOCATTOEDIT ); + exit(); + } + //$myts =& MyTextSanitizer::getInstance(); + lx_adminMenu(1, _AM_LX_CATS); + + echo "<h3 style=\"color: #2F5376; margin-top: 6px; \">" . _AM_LX_CATSHEADER . "</h3>"; + $sform = new XoopsThemeForm( _AM_LX_MODCAT . ": $name" , "op", xoops_getenv( 'PHP_SELF' ) ); + } else { + //$myts =& MyTextSanitizer::getInstance(); + lx_adminMenu(1, _AM_LX_CATS); + + echo "<h3 style=\"color: #2F5376; margin-top: 6px; \">" . _AM_LX_CATSHEADER . "</h3>"; + $sform = new XoopsThemeForm( _AM_LX_NEWCAT, "op", xoops_getenv( 'PHP_SELF' ) ); + } + + $sform -> setExtra( 'enctype="multipart/form-data"' ); + $sform -> addElement( new XoopsFormText( _AM_LX_CATNAME, 'name', 50, 80, $name ), true ); + + $editor = lx_getWysiwygForm( _AM_LX_CATDESCRIPT, 'description', $description, 7, 60 ); + $sform -> addElement( $editor,true ); + unset($editor); + + $sform -> addElement( new XoopsFormText( _AM_LX_CATPOSIT, 'weight', 4, 4, $weight ), true ); + $sform -> addElement( new XoopsFormHidden( 'categoryID', $categoryID ) ); + //CategoryImage + if ($xoopsModuleConfig['useshots'] == 1) { + $mydirname = basename ( dirname( dirname( __FILE__ ) ) ) ; + $uploadir="/modules/" . $mydirname. "/images/uploads/"; + $catimg_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/modules/".$mydirname."/images/uploads/"); + + $image_option=new XoopsFormSelect('', 'logourl', $logourl); + $image_option->addOption('',_AM_LX_NONE); + $image_option->addOptionArray($catimg_array); + $imgtray = new XoopsFormElementTray(_AM_LX_SHOTIMAGE,''); + $image_option->setExtra("onchange='showImgSelected(\"logourlex\", \"logourl\", \"" . $uploadir . "\", \"\", \"" . XOOPS_URL . "\")'" ); + $imgtray->addElement($image_option,false); + $imgtray -> addElement( new XoopsFormLabel( '', "<img src='../images/uploads/" . $logourl . "' name='logourlex' id='logourlex' alt='' />" ) ); + $sform->addElement($imgtray); + } + $button_tray = new XoopsFormElementTray( '', '' ); + $hidden = new XoopsFormHidden( 'op', 'addcategory' ); + $button_tray -> addElement( $hidden ); + + // No ID for column -- then it's new column, button says 'Create' + if ( !$categoryID ) { + $butt_create = new XoopsFormButton( '', '', _AM_LX_CREATE, 'submit' ); + $butt_create->setExtra('onclick="this.form.elements.op.value=\'addcategory\'"'); + $button_tray->addElement( $butt_create ); + + $butt_clear = new XoopsFormButton( '', '', _AM_LX_CLEAR, 'reset' ); + $button_tray->addElement( $butt_clear ); + + $butt_cancel = new XoopsFormButton( '', '', _AM_LX_CANCEL, 'button' ); + $butt_cancel->setExtra('onclick="history.go(-1)"'); + $button_tray->addElement( $butt_cancel ); + } else // button says 'Update' + { + $butt_create = new XoopsFormButton( '', '', _AM_LX_MODIFY, 'submit' ); + $butt_create->setExtra('onclick="this.form.elements.op.value=\'addcategory\'"'); + $button_tray->addElement( $butt_create ); + + $butt_cancel = new XoopsFormButton( '', '', _AM_LX_CANCEL, 'button' ); + $butt_cancel->setExtra('onclick="history.go(-1)"'); + $button_tray->addElement( $butt_cancel ); + } + + $sform -> addElement( $button_tray ); + $sform -> display(); + unset( $hidden ); +// xoops_cp_footer(); +// break; +} + +/** + * Code to delete existing categories + **/ +function categoryDelete($categoryID = '') { + //global $xoopsDB, $xoopsConfig; + global $xoopsConfig, $xoopsDB, $xoopsModule; + $idc = isset($_POST['categoryID']) ? intval($_POST['categoryID']) : intval($_GET['categoryID']); + if ($idc == '') $idc = $_GET['categoryID']; + if ($idc <= 0) { + header('location: category.php'); + die(); + } + + $ok = isset($_POST['ok']) ? intval($_POST['ok']) : 0; + $result = $xoopsDB -> query( "SELECT categoryID, name FROM " . $xoopsDB -> prefix( "lxcategories" ) . " WHERE categoryID = $idc" ); + list( $categoryID, $name ) = $xoopsDB -> fetchrow( $result ); + // confirmed, so delete + if ( $ok == 1 ) { + //get all entries in the category + $result3=$xoopsDB->query("SELECT entryID from ".$xoopsDB->prefix("lxentries")." where categoryID = $idc"); + //now for each entry, delete the coments + while ( list($entryID)=$xoopsDB->fetchRow($result3) ) { + xoops_comment_delete($xoopsModule->getVar('mid'), $entryID); + xoops_notification_deletebyitem($xoopsModule->getVar('mid'), 'term', $entryID); + } + $xoopsDB->query("DELETE FROM ".$xoopsDB->prefix('lxcategories')." WHERE categoryID='$idc'"); + $result2 = $xoopsDB -> query( "DELETE FROM " .$xoopsDB -> prefix("lxentries")." WHERE categoryID = $idc"); + // delete notifications + xoops_notification_deletebyitem($xoopsModule->getVar('mid'), 'global', $categoryID); + xoops_notification_deletebyitem($xoopsModule->getVar('mid'), 'category', $categoryID); + redirect_header("category.php",1,sprintf( _AM_LX_CATISDELETED, $name ) ); + exit(); + } else { + //xoops_cp_header(); + xoops_confirm(array('op' => 'del', 'categoryID' => $categoryID, 'ok' => 1, 'name' => $name ), 'category.php', _AM_LX_DELETETHISCAT . "<br /><br>" . $name, _AM_LX_DELETE ); + } +} + + + +function categorySave ($categoryID = '') { + Global $xoopsUser, $xoopsModuleConfig, $xoopsConfig, $xoopsDB, $myts, $categoryID; + $categoryID = isset( $_POST['categoryID'] ) ? intval( $_POST['categoryID'] ) : intval( $_GET['categoryID'] ); + $weight = isset($_POST['weight'] ) ? intval($_POST['weight']) : intval($_GET['weight']); + $name = isset($_POST['name'] ) ? htmlSpecialChars($_POST['name']) : htmlSpecialChars($_GET['name']); + $description = isset($_POST['description'] ) ? htmlSpecialChars($_POST['description']) : htmlSpecialChars($_GET['description']); + $description = $myts -> xoopsCodeDecode($myts->censorString($description), $allowimage = 1); + $name = $myts->addSlashes($_POST['name']); + $logourl = $myts->addSlashes($_POST["logourl"]); + + // Run the query and update the data + if ( !$_POST['categoryID'] ) { + if ( $xoopsDB -> query( "INSERT INTO " . $xoopsDB -> prefix( "lxcategories" ) . " (categoryID, name, description, weight, logourl) VALUES ('', '$name', '$description', '$weight', '$logourl')" ) ) { + $newid = $xoopsDB->getInsertId(); + // Increment author's posts count (only if it's a new definition) + if (is_object($xoopsUser) && empty($categoryID)) { + $member_handler = &xoops_gethandler('member'); + $submitter =& $member_handler -> getUser($uid); + if (is_object($submitter) ) { + $submitter -> setVar('posts',$submitter -> getVar('posts') + 1); + $res=$member_handler -> insertUser($submitter, true); + unset($submitter); + } + } + //notification + if(!empty($xoopsModuleConfig['notification_enabled']) ){ + if ($newid == 0) { + $newid = $xoopsDB -> getInsertId(); + } + global $xoopsModule; + $notification_handler =& xoops_gethandler('notification'); + $tags = array(); + $tags['ITEM_NAME'] = $name; + $tags['ITEM_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/category.php?categoryID=' . $newid; + $notification_handler->triggerEvent( 'global', 0, 'new_category', $tags); + } + redirect_header( "category.php", 1, _AM_LX_CATCREATED ); + exit(); + } else { + redirect_header( "index.php", 1, _AM_LX_NOTUPDATED ); + exit(); + } + } else { + if ( $xoopsDB -> queryF( "UPDATE " . $xoopsDB -> prefix( "lxcategories" ) . " SET name = '$name', description = '$description', weight = '$weight' , logourl = '$logourl' WHERE categoryID = '$categoryID'" ) ) { + redirect_header( "category.php", 1, _AM_LX_CATMODIFIED ); + exit(); + } else { + redirect_header( "index.php", 1, _AM_LX_NOTUPDATED ); + exit(); + } + } +} + + +/** + * Available operations + **/ + +$op = 'default'; +if (isset($_POST['op'])) { + $op=$_POST['op']; +} else { + if (isset($_GET['op'])) { + $op=$_GET['op']; + } +} + + +switch ( $op ) { +case "mod": + $categoryID = isset( $_POST['categoryID'] ) ? intval( $_POST['categoryID'] ) : intval( $_GET['categoryID'] ); + categoryEdit( $categoryID ); + break; + +case "addcat": + categoryEdit(); + break; + +case "addcategory": + categorySave(); + break; + +case "del": + categoryDelete(); + break; + + +case "default": +default: + categoryDefault(); + break; +} +xoops_cp_footer(); +?> \ No newline at end of file Added: XoopsModules/lexikon/trunk/lexikon/admin/entry.php =================================================================== --- XoopsModules/lexikon/trunk/lexikon/admin/entry.php (rev 0) +++ XoopsModules/lexikon/trunk/lexikon/admin/entry.php 2012-02-06 23:36:59 UTC (rev 8894) @@ -0,0 +1,491 @@ +<?php +/** + * $Id: entry.php v 1.0 8 May 2004 hsalazar Exp $ + * Module: lexikon - glossary module + * Version: v 1.00 + * Release Date: 8 May 2004 + * Author: hsalazar + * Modifs: yerres + * Licence: GNU + */ + + +include( "admin_header.php" ); +$myts =& MyTextSanitizer::getInstance(); +xoops_cp_header(); + +$op = ''; + +/* -- Available operations -- */ +function entryDefault() { + global $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule, $entryID, $_GET; + include_once XOOPS_ROOT_PATH . "/class/xoopslists.php"; + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + lx_adminMenu(2, _AM_LX_ENTRIES); + + $startentry = isset( $_GET['startentry'] ) ? intval( $_GET['startentry'] ) : 0; + $startcat = isset( $_GET['startcat'] ) ? intval( $_GET['startcat'] ) : 0; + $startsub = isset( $_GET['startsub'] ) ? intval( $_GET['startsub'] ) : 0; + $datesub = isset( $_GET['datesub'] ) ? intval( $_GET['datesub'] ) : 0; + #$entryID = + + $myts =& MyTextSanitizer::getInstance(); + + $result01 = $xoopsDB -> query( "SELECT COUNT(*) + FROM " . $xoopsDB -> prefix( "lxcategories" ) . " " ); + list( $totalcategories ) = $xoopsDB -> fetchRow( $result01 ); + + $result02 = $xoopsDB -> query( "SELECT COUNT(*) + FROM " . $xoopsDB -> prefix( "lxentries" ) . " + WHERE submit = 0" ); + list( $totalpublished ) = $xoopsDB -> fetchRow( $result02 ); + + $result03 = $xoopsDB -> query( "SELECT COUNT(*) + FROM " . $xoopsDB -> prefix( "lxentries" ) . " + WHERE submit = '1' AND request = '0' " ); + list( $totalsubmitted ) = $xoopsDB -> fetchRow( $result03 ); + + $result04 = $xoopsDB -> query( "SELECT COUNT(*) + FROM " . $xoopsDB -> prefix( "lxentries" ) . " + WHERE submit = '1' AND request = '1' " ); + list( $totalrequested ) = $xoopsDB -> fetchRow( $result04 ); + + echo "<table width='100%' class='outer' style=\"margin-top: 6px; clear:both;\" cellspacing='2' cellpadding='3' border='0' ><tr>"; + echo "<td class='odd'>" . _AM_LX_TOTALENTRIES . "</td><td align='center' class='even'>" . $totalpublished . "</td>"; + if ($xoopsModuleConfig['multicats'] == 1) { + echo "<td class='odd'>" . _AM_LX_TOTALCATS . "</td><td align='center' class='even'>" . $totalcategories . "</td>"; + } + echo "<td class='odd'>" . _AM_LX_TOTALSUBM . "</td><td align='center' class='even'>" . $totalsubmitted . "</td> + <td class='odd'>" . _AM_LX_TOTALREQ . "</td><td align='center' class='even'>" . $totalrequested . "</td> + </tr></table> + <br /><br />"; + + + /** + * Code to show existing terms + **/ + + // create existing terms table + $resultA1 = $xoopsDB -> query( "SELECT COUNT(*) + FROM " . $xoopsDB -> prefix( "lxentries" ) . " + WHERE submit = 0" ); + list( $numrows ) = $xoopsDB -> fetchRow( $resultA1 ); + + $sql = "SELECT entryID, categoryID, term, uid, datesub, offline + FROM ".$xoopsDB->prefix('lxentries')." + WHERE submit = 0 + ORDER BY entryID DESC"; + $resultA2 = $xoopsDB -> query( $sql, $xoopsModuleConfig['perpage'], $startentry ); + $result = $xoopsDB->query($sql, $xoopsModuleConfig['perpage']); + + lx_collapsableBar('lexikonent', 'lexikonenticon'); + echo " <img onclick=\"toggle('toptable'); toggleIcon('toptableicon');\" id='lexikonenticon' name='lexikonenticon' src='" . XOOPS_URL . "/modules/lexikon/images/close12.gif' alt='' /></a> <A href='entry.php?op=add'>". _AM_LX_CREATEENTRY ."</A><br /><br/>"; + echo " <div id='lexikonent' style='float:left; width:100%;'> + <table class='outer' width='100%' border='0'> + <tr> + <td colspan='7' class='odd'> + <strong>". _AM_LX_SHOWENTRIES . ' (' . $totalpublished . ')'. "</strong></td></TR>"; + echo "<tr>"; + + echo "<td width='40' class='odd' align='center'><b>" . _AM_LX_ENTRYID . "</A></b></td>"; + if ($xoopsModuleConfig['multicats'] == 1) { + echo "<td width='20%' class='odd' align='center'><b>" . _AM_LX_ENTRYCATNAME . "</b></td>"; + } + echo "<td width='*' class='odd' align='center'><b>" . _AM_LX_ENTRYTERM . "</b></td> + <td width='90' class='odd' align='center'><b>" . _AM_LX_SUBMITTER . "</b></td> + <td width='90' class='odd' align='center'><b>" . _AM_LX_ENTRYCREATED . "</b></td> + <td width='30' class='odd' align='center'><b>" . _AM_LX_STATUS . "</b></td> + <td width='60' class='odd' align='center'><b>" . _AM_LX_ACTION . "</b></td> + </tr>"; + + if ( $numrows > 0 ) // That is, if there ARE entries in the system + { + while ( list( $entryID, $categoryID, $term, $uid, $created, $offline ) = $xoopsDB -> fetchrow( $resultA2 ) ) { + $resultA3 = $xoopsDB -> query( "SELECT name + FROM " . $xoopsDB -> prefix( "lxcategories" ) . " + WHERE categoryID = '$categoryID'" ); + list( $name ) = $xoopsDB -> fetchrow( $resultA3 ); + + $sentby = xoops_getLinkedUnameFromId($uid); + $catname = $myts -> htmlSpecialChars( $name ); + $term = $myts -> htmlSpecialChars( $term ); + $created= formatTimestamp( $created, 's' ); + $modify = "<a href='entry.php?op=mod&entryID=" . $entryID . "'><img src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/edit.gif width='24' height='24' ALT='"._AM_LX_EDITENTRY."'></a>"; + $delete = "<a href='entry.php?op=del&entryID=" . $entryID . "'><img src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/delete.gif width='24' height='24' ALT='"._AM_LX_DELETEENTRY."'></a>"; + + if ( $offline == 0 ) { + $status = "<img src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/on.gif alt='"._AM_LX_ENTRYISON."'>"; + } else { + $status = "<img src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/off.gif alt='"._AM_LX_ENTRYISOFF."'>"; + } + echo "<tr>"; + echo "<td class='even' align='center'>" . $entryID . "</td>"; + + if ($xoopsModuleConfig['multicats'] == 1) { + echo "<td class='odd' align='left'>" . $catname . "</td>"; + } + //echo "<td class='$class'align='left'>" . $term . "</td>"; + echo "<td class='odd'align='left'><a href='../entry.php?entryID=" . $entryID . "'>" . $term . "</td> + <td class='odd' align='center'>" . $sentby . "</td> + <td class='odd' align='center'>" . $created . "</td> + <td class='odd' align='center'>" . $status . "</td> + <td class='even' align='center'> $modify $delete </td> + </tr></DIV>"; + } + } + else // that is, $numrows = 0, there's no entries yet + { + echo "<tr>"; + echo "<td class='odd' align='center' colspan= '7'>"._AM_LX_NOTERMS."</td>"; + echo "</tr></DIV></DIV>"; + } + echo "</table>\n"; + $pagenav = new XoopsPageNav( $numrows, $xoopsModuleConfig['perpage'], $startentry, 'startentry'); + echo '<div style="text-align:right;">' . $pagenav -> renderNav(8) . '</div>'; + echo "<br /><BR>\n"; + echo "</div>"; +} + + +// -- Edit function -- // +function entryEdit( $entryID = '' ) { + global $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule, $XOOPS_URL; + + /** + * Clear all variables before we start + */ + if(!isset($block)) { $block = 1; } + if(!isset($html)) { $html = 1; } + if(!isset($smiley)) { $smiley = 1; } + if(!isset($xcodes)) { $xcodes = 1; } + if(!isset($breaks)) { $breaks = 1; } + if(!isset($offline)) { $offline = 0; } + if(!isset($submit)) { $submit = 0; } + if(!isset($request)) { $request = 0; } + if(!isset($notifypub)) { $notifypub = 1; } + if(!isset($categoryID)) { $categoryID = 1; } + if(!isset($term)) { $term = ""; } + if(!isset($init)) { $init = ""; } + + if (!isset($definition)) { + $definition = _AM_LX_WRITEHERE; + } + if(!isset($ref)) { $ref = ""; } + if(!isset($url)) { $url = ""; } + if(!isset($datesub)) { $datesub = 0; } + + // If there is a parameter, and the id exists, retrieve data: we're editing an entry + if ( $entryID ) { + $result = $xoopsDB -> query( " + SELECT categoryID, term, init, definition, ref, url, uid, submit, datesub, html, smiley, xcodes, breaks, block, offline, notifypub, request + FROM " . $xoopsDB -> prefix( "lxentries" ) . " + WHERE entryID = '$entryID'" ); + list( $categoryID, $term, $init, $definition, $ref, $url, $uid, $submit, $datesub, $html, $smiley, $xcodes, $breaks, $block, $offline, $notifypub, $request ) = $xoopsDB -> fetchrow( $result ); + + $myts =& MyTextSanitizer::getInstance(); + $term = $myts->stripSlashesGPC($myts->htmlSpecialChars($term)); + + if ( !$xoopsDB -> getRowsNum( $result ) ) { + redirect_header( "index.php", 1, _AM_LX_NOENTRYTOEDIT ); + exit(); + } + lx_adminMenu(2, _AM_LX_ENTRIES); + + echo "<h3 style=\"color: #2F5376; margin-top: 6px; \">" . _AM_LX_ADMINENTRYMNGMT . "</h3>"; + $sform = new XoopsThemeForm( _AM_LX_MODENTRY . ": $term" , "op", xoops_getenv( 'PHP_SELF' ) ); + } else // there's no parameter, so we're adding an entry + { + $result01 = $xoopsDB -> query( "SELECT COUNT(*) FROM " . $xoopsDB -> prefix( "lxcategories" ) . " " ); + list( $totalcats ) = $xoopsDB -> fetchRow( $result01 ); + if ( $totalcats == 0 && $xoopsModuleConfig['multicats'] == 1 ) { + redirect_header( "index.php", 1, _AM_LX_NEEDONECOLUMN ); + exit(); + } + lx_adminMenu(2, _AM_LX_ENTRIES); + $uid = $xoopsUser->getVar('uid'); + echo "<h3 style=\"color: #2F5376; margin-top: 6px; \">" . _AM_LX_ADMINENTRYMNGMT . "</h3>"; + $sform = new XoopsThemeForm( _AM_LX_NEWENTRY, "op", xoops_getenv( 'PHP_SELF' ) ); + } + + $sform -> setExtra( 'enctype="multipart/form-data"' ); + // Category selector + if ($xoopsModuleConfig['multicats'] == 1) { + $mytree = new XoopsTree( $xoopsDB->prefix( "lxcategories" ), "categoryID" , "0" ); + $categoryselect = new XoopsFormSelect(_AM_LX_CATNAME, 'categoryID', $categoryID); + $tbl = array(); + $tbl = $mytree->getChildTreeArray(0,'name'); + foreach($tbl as $oneline) { + if ($oneline['prefix']=='.') { + $oneline['prefix']=''; + } + $oneline['prefix'] = str_replace('.','-',$oneline['prefix']); + $categoryselect->addOption($oneline['categoryID'], $oneline['prefix'].' '.$oneline['name']); + } + $sform->addElement($categoryselect,true); + } + + // Author selector + ob_start(); + lx_getuserForm( intval($uid) ); + $sform -> addElement( new XoopsFormLabel( _AM_LX_AUTHOR, ob_get_contents() ) ); + ob_end_clean(); + + // Initial selector + ob_start(); + lx_getinit( intval($init) ); + $sform -> addElement( new XoopsFormLabel( _AM_LX_INIT, ob_get_contents() ) ); + ob_end_clean(); + + // Term, definition, reference and related URL + $sform -> addElement( new XoopsFormText( _AM_LX_ENTRYTERM, 'term', 50, 80, $term ), true ); + + // set editor according to the module's form_options + $editor = lx_getWysiwygForm( _AM_LX_ENTRYDEF, 'definition', $definition, 15, 60 ); + if ($definition == _MD_LX_WRITEHERE) { + $editor -> setExtra( 'onfocus="this.select()"' ); + } + $sform -> addElement( $editor,true ); + unset($editor); + + $sform -> addElement( new XoopsFormTextArea( _AM_LX_ENTRYREFERENCE, 'ref', $ref, 5, 60 ), false ); + $sform -> addElement( new XoopsFormText( _AM_LX_ENTRYURL, 'url', 50, 80, $url ), false ); + + // Code to take entry offline, for maintenance purposes + $offline_radio = new XoopsFormRadioYN(_AM_LX_SWITCHOFFLINE, 'offline', $offline, ' '._AM_LX_YES.'', ' '._AM_LX_NO.''); + $sform -> addElement($offline_radio); + + // Code to put entry in block + $block_radio = new XoopsFormRadioYN( _AM_LX_BLOCK, 'block', $block , ' ' . _AM_LX_YES . '', ' ' . _AM_LX_NO . '' ); + $sform -> addElement( $block_radio ); + + // VARIOUS OPTIONS + $options_tray = new XoopsFormElementTray(_AM_LX_OPTIONS,'<br />'); + + $html_checkbox = new XoopsFormCheckBox( '', 'html', $html ); + $html_checkbox -> addOption( 1, _AM_LX_DOHTML ); + $options_tray -> addElement( $html_checkbox ); + + $smiley_checkbox = new XoopsFormCheckBox( '', 'smiley', $smiley ); + $smiley_checkbox -> addOption( 1, _AM_LX_DOSMILEY ); + $options_tray -> addElement( $smiley_checkbox ); + + $xcodes_checkbox = new XoopsFormCheckBox( '', 'xcodes', $xcodes ); + $xcodes_checkbox -> addOption( 1, _AM_LX_DOXCODE ); + $options_tray -> addElement( $xcodes_checkbox ); + + $breaks_checkbox = new XoopsFormCheckBox( '', 'breaks', $breaks ); + $breaks_checkbox -> addOption( 1, _AM_LX_BREAKS ); + $options_tray -> addElement( $breaks_checkbox ); + + $sform -> addElement( $options_tray ); + + $sform -> addElement( new XoopsFormHidden( 'entryID', $entryID ) ); + + $button_tray = new XoopsFormElementTray( '', '' ); + $hidden = new XoopsFormHidden( 'op', 'addentry' ); + $button_tray -> addElement( $hidden ); + + + if ( !$entryID ) // there's no entryID? Then it's a new entry + { + + $butt_create = new XoopsFormButton( '', '', _AM_LX_CREATE, 'submit' ); + $butt_create->setExtra('onclick="this.form.elements.op.value=\'addentry\'"'); + $button_tray->addElement( $butt_create ); + + $butt_clear = new XoopsFormButton( '', '', _AM_LX_CLEAR, 'reset' ); + $button_tray->addElement( $butt_clear ); + + $butt_cancel = new XoopsFormButton( '', '', _AM_LX_CANCEL, 'button' ); + $butt_cancel->setExtra('onclick="history.go(-1)"'); + $button_tray->addElement( $butt_cancel ); + } else // else, we're editing an existing entry + { + $butt_create = new XoopsFormButton( '', '', _AM_LX_MODIFY, 'submit' ); + $butt_create->setExtra('onclick="this.form.elements.op.value=\'addentry\'"'); + $button_tray->addElement( $butt_create ); + + $butt_cancel = new XoopsFormButton( '', '', _AM_LX_CANCEL, 'button' ); + $butt_cancel->setExtra('onclick="history.go(-1)"'); + $button_tray->addElement( $butt_cancel ); + } + + $sform -> addElement( $button_tray ); + $sform -> display(); + unset( $hidden ); +} + + ... [truncated message content] |
From: <txm...@us...> - 2012-02-07 15:08:24
|
Revision: 8895 http://xoops.svn.sourceforge.net/xoops/?rev=8895&view=rev Author: txmodxoops Date: 2012-02-07 15:08:09 +0000 (Tue, 07 Feb 2012) Log Message: ----------- Added Paths: ----------- XoopsModules/txmeteo/ XoopsModules/txmeteo/branches/ XoopsModules/txmeteo/release/ XoopsModules/txmeteo/release/txmeteo 1.0/ XoopsModules/txmeteo/release/txmeteo 1.0/admin/ XoopsModules/txmeteo/release/txmeteo 1.0/admin/about.php XoopsModules/txmeteo/release/txmeteo 1.0/admin/admin_header.php XoopsModules/txmeteo/release/txmeteo 1.0/admin/index.html XoopsModules/txmeteo/release/txmeteo 1.0/admin/index.php XoopsModules/txmeteo/release/txmeteo 1.0/admin/menu.php XoopsModules/txmeteo/release/txmeteo 1.0/admin/permissions.php XoopsModules/txmeteo/release/txmeteo 1.0/admin/topic.php XoopsModules/txmeteo/release/txmeteo 1.0/blocks/ XoopsModules/txmeteo/release/txmeteo 1.0/blocks/index.html XoopsModules/txmeteo/release/txmeteo 1.0/class/ XoopsModules/txmeteo/release/txmeteo 1.0/class/index.html XoopsModules/txmeteo/release/txmeteo 1.0/class/menu.php XoopsModules/txmeteo/release/txmeteo 1.0/class/object.php XoopsModules/txmeteo/release/txmeteo 1.0/class/topic.php XoopsModules/txmeteo/release/txmeteo 1.0/images/ XoopsModules/txmeteo/release/txmeteo 1.0/images/TDMLogo.png XoopsModules/txmeteo/release/txmeteo 1.0/images/deco/ XoopsModules/txmeteo/release/txmeteo 1.0/images/deco/about.png XoopsModules/txmeteo/release/txmeteo 1.0/images/deco/arrow.gif XoopsModules/txmeteo/release/txmeteo 1.0/images/deco/delete.gif XoopsModules/txmeteo/release/txmeteo 1.0/images/deco/edit.gif XoopsModules/txmeteo/release/txmeteo 1.0/images/deco/index.html XoopsModules/txmeteo/release/txmeteo 1.0/images/deco/index.png XoopsModules/txmeteo/release/txmeteo 1.0/images/deco/off.gif XoopsModules/txmeteo/release/txmeteo 1.0/images/deco/on.gif XoopsModules/txmeteo/release/txmeteo 1.0/images/deco/permissions.png XoopsModules/txmeteo/release/txmeteo 1.0/images/deco/pref.png XoopsModules/txmeteo/release/txmeteo 1.0/images/deco/topic.png XoopsModules/txmeteo/release/txmeteo 1.0/images/deco/update.png XoopsModules/txmeteo/release/txmeteo 1.0/images/index.html XoopsModules/txmeteo/release/txmeteo 1.0/images/menu/ XoopsModules/txmeteo/release/txmeteo 1.0/images/menu/bg.png XoopsModules/txmeteo/release/txmeteo 1.0/images/menu/index.html XoopsModules/txmeteo/release/txmeteo 1.0/images/menu/left_both.png XoopsModules/txmeteo/release/txmeteo 1.0/images/menu/right_both.png XoopsModules/txmeteo/release/txmeteo 1.0/include/ XoopsModules/txmeteo/release/txmeteo 1.0/include/functions.php XoopsModules/txmeteo/release/txmeteo 1.0/include/index.html XoopsModules/txmeteo/release/txmeteo 1.0/include/install.php XoopsModules/txmeteo/release/txmeteo 1.0/index.php XoopsModules/txmeteo/release/txmeteo 1.0/language/ XoopsModules/txmeteo/release/txmeteo 1.0/language/english/ XoopsModules/txmeteo/release/txmeteo 1.0/language/english/admin.php XoopsModules/txmeteo/release/txmeteo 1.0/language/english/blocks.php XoopsModules/txmeteo/release/txmeteo 1.0/language/english/index.html XoopsModules/txmeteo/release/txmeteo 1.0/language/english/main.php XoopsModules/txmeteo/release/txmeteo 1.0/language/english/modinfo.php XoopsModules/txmeteo/release/txmeteo 1.0/language/french/ XoopsModules/txmeteo/release/txmeteo 1.0/language/french/admin.php XoopsModules/txmeteo/release/txmeteo 1.0/language/french/blocks.php XoopsModules/txmeteo/release/txmeteo 1.0/language/french/index.html XoopsModules/txmeteo/release/txmeteo 1.0/language/french/main.php XoopsModules/txmeteo/release/txmeteo 1.0/language/french/modinfo.php XoopsModules/txmeteo/release/txmeteo 1.0/language/index.html XoopsModules/txmeteo/release/txmeteo 1.0/language/italian/ XoopsModules/txmeteo/release/txmeteo 1.0/language/italian/admin.php XoopsModules/txmeteo/release/txmeteo 1.0/language/italian/blocks.php XoopsModules/txmeteo/release/txmeteo 1.0/language/italian/index.html XoopsModules/txmeteo/release/txmeteo 1.0/language/italian/main.php XoopsModules/txmeteo/release/txmeteo 1.0/language/italian/modinfo.php XoopsModules/txmeteo/release/txmeteo 1.0/sql/ XoopsModules/txmeteo/release/txmeteo 1.0/sql/index.html XoopsModules/txmeteo/release/txmeteo 1.0/sql/mysql.sql XoopsModules/txmeteo/release/txmeteo 1.0/templates/ XoopsModules/txmeteo/release/txmeteo 1.0/templates/blocks/ XoopsModules/txmeteo/release/txmeteo 1.0/templates/blocks/index.html XoopsModules/txmeteo/release/txmeteo 1.0/templates/index.html XoopsModules/txmeteo/release/txmeteo 1.0/xoops_version.php XoopsModules/txmeteo/trunk/ Added: XoopsModules/txmeteo/release/txmeteo 1.0/admin/about.php =================================================================== --- XoopsModules/txmeteo/release/txmeteo 1.0/admin/about.php (rev 0) +++ XoopsModules/txmeteo/release/txmeteo 1.0/admin/about.php 2012-02-07 15:08:09 UTC (rev 8895) @@ -0,0 +1,118 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * txmeteo - 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 txmeteo + * @author timgno (http://txmod.webuda.com) + * + * Version : 1.00: + * **************************************************************************** + */ + +include_once("admin_header.php"); + +xoops_cp_header(); + +if ( !is_readable(XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php")) { +txmeteo_adminmenu(3, _AM_TXMETEO_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 (3, _AM_TXMETEO_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_TXMETEO_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_TXMETEO_ABOUT_RELEASEDATE.":</label><text>".$versioninfo->getInfo("release")."</text><br /> + <label>"._AM_TXMETEO_ABOUT_AUTHOR.":</label><text>".$versioninfo->getInfo("author")."</text><br /> + <label>"._AM_TXMETEO_ABOUT_CREDITS.":</label><text>".$versioninfo->getInfo("credits")."</text><br /> + <label>"._AM_TXMETEO_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_TXMETEO_ABOUT_MODULE_INFO."</legend> + <div style=\"padding: 8px;\"> + <label>"._AM_TXMETEO_ABOUT_MODULE_STATUS.":</label><text>".$versioninfo->getInfo("module_status")."</text><br /> + <label>"._AM_TXMETEO_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_TXMETEO_ABOUT_AUTHOR_INFO."</legend> + <div style=\"padding: 8px;\"> + <label>"._AM_TXMETEO_ABOUT_AUTHOR_NAME.":</label><text>".$versioninfo->getInfo("author")."</text><br /> + <label>"._AM_TXMETEO_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_TXMETEO_ABOUT_CHANGELOG."</legend> + <div style=\"padding: 8px;\"> + <div>".implode("<br />", file( $file ))."</div> + </div> + </fieldset> + <br clear=\"all\" />"; + +} +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/txmeteo/release/txmeteo 1.0/admin/admin_header.php =================================================================== --- XoopsModules/txmeteo/release/txmeteo 1.0/admin/admin_header.php (rev 0) +++ XoopsModules/txmeteo/release/txmeteo 1.0/admin/admin_header.php 2012-02-07 15:08:09 UTC (rev 8895) @@ -0,0 +1,110 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * txmeteo - 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 txmeteo + * @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/txmeteo/class/topic.php"; + +if ( $xoopsUser ) { + $xoopsModule = XoopsModule::getByDirname("txmeteo"); + 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 txmeteo_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/txmeteo/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/txmeteo/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/txmeteo/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_TXMETEO_GENERALSET</a> + | <a href=\"".XOOPS_URL."/modules/txmeteo/index.php\">_AM_TXMETEO_GOINDEX</a> + | <a href=\"".XOOPS_URL."/modules/txmeteo/admin/upgrade.php\">_AM_TXMETEO_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/txmeteo/admin/index.php\"><span>_MI_TXMETEO_MANAGER_INDEX</span></a></li> + <li id=\"$tblColors[1]\"><a href=\"".XOOPS_URL."/modules/txmeteo/admin/topic.php\"><span>_MI_TXMETEO_MANAGER_TOPIC</span></a></li> + + <li id=\"$tblColors[2]\"><a href=\"".XOOPS_URL."/modules/txmeteo/admin/permissions.php\"><span>_MI_TXMETEO_MANAGER_PERMISSIONS</span></a></li> + <li id=\"$tblColors[3]\"><a href=\"".XOOPS_URL."/modules/txmeteo/admin/about.php\"><span>_MI_TXMETEO_MANAGER_ABOUT</span></a></li> + </ul></div>"; +} + +$topicHandler =& xoops_getModuleHandler("txmeteo_topic", "txmeteo"); + +?> \ No newline at end of file Added: XoopsModules/txmeteo/release/txmeteo 1.0/admin/index.html =================================================================== --- XoopsModules/txmeteo/release/txmeteo 1.0/admin/index.html (rev 0) +++ XoopsModules/txmeteo/release/txmeteo 1.0/admin/index.html 2012-02-07 15:08:09 UTC (rev 8895) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/txmeteo/release/txmeteo 1.0/admin/index.php =================================================================== --- XoopsModules/txmeteo/release/txmeteo 1.0/admin/index.php (rev 0) +++ XoopsModules/txmeteo/release/txmeteo 1.0/admin/index.php 2012-02-07 15:08:09 UTC (rev 8895) @@ -0,0 +1,78 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * txmeteo - 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 txmeteo + * @author timgno (http://txmod.webuda.com) + * + * Version : 1.00: + * **************************************************************************** + */ + +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")) { +txmeteo_adminmenu(0, _AM_TXMETEO_MANAGER_INDEX); +} else { +include_once XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php"; +loadModuleAdminMenu (0, _AM_TXMETEO_MANAGER_INDEX); +} + + //compte "total" + $count_topic = $topicHandler->getCount(); + //compte "attente" + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria("topic_online", 1)); + $topic_online = $topicHandler->getCount($criteria); + +include_once XOOPS_ROOT_PATH."/modules/txmeteo/class/menu.php"; + + $menu = new txmeteoMenu(); + $menu->addItem("topic", "topic.php", "../images/deco/topic.png", _AM_TXMETEO_MANAGER_TOPIC); + $menu->addItem("update", "../../system/admin.php?fct=modulesadmin&op=update&module=txmeteo", "../images/deco/update.png", _AM_TXMETEO_MANAGER_UPDATE); + $menu->addItem("permissions", "permissions.php", "../images/deco/permissions.png", _AM_TXMETEO_MANAGER_PERMISSIONS); + $menu->addItem("preference", "../../system/admin.php?fct=preferences&op=showmod&mod=".$xoopsModule->getVar("mid"). + "&&confcat_id=1", "../images/deco/pref.png", _AM_TXMETEO_MANAGER_PREFERENCES); + $menu->addItem("about", "about.php", "../images/deco/about.png", _AM_TXMETEO_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_TXMETEO_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_TXMETEO_MANAGER_TOPIC."</legend> + <br />"; + printf(_AM_TXMETEO_THEREARE_TOPIC, $count_topic); + echo "<br /><br />"; + printf(_AM_TXMETEO_THEREARE_TOPIC_ONLINE, $topic_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/txmeteo/release/txmeteo 1.0/admin/menu.php =================================================================== --- XoopsModules/txmeteo/release/txmeteo 1.0/admin/menu.php (rev 0) +++ XoopsModules/txmeteo/release/txmeteo 1.0/admin/menu.php 2012-02-07 15:08:09 UTC (rev 8895) @@ -0,0 +1,36 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * txmeteo - 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 txmeteo + * @author timgno (http://txmod.webuda.com) + * + * Version : 1.00: + * **************************************************************************** + */ + +$adminmenu = array(); +$adminmenu[0]["title"] = _MI_TXMETEO_MANAGER_INDEX; +$adminmenu[0]["link"] = "admin/index.php"; +$adminmenu[1]["title"] = _MI_TXMETEO_MANAGER_TOPIC; +$adminmenu[1]["link"] = "admin/topic.php"; +$adminmenu[2]["title"] = _MI_TXMETEO_MANAGER_PERMISSIONS; +$adminmenu[2]["link"] = "admin/permissions.php"; + +$adminmenu[3]["title"] = _MI_TXMETEO_MANAGER_ABOUT; +$adminmenu[3]["link"] = "admin/about.php"; + +?> \ No newline at end of file Added: XoopsModules/txmeteo/release/txmeteo 1.0/admin/permissions.php =================================================================== --- XoopsModules/txmeteo/release/txmeteo 1.0/admin/permissions.php (rev 0) +++ XoopsModules/txmeteo/release/txmeteo 1.0/admin/permissions.php 2012-02-07 15:08:09 UTC (rev 8895) @@ -0,0 +1,97 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * txmeteo - 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 txmeteo + * @author timgno (http://txmod.webuda.com) + * + * Version : 1.00: + * **************************************************************************** + */ + +include("admin_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")) { +txmeteo_adminmenu(2,_AM_TXMETEO_MANAGER_PERMISSIONS); +} else { +include_once XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php"; +loadModuleAdminMenu (2,_AM_TXMETEO_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_TXMETEO_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_TXMETEO_PERMISSIONS_ACCESS."</option> + <option value=\"2\"".$selected[1].">"._AM_TXMETEO_PERMISSIONS_SUBMIT."</option> + </select> + </td> + </tr> + </table> +</form>"; + +$module_id = $xoopsModule->getVar("mid"); + + switch($permtoset) + { + case 1: + $title_of_form = _AM_TXMETEO_PERMISSIONS_ACCESS; + $perm_name = "txmeteo_access"; + $perm_desc = ""; + break; + case 2: + $title_of_form = _AM_TXMETEO_PERMISSIONS_SUBMIT; + $perm_name = "txmeteo_submit"; + $perm_desc = ""; + break; + } + + $permform = new XoopsGroupPermForm($title_of_form, $module_id, $perm_name, $perm_desc, "admin/permissions.php"); + $xt = new XoopsTopic( $xoopsDB -> prefix("txmeteo_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/txmeteo/release/txmeteo 1.0/admin/topic.php =================================================================== --- XoopsModules/txmeteo/release/txmeteo 1.0/admin/topic.php (rev 0) +++ XoopsModules/txmeteo/release/txmeteo 1.0/admin/topic.php 2012-02-07 15:08:09 UTC (rev 8895) @@ -0,0 +1,257 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * txmeteo - 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 txmeteo + * @author timgno (http://txmod.webuda.com) + * + * Version : 1.00: + * **************************************************************************** + */ + +include_once("admin_header.php"); + +xoops_cp_header(); + +if (isset($_REQUEST["op"])) { + $op = $_REQUEST["op"]; +} else { + @$op = "show_list_topic"; +} + +//Menu admin +if ( !is_readable(XOOPS_ROOT_PATH . "/Frameworks/art/functions.admin.php") ) { +txmeteo_adminmenu(1, _AM_TXMETEO_MANAGER_TOPIC); +} else { +include_once XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php"; +loadModuleAdminMenu (1, _AM_TXMETEO_MANAGER_TOPIC); +} + +//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_TXMETEO_MANAGER_TOPIC."</strong> + </div><br /><br>"; +switch ($op) +{ + case "save_topic": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("topic.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["topic_id"])) { + $obj =& $topicHandler->get($_REQUEST["topic_id"]); + } else { + $obj =& $topicHandler->create(); + } + + //Form topic_pid + $obj->setVar("topic_pid", $_REQUEST["topic_pid"]); + //Form topic_title + $obj->setVar("topic_title", $_REQUEST["topic_title"]); + //Form topic_desc + $obj->setVar("topic_desc", $_REQUEST["topic_desc"]); + //Form topic_img + include_once XOOPS_ROOT_PATH."/class/uploader.php"; + $uploaddir_topic_img = XOOPS_ROOT_PATH."/uploads/txmeteo/topic/topic_img/"; + $uploader_topic_img = new XoopsMediaUploader($uploaddir_topic_img, $xoopsModuleConfig["topic_img_mimetypes"], $xoopsModuleConfig["topic_img_size"], null, null); + + if ($uploader_topic_img->fetchMedia("topic_img")) { + $uploader_topic_img->setPrefix("topic_img_") ; + $uploader_topic_img->fetchMedia("topic_img"); + if (!$uploader_topic_img->upload()) { + $errors = $uploader_topic_img->getErrors(); + redirect_header("javascript:history.go(-1)",3, $errors); + } else { + $obj->setVar("topic_img", $uploader_topic_img->getSavedFileName()); + } + } else { + $obj->setVar("topic_img", $_REQUEST["topic_img"]); + } + //Form topic_weight + $obj->setVar("topic_weight", $_REQUEST["topic_weight"]); + //Form topic_color + $obj->setVar("topic_color", $_REQUEST["topic_color"]); + //Form topic_submitter + $obj->setVar("topic_submitter", $_REQUEST["topic_submitter"]); + //Form topic_date_created + $obj->setVar("topic_date_created", strtotime($_REQUEST["topic_date_created"])); + //Form topic_online + $verif_topic_online = ($_REQUEST["topic_online"] == 1) ? "1" : "0"; + $obj->setVar("topic_online", $verif_topic_online); + + + if ($topicHandler->insert($obj)) { + redirect_header("topic.php?op=show_list_topic", 2, _AM_TXMETEO_FORMOK); + } + //include_once("../include/forms.php"); + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + break; + + case "edit_topic": + $obj = $topicHandler->get($_REQUEST["topic_id"]); + $form = $obj->getForm(); + break; + + case "delete_topic": + $obj =& $topicHandler->get($_REQUEST["topic_id"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("topic.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($topicHandler->delete($obj)) { + redirect_header("topic.php", 3, _AM_TXMETEO_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array("ok" => 1, "topic_id" => $_REQUEST["topic_id"], "op" => "delete_topic"), $_SERVER["REQUEST_URI"], sprintf(_AM_TXMETEO_FORMSUREDEL, $obj->getVar("topic"))); + } + break; + + case "update_online_topic": + + if (isset($_REQUEST["topic_id"])) { + $obj =& $topicHandler->get($_REQUEST["topic_id"]); + } + $obj->setVar("topic_online", $_REQUEST["topic_online"]); + + if ($topicHandler->insert($obj)) { + redirect_header("topic.php", 3, _AM_TXMETEO_FORMOK); + } + echo $obj->getHtmlErrors(); + + break; + + case "default": + default: + + $criteria = new CriteriaCompo(); + $criteria->setSort("topic_id"); + $criteria->setOrder("ASC"); + $numrows = $topicHandler->getCount(); + $topic_arr = $topicHandler->getall($criteria); + + //Fonction qui permet afficher les cat\xE9gories enfants + function txmeteo_display_children($topic_id = 0, $topic_arr, $prefix = "", $order = "", &$class) + { + $topicHandler =& xoops_getModuleHandler("txmeteo_topic", "txmeteo"); + $prefix = $prefix."<img src=\"".XOOPS_URL."/modules/txmeteo/images/deco/arrow.gif\">"; + foreach (array_keys($topic_arr) as $i) + { + $topic_id = $topic_arr[$i]->getVar("topic_id"); + $topic_img = $topic_arr[$i]->getVar("topic_img"); + $topic_title = $topic_arr[$i]->getVar("topic_title"); + $topic_weight = $topic_arr[$i]->getVar("topic_weight"); + echo "<tr class=\"".$class."\">"; + echo "<td align=\"left\">".$prefix." ".$topic_arr[$i]->getVar("topic_title")."</td>"; + echo "<td align=\"center\"><img src=\"".XOOPS_URL."/uploads/txmeteo/topic/topic_img/".$topic_arr[$i]->getVar("topic_img")."\" height=\"30px\" title=\"topic_img\" alt=\"topic_img\"></td>"; + echo "<td align=\"center\">".$topic_arr[$i]->getVar("topic_weight")."</td>"; + echo "<td align=\"center\"><span style=\"background-color:".$topic_arr[$i]->getVar("topic_color")."\"> </span> -> ".$topic_arr[$i]->getVar("topic_color")."</td>"; + + $online = $topic_arr[$i]->getVar("topic_online"); + + if( $online == 1 ) { + echo "<td align=\"center\"><a href=\"./topic.php?op=update_online_topic&topic_id=".$topic_arr[$i]->getVar("topic_id")."&topic_online=0\"><img src=\"./../images/deco/on.gif\" border=\"0\" alt=\""._AM_TXMETEO_ON."\" title=\""._AM_TXMETEO_ON."\"></a></td>"; + } else { + echo "<td align=\"center\"><a href=\"./topic.php?op=update_online_topic&topic_id=".$topic_arr[$i]->getVar("topic_id")."&topic_online=1\"><img src=\"./../images/deco/off.gif\" border=\"0\" alt=\""._AM_TXMETEO_OFF."\" title=\""._AM_TXMETEO_OFF."\"></a></td>"; + } + echo "<td align=\"center\" width=\"10%\"> + <a href=\"topic.php?op=edit_topic&topic_id=".$topic_arr[$i]->getVar("topic_id")."\"><img src=\"../images/deco/edit.gif\" alt=\""._AM_TXMETEO_EDIT."\" title=\""._AM_TXMETEO_EDIT."\"></a> + <a href=\"topic.php?op=delete_topic&topic_id=".$topic_arr[$i]->getVar("topic_id")."\"><img src=\"../images/deco/delete.gif\" alt=\""._AM_TXMETEO_DELETE."\" title=\""._AM_TXMETEO_DELETE."\"></a> + </td> + </tr>"; + $class = ($class == "even") ? "odd" : "even"; + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria("topic_pid", $topic_arr[$i]->getVar("topic_id"))); + $criteria->setSort("topic_title"); + $criteria->setOrder("ASC"); + $topic_pid = $topicHandler->getall($criteria); + $num_pid = $topicHandler->getCount(); + if ( $num_pid != 0 ) + { + txmeteo_display_children($topic_id, $topic_pid, $prefix, $order, $class); + } + } + } + + //Affichage du tableau + if ($numrows>0) + { + echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> + <tr> + <th align=\"center\">"._AM_TXMETEO_TOPIC_TITLE."</th> + <th align=\"center\">"._AM_TXMETEO_TOPIC_IMG."</th> + <th align=\"center\">"._AM_TXMETEO_TOPIC_WEIGHT."</th> + <th align=\"center\">"._AM_TXMETEO_TOPIC_COLOR."</th> + <th align=\"center\">"._AM_TXMETEO_TOPIC_ONLINE."</th> + + <th align=\"center\" width=\"10%\">"._AM_TXMETEO_FORMACTION."</th> + </tr>"; + $class = "odd"; + $prefix = "<img src=\"".XOOPS_URL."/modules/txmeteo/images/deco/arrow.gif\">"; + foreach (array_keys($topic_arr) as $i) + { + if ( $topic_arr[$i]->getVar("topic_pid") == 0 ) + { + $topic_id = $topic_arr[$i]->getVar("topic_id"); + $topic_img = $topic_arr[$i]->getVar("topic_img"); + $topic_title = $topic_arr[$i]->getVar("topic_title"); + $topic_weight = $topic_arr[$i]->getVar("topic_weight"); + echo "<tr class=\"".$class."\">"; + echo "<td align=\"left\">".$prefix." ".$topic_arr[$i]->getVar("topic_title")."</td>"; + echo "<td align=\"center\"><img src=\"".XOOPS_URL."/uploads/txmeteo/topic/topic_img/".$topic_arr[$i]->getVar("topic_img")."\" height=\"30px\" title=\"topic_img\" alt=\"topic_img\"></td>"; + echo "<td align=\"center\">".$topic_arr[$i]->getVar("topic_weight")."</td>"; + echo "<td align=\"center\"><span style=\"background-color:".$topic_arr[$i]->getVar("topic_color")."\"> </span> -> ".$topic_arr[$i]->getVar("topic_color")."</td>"; + + $online = $topic_arr[$i]->getVar("topic_online"); + + if( $online == 1 ) { + echo "<td align=\"center\"><a href=\"./topic.php?op=update_online_topic&topic_id=".$topic_arr[$i]->getVar("topic_id")."&topic_online=0\"><img src=\"./../images/deco/on.gif\" border=\"0\" alt=\""._AM_TXMETEO_ON."\" title=\""._AM_TXMETEO_ON."\"></a></td>"; + } else { + echo "<td align=\"center\"><a href=\"./topic.php?op=update_online_topic&topic_id=".$topic_arr[$i]->getVar("topic_id")."&topic_online=1\"><img src=\"./../images/deco/off.gif\" border=\"0\" alt=\""._AM_TXMETEO_OFF."\" title=\""._AM_TXMETEO_OFF."\"></a></td>"; + } + echo "<td align=\"center\" width=\"10%\"> + <a href=\"topic.php?op=edit_topic&topic_id=".$topic_arr[$i]->getVar("topic_id")."\"><img src=\"../images/deco/edit.gif\" alt=\""._AM_TXMETEO_EDIT."\" title=\""._AM_TXMETEO_EDIT."\"></a> + <a href=\"topic.php?op=delete_topic&topic_id=".$topic_arr[$i]->getVar("topic_id")."\"><img src=\"../images/deco/delete.gif\" alt=\""._AM_TXMETEO_DELETE."\" title=\""._AM_TXMETEO_DELETE."\"></a> + </td> + </tr>"; + $class = ($class == "even") ? "odd" : "even"; + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria("topic_pid", $topic_id)); + $criteria->setSort("topic_title"); + $criteria->setOrder("ASC"); + $topic_pid = $topicHandler->getall($criteria); + $num_pid = $topicHandler->getCount(); + + if ( $num_pid != 0) + { + txmeteo_display_children($topic_id, $topic_pid, $prefix, "topic_title", $class); + } + } + } + echo "</table><br><br>"; + } + + // Affichage du formulaire + $obj =& $topicHandler->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/txmeteo/release/txmeteo 1.0/blocks/index.html =================================================================== --- XoopsModules/txmeteo/release/txmeteo 1.0/blocks/index.html (rev 0) +++ XoopsModules/txmeteo/release/txmeteo 1.0/blocks/index.html 2012-02-07 15:08:09 UTC (rev 8895) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/txmeteo/release/txmeteo 1.0/class/index.html =================================================================== --- XoopsModules/txmeteo/release/txmeteo 1.0/class/index.html (rev 0) +++ XoopsModules/txmeteo/release/txmeteo 1.0/class/index.html 2012-02-07 15:08:09 UTC (rev 8895) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/txmeteo/release/txmeteo 1.0/class/menu.php =================================================================== --- XoopsModules/txmeteo/release/txmeteo 1.0/class/menu.php (rev 0) +++ XoopsModules/txmeteo/release/txmeteo 1.0/class/menu.php 2012-02-07 15:08:09 UTC (rev 8895) @@ -0,0 +1,175 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * txmeteo - 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 txmeteo + * @author timgno (http://txmod.webuda.com) + * + * Version : 1.00: + * **************************************************************************** + */ + +class txmeteoMenu +{ + public $Width = 100; + public $Height = 100; + public $BgColor = "transparent"; + public $OverBgColor = "#FFF6C1"; + public $BorderWidth = 1; + public $BorderColor = "#CCCCCC"; + public $OverBorderColor = "#FF9900"; + public $BorderStyle = "solid"; + public $OverBorderStyle = "solid"; + public $Font = "Tahoma, Arial, Helvetica"; + public $FontColor = "#666666"; + public $OverFontColor = "#1E90FF"; + public $FontDeco = "none"; + public $OverFontDeco = "none"; + public $FontSize = 11; + public $FontWeight = "bold"; + public $FontExtra = "Tahoma, Arial, Helvetica"; + public $FontExtraColor = "#A98952"; + public $OverFontExtraColor = "#0033FF"; + public $FontExtraDeco = "underline"; + public $OverFontExtraDeco = "underline"; + public $FontExtraSize = 9; + public $FontExtraWeight = "normal"; + public $TextAlign = "center"; + private $_items = array(); + + public function addItem($id, $link="", $icon="", $name="", $extra="", $alt=""){ + if (isset($this->_items[$id])) return false; + $rtn["link"] = $link; + $rtn["icon"] = $icon; + $rtn["name"] = $name; + $rtn["extra"] = $extra; + $rtn["alt"] = $alt; + $this->_items[$id] = $rtn; + return true; + } + + public function setLink($id, $link){ + if (isset($this->_items[$id])){ + $this->_items[$id]["link"] = $link; + return true; + } else { + return false; + } + } + + public function setIcon($id, $icon){ + if (isset($this->_items[$id])){ + $this->_items[$id]["icon"] = $icon; + return true; + } else { + return false; + } + } + + public function setName($id, $name){ + if (isset($this->_items[$id])){ + $this->_items[$id]["name"] = $name; + return true; + } else { + return false; + } + } + + public function setExtra($id, $extra){ + if (isset($this->_items[$id])){ + $this->_items[$id]["extra"] = $extra; + return true; + } else { + return false; + } + } + + public function setAlt($id, $alt){ + if (isset($this->_items[$id])){ + $this->_items[$id]["alt"] = $alt; + return true; + } else { + return false; + } + } + + public function getCSS($ws = true){ + if ($ws) $csscode = "<style type=\"text/css\">\n<!--"; + $csscode .= "div.rmmenuicon{ + margin: 3px; + font-family: $this->Font; + text-align: ".$this->TextAlign."; + } + div.rmmenuicon a { + display: block; float: left; + height: ".$this->Height."px !important; + height: ".$this->Height."px; + width: ".$this->Width."px !important; + width: ".$this->Width."px; + vertical-align: middle; + text-decoration : none; + border: ".$this->BorderWidth."px $this->BorderStyle $this->BorderColor; + padding: 2px 5px 1px 5px; + margin: 3px; + color: $this->FontColor; + } + div.rmmenuicon img { margin-top: 8px; margin-bottom: 8px; } + div.rmmenuicon a span { + font-size: ".$this->FontSize."px; + font-weight: $this->FontWeight; + display: block; + } + div.rmmenuicon a span.uno{ + font-size: ".$this->FontExtraSize."px; + font-weight: $this->FontExtraWeight; + text-decoration: $this->FontExtraDeco; + color: $this->FontExtraColor; + } + div.rmmenuicon a:hover{ + background-color: $this->OverBgColor; + border: ".$this->BorderWidth."px $this->BorderStyle $this->OverBorderColor; + color: $this->OverFontColor; + } + div.rmmenuicon a:hover span{ + text-decoration: $this->OverFontDeco; + } + div.rmmenuicon a:hover span.uno{ + text-decoration: $this->OverFontExtraDeco; + color: $this->OverFontExtraColor; + }"; + if ($ws) $csscode .= "\n-->\n</style>"; + return $csscode; + } + + public function render(){ + + $ret = "<div class=\"rmmenuicon\">"; + foreach ($this->_items as $k => $v){ + $ret .= "<a href=\"".$v["link"]."\" title=\"".($v["alt"]!="" ? $v["alt"] : $v["name"])."\">".($v["icon"]!="" ? "<img src=\"".$v["icon"]."\" alt=\"".$v["name"]."\" /> " : ""); + if ($v["name"] != "") $ret .= "<span>".$v["name"]."</span>"; + if ($v["extra"] != "") $ret .= "<span class=\"uno\">".$v["extra"]."</span>"; + if ($v["extra"] != "") $ret .= "<span class=\"uno\">".$v["extra"]."</span>"; + $ret .= "</a>"; + } + $ret .= "</div><div style=\"clear: both;\"></div>"; + return $ret; + } + + public function display(){ + echo $this->render(); + } +} +?> \ No newline at end of file Added: XoopsModules/txmeteo/release/txmeteo 1.0/class/object.php =================================================================== --- XoopsModules/txmeteo/release/txmeteo 1.0/class/object.php (rev 0) +++ XoopsModules/txmeteo/release/txmeteo 1.0/class/object.php 2012-02-07 15:08:09 UTC (rev 8895) @@ -0,0 +1,412 @@ +<?php +/** + * **************************************************************************** + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * + * Cette licence, contient des limitations!!! + * + * 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. + * + * @license TDM GPL license + * @author TDM TEAM DEV MODULE + * + * **************************************************************************** + */ + +class XoopsPersistableObjectHandler extends XoopsObjectHandler{ + + /** + * Information about the class, the handler is managing + * + * @var string + */ + var $table; + var $keyName; + var $className; + var $identifierName; + + + /** + * Constructor - called from child classes + * @param object $db {@link XoopsDatabase} object + * @param string $tablename Name of database table + * @param string $classname Name of Class, this handler is managing + * @param string $keyname Name of the property, holding the key + * + * @return void + */ + function XoopsPersistableObjectHandler(&$db, $tablename, $classname, $keyname, $idenfierName = false) { + $this->XoopsObjectHandler($db); + $this->table = $db->prefix($tablename); + $this->keyName = $keyname; + $this->className = $classname; + if ($idenfierName != false) { + $this->identifierName = $idenfierName; + } + } + + /** + * create a new user + * + * @param bool $isNew Flag the new objects as "new"? + * + * @return object + */ + function &create($isNew = true) { + $obj =& new $this->className(); + if ($isNew === true) { + $obj->setNew(); + } + return $obj; + } + + /** + * retrieve an object + * + * @param mixed $id ID of the object - or array of ids for joint keys. Joint keys MUST be given in the same order as in the constructor + * @param bool $as_object whether to return an object or an array + * @return mixed reference to the object, FALSE if failed + */ + function &get($id, $as_object=true) { + if (is_array($this->keyName)) { + $criteria = new CriteriaCompo(); + for ($i = 0; $i < count($this->keyName); $i++) { + $criteria->add(new Criteria($this->keyName[$i], intval($id[$i]))); + } + } else { + $criteria = new Criteria($this->keyName, intval($id)); + } + $criteria->setLimit(1); + $obj_array = $this->getObjects($criteria, false, $as_object); + if (count($obj_array) != 1) { + $obj = $this->create(); + return $obj; + } + return $obj_array[0]; + } + + /** + * retrieve objects from the database + * + * @param object $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the ID as key for the array? + * @param bool $as_object return an array of objects? + * + * @return array + */ + function getObjects($criteria=null, $id_as_key=false, $as_object=true){ + $ret = array(); + $limit = $start = 0; + $sql = 'SELECT * FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->getSort() != '') { + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + return $this->convertResultSet($result, $id_as_key, $as_object); + } + + /** + * Convert a database resultset to a returnable array + * + * @param object $result database resultset + * @param bool $id_as_key - should NOT be used with joint keys + * @param bool $as_object + * + * @return array + */ + function convertResultSet($result, $id_as_key = false, $as_object = true) { + $ret = array(); + while ($myrow = $this->db->fetchArray($result)) { + $obj =& $this->create(false); + $obj->assignVars($myrow); + if (!$id_as_key) { + if ($as_object) { + $ret[] =& $obj; + } else { + $row = array(); + $vars = $obj->getVars(); + foreach (array_keys($vars) as $i) { + $row[$i] = $obj->getVar($i); + } + $ret[] = $row; + } + } else { + if ($as_object) { + $ret[$myrow[$this->keyName]] =& $obj; + } else { + $row = array(); + $vars = $obj->getVars(); + foreach (array_keys($vars) as $i) { + $row[$i] = $obj->getVar($i); + } + $ret[$myrow[$this->keyName]] = $row; + } + } + unset($obj); + } + return $ret; + } + + /** + * Retrieve a list of objects as arrays - DON'T USE WITH JOINT KEYS + * + * @param object $criteria {@link CriteriaElement} conditions to be met + * @param int $limit Max number of objects to fetch + * @param int $start Which record to start at + * + * @return array + */ + function getList($criteria = null, $limit = 0, $start = 0) { + $ret = array(); + if ($criteria == null) { + $criteria = new CriteriaCompo(); + } + + if ($criteria->getSort() == '') { + $criteria->setSort($this->identifierName); + } + + $sql = 'SELECT '.$this->keyName; + if(!empty($this->identifierName)){ + $sql .= ', '.$this->identifierName; + } + $sql .= ' FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->getSort() != '') { + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + $myts =& MyTextSanitizer::getInstance(); + while ($myrow = $this->db->fetchArray($result)) { + //identifiers should be textboxes, so sanitize them like that + $ret[$myrow[$this->keyName]] = empty($this->identifierName)?1:$myts->htmlSpecialChars($myrow[$this->identifierName]); + } + return $ret; + } + + /** + * count objects matching a condition + * + * @param object $criteria {@link CriteriaElement} to match + * @return int count of objects + */ + function getCount($criteria=null){ + $field = ""; + $groupby = false; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + if ($criteria->groupby != "") { + $groupby = true; + $field = $criteria->groupby.", "; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used + } + } + $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->groupby != "") { + $sql .= $criteria->getGroupby(); + } + } + $result = $this->db->query($sql); + if (!$result) { + return 0; + } + if ($groupby == false) { + list($count) = $this->db->fetchRow($result); + return $count; + } else { + $ret = array(); + while (list($id, $count) = $this->db->fetchRow($result)) { + $ret[$id] = $count; + } + return $ret; + } + } + + /** + * delete an object from the database + * + * @param object $obj reference to the object to delete + * @param bool $force + * @return bool FALSE if failed. + */ + function delete(&$obj, $force = false){ + if (is_array($this->keyName)) { + $clause = array(); + for ($i = 0; $i < count($this->keyName); $i++) { + $clause[] = $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]); + } + $whereclause = implode(" AND ", $clause); + } else { + $whereclause = $this->keyName." = ".$obj->getVar($this->keyName); + } + $sql = "DELETE FROM ".$this->table." WHERE ".$whereclause; + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } + + /** + * insert a new object in the database + * + * @param object $obj reference to the object + * @param bool $force whether to force the query execution despite security settings + * @param bool $checkObject check if the object is dirty and clean the attributes + * @return bool FALSE if failed, TRUE if already present and unchanged or successful + */ + + function insert(&$obj, $force=false, $checkObject=true){ + if ($checkObject != false) { + if (!is_object($obj)) { + var_dump($obj); + return false; + } + /** + * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5 + */ + if (!is_a($obj, $this->className)) { + $obj->setErrors(get_class($obj)." Differs from ".$this->className); + return false; + } + if (!$obj->isDirty()) { + $obj->setErrors("Not dirty"); //will usually not be outputted as errors are not displayed when the method returns true, but it can be helpful when troubleshooting code - Mith + return true; + } + } + if (!$obj->cleanVars()) { + return false; + } + + foreach ($obj->cleanVars as $k => $v) { + if ($obj->vars[$k]['data_type'] == XOBJ_DTYPE_INT) { + $cleanvars[$k] = intval($v); + } elseif ( is_array( $v ) ) { + $cleanvars[ $k ] = $this->db->quoteString( implode( ',', $v ) ); + } else { + $cleanvars[$k] = $this->db->quoteString($v); + } + } + if ($obj->isNew()) { + if (!is_array($this->keyName)) { + if ($cleanvars[$this->keyName] < 1) { + $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq'); + } + } + $sql = "INSERT INTO ".$this->table." (".implode(',', array_keys($cleanvars)).") VALUES (".implode(',', array_values($cleanvars)) .")"; + } else { + $sql = "UPDATE ".$this->table." SET"; + foreach ($cleanvars as $key => $value) { + if ((!is_array($this->keyName) && $key == $this->keyName) || (is_array($this->keyName) && in_array($key, $this->keyName))) { + continue; + } + if (isset($notfirst) ) { + $sql .= ","; + } + $sql .= " ".$key." = ".$value; + $notfirst = true; + } + if (is_array($this->keyName)) { + $whereclause = ""; + for ($i = 0; $i < count($this->keyName); $i++) { + if ($i > 0) { + $whereclause .= " AND "; + } + $whereclause .= $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]); + } + } else { + $whereclause = $this->keyName." = ".$obj->getVar($this->keyName); + } + $sql .= " WHERE ".$whereclause; + } + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + if ($obj->isNew() && !is_array($this->keyName)) { + $obj->assignVar($this->keyName, $this->db->getInsertId()); + } + return true; + } + + /** + * Change a value for objects with a certain criteria + * + * @param string $fieldname Name of the field + * @param string $fieldvalue Value to write + * @param object $criteria {@link CriteriaElement} + * @return bool + */ + function updateAll($fieldname, $fieldvalue, $criteria = null, $force = false){ + $set_clause = $fieldname . ' = '; + if ( is_numeric( $fieldvalue ) ) { + $set_clause .= $fieldvalue; + } elseif ( is_array( $fieldvalue ) ) { + $set_clause .= $this->db->quoteString( implode( ',', $fieldvalue ) ); + } else { + $set_clause .= $this->db->quoteString( $fieldvalue ); + } + $sql = 'UPDATE '.$this->table.' SET '.$set_clause; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + } + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } + + /** + * delete all objects meeting the conditions + * + * @param object $criteria {@link CriteriaElement} with conditions to meet + * @return bool + */ + function deleteAll($criteria = null){ + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql = 'DELETE FROM '.$this->table; + $sql .= ' '.$criteria->renderWhere(); + if (!$this->db->queryF($sql)) { + return false; + } + $rows = $this->db->getAffectedRows(); + return $rows > 0 ? $rows : true; + } + return false; + } +} +?> \ No newline at end of file Added: XoopsModules/txmeteo/release/txmeteo 1.0/class/topic.php =================================================================== --- XoopsModules/txmeteo/release/txmeteo 1.0/class/topic.php (rev 0) +++ XoopsModules/txmeteo/release/txmeteo 1.0/class/topic.php 2012-02-07 15:08:09 UTC (rev 8895) @@ -0,0 +1,128 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * txmeteo - 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 txmeteo + * @author timgno (http://txmod.webuda.com) + * + * Version : 1.00: + * **************************************************************************** + */ + + + if (!defined("XOOPS_ROOT_PATH")) { + die("XOOPS root path not defined"); + } + + if (!class_exists("XoopsPersistableObjectHandler")) { + include_once XOOPS_ROOT_PATH."/class/xoopsobject.php"; + } + + class txmeteo_topic extends XoopsObject + { + //Constructor + function __construct() + { + $this->XoopsObject(); + $this->initVar("topic_id",XOBJ_DTYPE_INT,null,false,11); + $this->initVar("topic_pid",XOBJ_DTYPE_INT,null,false,5); + $this->initVar("topic_title",XOBJ_DTYPE_TXTBOX,null,false); + $this->initVar("topic_desc",XOBJ_DTYPE_TXTAREA, null, false); + $this->initVar("topic_img",XOBJ_DTYPE_TXTBOX,null,false); + $this->initVar("topic_weight",XOBJ_DTYPE_INT,null,false,5); + $this->initVar("topic_color",XOBJ_DTYPE_TXTBOX,null,false); + $this->initVar("topic_submitter",XOBJ_DTYPE_INT,null,false,10); + $this->initVar("topic_date_created",XOBJ_DTYPE_INT,null,false,10); + $this->initVar("topic_online",XOBJ_DTYPE_INT,null,... [truncated message content] |
From: <txm...@us...> - 2012-02-07 16:20:33
|
Revision: 8900 http://xoops.svn.sourceforge.net/xoops/?rev=8900&view=rev Author: txmodxoops Date: 2012-02-07 16:20:18 +0000 (Tue, 07 Feb 2012) Log Message: ----------- added codelink v1.36 Added Paths: ----------- XoopsModules/codelink/ XoopsModules/codelink/branches/ XoopsModules/codelink/release/ XoopsModules/codelink/release/1.36/ XoopsModules/codelink/release/1.36/codelink/ XoopsModules/codelink/release/1.36/codelink/docs/ XoopsModules/codelink/release/1.36/codelink/htdocs/ XoopsModules/codelink/release/1.36/codelink/htdocs/Frameworks/ XoopsModules/codelink/release/1.36/codelink/htdocs/Frameworks/moduleclasses/ XoopsModules/codelink/release/1.36/codelink/htdocs/Frameworks/moduleclasses/icons/ XoopsModules/codelink/release/1.36/codelink/htdocs/Frameworks/moduleclasses/icons/32/ XoopsModules/codelink/release/1.36/codelink/htdocs/Frameworks/moduleclasses/icons/32/banner.png XoopsModules/codelink/release/1.36/codelink/htdocs/Frameworks/moduleclasses/icons/32/button.png XoopsModules/codelink/release/1.36/codelink/htdocs/Frameworks/moduleclasses/icons/32/link.png XoopsModules/codelink/release/1.36/codelink/htdocs/modules/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/about.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/admin_footer.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/admin_header.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/banner.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/button.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/index.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/link.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/menu.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/banner.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/blocks/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/blocks/blocks_banner.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/blocks/blocks_button.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/blocks/blocks_link.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/blocks/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/button.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/class/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/class/banner.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/class/button.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/class/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/class/link.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/css/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/css/admin.css XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/css/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/css/style.css XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/docs/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/docs/.htaccess XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/docs/changelog.txt XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/docs/credits.txt XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/docs/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/docs/install.txt XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/docs/lang_diff.txt XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/docs/licence.txt XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/docs/readme.txt XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/header.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/codelink_slogo.png XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/deco/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/deco/about.png XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/deco/arrow.gif XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/deco/contact.png XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/deco/delete.gif XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/deco/edit.gif XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/deco/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/deco/index.png XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/deco/off.gif XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/deco/on.gif XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/deco/permissions.png XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/deco/pref.png XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/deco/update.png XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/header_logo.png XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/menu/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/menu/bg.png XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/menu/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/menu/left_both.png XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/menu/right_both.png XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/images/txmod_logo.png XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/imgheader.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/include/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/include/codelink.css XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/include/functions.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/include/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/include/install.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/include/jqcl.init.js XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/include/variables.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/index.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/english/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/english/admin.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/english/blocks.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/english/help/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/english/help/help.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/english/help/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/english/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/english/main.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/english/modinfo.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/french/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/french/admin.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/french/blocks.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/french/help/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/french/help/help.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/french/help/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/french/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/french/main.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/french/modinfo.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/italian/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/italian/admin.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/italian/blocks.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/italian/help/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/italian/help/help.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/italian/help/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/italian/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/italian/main.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/language/italian/modinfo.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/link.php XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/sql/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/sql/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/sql/mysql.sql XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/blocks/ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/blocks/codelink_banner_block_day.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/blocks/codelink_banner_block_random.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/blocks/codelink_banner_block_recent.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/blocks/codelink_button_block_day.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/blocks/codelink_button_block_random.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/blocks/codelink_button_block_recent.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/blocks/codelink_link_block_day.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/blocks/codelink_link_block_random.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/blocks/codelink_link_block_recent.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/blocks/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/codelink_banner.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/codelink_button.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/codelink_footer.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/codelink_header.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/codelink_index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/codelink_link.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/templates/index.html XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/xoops_version.php XoopsModules/codelink/trunk/ Added: XoopsModules/codelink/release/1.36/codelink/htdocs/Frameworks/moduleclasses/icons/32/banner.png =================================================================== (Binary files differ) Property changes on: XoopsModules/codelink/release/1.36/codelink/htdocs/Frameworks/moduleclasses/icons/32/banner.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/codelink/release/1.36/codelink/htdocs/Frameworks/moduleclasses/icons/32/button.png =================================================================== (Binary files differ) Property changes on: XoopsModules/codelink/release/1.36/codelink/htdocs/Frameworks/moduleclasses/icons/32/button.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/codelink/release/1.36/codelink/htdocs/Frameworks/moduleclasses/icons/32/link.png =================================================================== (Binary files differ) Property changes on: XoopsModules/codelink/release/1.36/codelink/htdocs/Frameworks/moduleclasses/icons/32/link.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/about.php =================================================================== --- XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/about.php (rev 0) +++ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/about.php 2012-02-07 16:20:18 UTC (rev 8900) @@ -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) + * **************************************************************************** + * CODELINK - 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 codelink + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.36 Mon 2012/01/09 14:23:56 : 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/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/admin_footer.php =================================================================== --- XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/admin_footer.php (rev 0) +++ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/admin_footer.php 2012-02-07 16:20:18 UTC (rev 8900) @@ -0,0 +1,28 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * codelink - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://www.txmodxoops.org) + * + * 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://www.txmodxoops.org) + * @license GPL + * @package codelink + * @author timgno (txm...@gm...) + * + * Version : 1.03: + * **************************************************************************** + */ +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_CODELINK_MAINTAINEDBY." <a class='tooltip' rel='external' href='http://www.xoops.org/' title='Visit XOOPS Community'>XOOPS Community</a></div>"; +xoops_cp_footer(); +?> \ No newline at end of file Added: XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/admin_header.php =================================================================== --- XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/admin_header.php (rev 0) +++ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/admin_header.php 2012-02-07 16:20:18 UTC (rev 8900) @@ -0,0 +1,85 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * codelink - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://www.txmodxoops.org) + * + * 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://www.txmodxoops.org) + * @license GPL + * @package codelink + * @author timgno (txm...@gm...) + * + * Version : 1.02: + * **************************************************************************** + */ +include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; +include_once XOOPS_ROOT_PATH . '/include/cp_functions.php'; +include_once '../include/functions.php'; +include_once XOOPS_ROOT_PATH."/class/pagenav.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_CODELINK_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'); +include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar('dirname')."/class/banner.php"; +include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar('dirname')."/class/button.php"; +include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar('dirname')."/class/link.php"; +$linkHandler=& xoops_getModuleHandler('codelink_link', 'codelink' ); +$buttonHandler=& xoops_getModuleHandler('codelink_button', 'codelink' ); +$bannerHandler=& xoops_getModuleHandler('codelink_banner', 'codelink' ); + +$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")); +?> \ No newline at end of file Added: XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/banner.php =================================================================== --- XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/banner.php (rev 0) +++ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/banner.php 2012-02-07 16:20:18 UTC (rev 8900) @@ -0,0 +1,236 @@ +<?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) + * **************************************************************************** + * CODELINK - 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 codelink + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.36 Mon 2012/01/09 14:23:56 : Timgno Exp $ + * **************************************************************************** + */ + +include_once("admin_header.php"); + +xoops_cp_header(); + +if (isset($_REQUEST["op"])) { + $op = $_REQUEST["op"]; +} else { + @$op = "default"; +} +$banner_admin = new ModuleAdmin(); +switch ($op) +{ + case "save_banner": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("banner.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["banner_id"])) { + $obj =& $bannerHandler->get($_REQUEST["banner_id"]); + } else { + $obj =& $bannerHandler->create(); + } + //Form banner_title + $obj->setVar("banner_title", $_REQUEST["banner_title"]); + //Form banner_img + include_once XOOPS_ROOT_PATH."/class/uploader.php"; + $uploaddir_banner_img = XOOPS_ROOT_PATH."/uploads/codelink/banner/banner_img/"; + $uploader_banner_img = new XoopsMediaUploader($uploaddir_banner_img, $GLOBALS['xoopsModuleConfig']["codelink_img_mimetypes"], $GLOBALS['xoopsModuleConfig']["codelink_img_size"], null, null); + + if ($uploader_banner_img->fetchMedia("banner_img")) { + $uploader_banner_img->setPrefix("banner_img_") ; + $uploader_banner_img->fetchMedia("banner_img"); + if (!$uploader_banner_img->upload()) { + $errors = $uploader_banner_img->getErrors(); + redirect_header("javascript:history.go(-1)",3, $errors); + } else { + $obj->setVar("banner_img", $uploader_banner_img->getSavedFileName()); + } + } else { + $obj->setVar("banner_img", $_REQUEST["banner_img"]); + } + //Form banner_weight + $obj->setVar("banner_weight", $_REQUEST["banner_weight"]); + //Form banner_submitter + $obj->setVar("banner_submitter", $_REQUEST["banner_submitter"]); + //Form + $obj->setVar("banner_created", strtotime($_REQUEST["banner_created"])); + //Form banner_online + $verif_banner_online = ($_REQUEST["banner_online"] == 1) ? "1" : "0"; + $obj->setVar("banner_online", $verif_banner_online); + + + if ($bannerHandler->insert($obj)) { + redirect_header("banner.php?op=show_list_banner", 2, _AM_CODELINK_FORMOK); + } + //include_once("../include/forms.php"); + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + break; + + case "edit_banner": + $obj = $bannerHandler->get($_REQUEST["banner_id"]); + $form = $obj->getForm(); + break; + + case "delete_banner": + $obj =& $bannerHandler->get($_REQUEST["banner_id"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("banner.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($bannerHandler->delete($obj)) { + redirect_header("banner.php", 3, _AM_CODELINK_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array("ok" => 1, "banner_id" => $_REQUEST["banner_id"], "op" => "delete_banner"), $_SERVER["REQUEST_URI"], sprintf(_AM_CODELINK_FORMSUREDEL, $obj->getVar("banner"))); + } + break; + + case "update_online_banner": + + if (isset($_REQUEST["banner_id"])) { + $obj =& $bannerHandler->get($_REQUEST["banner_id"]); + } + $obj->setVar("banner_online", $_REQUEST["banner_online"]); + + if ($bannerHandler->insert($obj)) { + redirect_header("banner.php", 3, _AM_CODELINK_FORMOK); + } + echo $obj->getHtmlErrors(); + + break; + + case "add_banner": + echo $banner_admin->addNavigation('banner.php'); + $banner_admin->addItemButton(_AM_CODELINK_BANNERLIST, 'banner.php?op=default', 'list'); + echo $banner_admin->renderButton(); + + // Affichage du formulaire + $obj =& $bannerHandler->create(); + $form = $obj->getForm(); + break; + + case "default": + default: + echo $banner_admin->addNavigation('banner.php'); + $banner_admin->addItemButton(_AM_CODELINK_BANNERNEW, 'banner.php?op=add_banner', 'add'); + echo $banner_admin->renderButton(); + + $criteria = new CriteriaCompo(); + $criteria->setSort("banner_id"); + $criteria->setOrder("ASC"); + $numrows = $bannerHandler->getCount(); + if (isset($_REQUEST['limit'])) { + $criteria->setLimit($_REQUEST['limit']); + $limit = $_REQUEST['limit']; + } else { + $criteria->setLimit($GLOBALS['xoopsModuleConfig']['admin_perpage']); + $limit = $GLOBALS['xoopsModuleConfig']['admin_perpage']; + } + if (isset($_REQUEST['start'])) { + $criteria->setStart($_REQUEST['start']); + $start = $_REQUEST['start']; + } else { + $criteria->setStart(0); + $start = 0; + } + $document_tri = 1; + $document_order = 1; + if (isset($_REQUEST['document_order'])) { + if ($_REQUEST['document_order']==1){ + $criteria->setOrder('ASC'); + $document_order=1; + } + if ($_REQUEST['document_order']==2){ + $criteria->setOrder('DESC'); + $document_order=2; + } + } else { + $criteria->setOrder('DESC'); + } + $banner_arr = $bannerHandler->getall($criteria); + if ( $numrows > $limit ) { + $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit=' . $limit . '&document_tri=' . $document_tri. '&document_order=' . $document_order); + $pagenav = $pagenav->renderNav(4); + } else { + $pagenav = ''; + } + //Affichage du tableau + if ($numrows>0) + { + echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> + <tr> + <th align=\"center\">"._AM_CODELINK_BANNER_NAME."</th> + <th align=\"center\">"._AM_CODELINK_BANNER_IMG."</th> + <th align=\"center\">"._AM_CODELINK_BANNER_CODE."</th> + <th align=\"center\">"._AM_CODELINK_BANNER_SUBMITTER."</th> + <th align=\"center\">"._AM_CODELINK_BANNER_CREATED."</th> + <th align=\"center\">"._AM_CODELINK_BANNER_WEIGHT."</th> + <th align=\"center\">"._AM_CODELINK_BANNER_ONLINE."</th> + <th align=\"center\" width=\"10%\">"._AM_CODELINK_FORMACTION."</th> + </tr>"; + $class = "odd"; + $prefix = "<img src=\"".XOOPS_URL."/modules/codelink/images/deco/arrow.gif\">"; + foreach (array_keys($banner_arr) as $i) + { + $banner_id = $banner_arr[$i]->getVar("banner_id"); + $banner_img = $banner_arr[$i]->getVar("banner_img"); + $banner_title = $banner_arr[$i]->getVar("banner_title"); + $banner_weight = $banner_arr[$i]->getVar("banner_weight"); + echo "<tr class=\"".$class."\">"; + echo "<td align=\"left\">".$prefix." ".$banner_arr[$i]->getVar("banner_title")."</td>"; + echo "<td align=\"center\"><img src=\"".XOOPS_URL."/uploads/codelink/banner/banner_img/".$banner_arr[$i]->getVar("banner_img")."\" height=\"30px\" title=\"".$banner_arr[$i]->getVar("banner_title")."\" alt=\"".$banner_arr[$i]->getVar("banner_title")."\"></td>"; + echo "<td align=\"center\"><textarea><a href=\"".XOOPS_URL."\" title=\"".$xoopsConfig['sitename']."\" target=\"_blank\"><img src=\"".XOOPS_URL."/uploads/".$xoopsModule->dirname()."/banner/banner_img/".$banner_arr[$i]->getVar("banner_img")."\" alt=\"".$xoopsConfig['sitename']."\" title=\"".$xoopsConfig['sitename']."\" /></a></textarea></td>"; + echo "<td align=\"center\">".XoopsUser::getUnameFromId($banner_arr[$i]->getVar("banner_submitter"),"S")."</td>"; + echo "<td align=\"center\">".formatTimeStamp($banner_arr[$i]->getVar("banner_created"),"S")."</td>"; + echo "<td align=\"center\">".$banner_arr[$i]->getVar("banner_weight")."</td>"; + + $online = $banner_arr[$i]->getVar("banner_online"); + + if( $online == 1 ) { + echo "<td align=\"center\"><a href=\"./banner.php?op=update_online_banner&banner_id=".$banner_arr[$i]->getVar("banner_id")."&banner_online=0\"><img src=\"./../images/deco/on.gif\" border=\"0\" alt=\""._AM_CODELINK_ON."\" title=\""._AM_CODELINK_ON."\"></a></td>"; + } else { + echo "<td align=\"center\"><a href=\"./banner.php?op=update_online_banner&banner_id=".$banner_arr[$i]->getVar("banner_id")."&banner_online=1\"><img src=\"./../images/deco/off.gif\" border=\"0\" alt=\""._AM_CODELINK_OFF."\" title=\""._AM_CODELINK_OFF."\"></a></td>"; + } + echo "<td align=\"center\" width=\"10%\"> + <a href=\"banner.php?op=edit_banner&banner_id=".$banner_arr[$i]->getVar("banner_id")."\"><img src=\"../images/deco/edit.gif\" alt=\""._AM_CODELINK_EDIT."\" title=\""._AM_CODELINK_EDIT."\"></a> + <a href=\"banner.php?op=delete_banner&banner_id=".$banner_arr[$i]->getVar("banner_id")."\"><img src=\"../images/deco/delete.gif\" alt=\""._AM_CODELINK_DELETE."\" title=\""._AM_CODELINK_DELETE."\"></a> + </td> + </tr>"; + $class = ($class == "even") ? "odd" : "even"; + } + echo "</table><br />"; + echo "<div align='right'>".$pagenav."</div><br />"; + } +} +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/button.php =================================================================== --- XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/button.php (rev 0) +++ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/button.php 2012-02-07 16:20:18 UTC (rev 8900) @@ -0,0 +1,234 @@ +<?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) + * **************************************************************************** + * CODELINK - 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 codelink + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.36 Mon 2012/01/09 14:23:56 : Timgno Exp $ + * **************************************************************************** + */ + +include_once("admin_header.php"); + +xoops_cp_header(); + +if (isset($_REQUEST["op"])) { + $op = $_REQUEST["op"]; +} else { + @$op = "default"; +} +$button_admin = new ModuleAdmin(); +switch ($op) +{ + case "save_button": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("button.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["button_id"])) { + $obj =& $buttonHandler->get($_REQUEST["button_id"]); + } else { + $obj =& $buttonHandler->create(); + } + //Form button_title + $obj->setVar("button_title", $_REQUEST["button_title"]); + //Form button_img + include_once XOOPS_ROOT_PATH."/class/uploader.php"; + $uploaddir_button_img = XOOPS_ROOT_PATH."/uploads/codelink/button/button_img/"; + $uploader_button_img = new XoopsMediaUploader($uploaddir_button_img, $GLOBALS['xoopsModuleConfig']["codelink_img_mimetypes"], $GLOBALS['xoopsModuleConfig']["codelink_img_size"], null, null); + + if ($uploader_button_img->fetchMedia("button_img")) { + $uploader_button_img->setPrefix("button_img_") ; + $uploader_button_img->fetchMedia("button_img"); + if (!$uploader_button_img->upload()) { + $errors = $uploader_button_img->getErrors(); + redirect_header("javascript:history.go(-1)",3, $errors); + } else { + $obj->setVar("button_img", $uploader_button_img->getSavedFileName()); + } + } else { + $obj->setVar("button_img", $_REQUEST["button_img"]); + } + //Form button_weight + $obj->setVar("button_weight", $_REQUEST["button_weight"]); + //Form button_submitter + $obj->setVar("button_submitter", $_REQUEST["button_submitter"]); + //Form button_created + $obj->setVar("button_created", strtotime($_REQUEST["button_created"])); + //Form button_online + $verif_button_online = ($_REQUEST["button_online"] == 1) ? "1" : "0"; + $obj->setVar("button_online", $verif_button_online); + + if ($buttonHandler->insert($obj)) { + redirect_header("button.php?op=show_list_button", 2, _AM_CODELINK_FORMOK); + } + //include_once("../include/forms.php"); + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + break; + + case "edit_button": + $obj = $buttonHandler->get($_REQUEST["button_id"]); + $form = $obj->getForm(); + break; + + case "delete_button": + $obj =& $buttonHandler->get($_REQUEST["button_id"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("button.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($buttonHandler->delete($obj)) { + redirect_header("button.php", 3, _AM_CODELINK_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array("ok" => 1, "button_id" => $_REQUEST["button_id"], "op" => "delete_button"), $_SERVER["REQUEST_URI"], sprintf(_AM_CODELINK_FORMSUREDEL, $obj->getVar("button"))); + } + break; + + case "update_online_button": + + if (isset($_REQUEST["button_id"])) { + $obj =& $buttonHandler->get($_REQUEST["button_id"]); + } + $obj->setVar("button_online", $_REQUEST["button_online"]); + + if ($buttonHandler->insert($obj)) { + redirect_header("button.php", 3, _AM_CODELINK_FORMOK); + } + echo $obj->getHtmlErrors(); + + break; + + case "add_button": + echo $button_admin->addNavigation('button.php'); + $button_admin->addItemButton(_AM_CODELINK_BUTTONLIST, 'button.php?op=default', 'list'); + echo $button_admin->renderButton(); + + // Affichage du formulaire + $obj =& $buttonHandler->create(); + $form = $obj->getForm(); + break; + + case "default": + default: + echo $button_admin->addNavigation('button.php'); + $button_admin->addItemButton(_AM_CODELINK_BUTTONNEW, 'button.php?op=add_button', 'add'); + echo $button_admin->renderButton(); + + $criteria = new CriteriaCompo(); + $criteria->setSort("button_id"); + $criteria->setOrder("ASC"); + $numrows = $buttonHandler->getCount(); + if (isset($_REQUEST['limit'])) { + $criteria->setLimit($_REQUEST['limit']); + $limit = $_REQUEST['limit']; + } else { + $criteria->setLimit($GLOBALS['xoopsModuleConfig']['admin_perpage']); + $limit = $GLOBALS['xoopsModuleConfig']['admin_perpage']; + } + if (isset($_REQUEST['start'])) { + $criteria->setStart($_REQUEST['start']); + $start = $_REQUEST['start']; + } else { + $criteria->setStart(0); + $start = 0; + } + $document_tri = 1; + $document_order = 1; + if (isset($_REQUEST['document_order'])) { + if ($_REQUEST['document_order']==1){ + $criteria->setOrder('ASC'); + $document_order=1; + } + if ($_REQUEST['document_order']==2){ + $criteria->setOrder('DESC'); + $document_order=2; + } + } else { + $criteria->setOrder('DESC'); + } + $button_arr = $buttonHandler->getall($criteria); + if ( $numrows > $limit ) { + $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit=' . $limit . '&document_tri=' . $document_tri. '&document_order=' . $document_order); + $pagenav = $pagenav->renderNav(4); + } else { + $pagenav = ''; + } + + //Affichage du tableau + if ($numrows>0) + { + echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> + <tr> + <th align=\"center\">"._AM_CODELINK_BUTTON_NAME."</th> + <th align=\"center\">"._AM_CODELINK_BUTTON_IMG."</th> + <th align=\"center\">"._AM_CODELINK_BUTTON_CODE."</th> + <th align=\"center\">"._AM_CODELINK_BUTTON_SUBMITTER."</th> + <th align=\"center\">"._AM_CODELINK_BUTTON_CREATED."</th> + <th align=\"center\">"._AM_CODELINK_BUTTON_WEIGHT."</th> + <th align=\"center\">"._AM_CODELINK_BUTTON_ONLINE."</th> + <th align=\"center\" width=\"10%\">"._AM_CODELINK_FORMACTION."</th> + </tr>"; + $class = "odd"; + $prefix = "<img src=\"".XOOPS_URL."/modules/codelink/images/deco/arrow.gif\">"; + foreach (array_keys($button_arr) as $i) + { + $button_id = $button_arr[$i]->getVar("button_id"); + $button_img = $button_arr[$i]->getVar("button_img"); + $button_title = $button_arr[$i]->getVar("button_title"); + $button_weight = $button_arr[$i]->getVar("button_weight"); + echo "<tr class=\"".$class."\">"; + echo "<td align=\"left\">".$prefix." ".$button_arr[$i]->getVar("button_title")."</td>"; + echo "<td align=\"center\"><img src=\"".XOOPS_URL."/uploads/codelink/button/button_img/".$button_arr[$i]->getVar("button_img")."\" height=\"30px\" title=\"".$button_arr[$i]->getVar("button_title")."\" alt=\"".$button_arr[$i]->getVar("button_title")."\"></td>"; + echo "<td align=\"center\"><textarea><a href=\"".XOOPS_URL."\" title=\"".$xoopsConfig['sitename']."\" target=\"_blank\"><img src=\"".XOOPS_URL."/uploads/codelink/button/button_img/".$button_arr[$i]->getVar("button_img")."\" alt=\"".$xoopsConfig['sitename']."\" title=\"".$xoopsConfig['sitename']."\" /></a></textarea></td>"; + echo "<td align=\"center\">".XoopsUser::getUnameFromId($button_arr[$i]->getVar("button_submitter"),"S")."</td>"; + echo "<td align=\"center\">".formatTimeStamp($button_arr[$i]->getVar("button_created"),"S")."</td>"; + echo "<td align=\"center\">".$button_arr[$i]->getVar("button_weight")."</td>"; + $online = $button_arr[$i]->getVar("button_online"); + if( $online == 1 ) { + echo "<td align=\"center\"><a href=\"./button.php?op=update_online_button&button_id=".$button_arr[$i]->getVar("button_id")."&button_online=0\"><img src=\"./../images/deco/on.gif\" border=\"0\" alt=\""._AM_CODELINK_ON."\" title=\""._AM_CODELINK_ON."\"></a></td>"; + } else { + echo "<td align=\"center\"><a href=\"./button.php?op=update_online_button&button_id=".$button_arr[$i]->getVar("button_id")."&button_online=1\"><img src=\"./../images/deco/off.gif\" border=\"0\" alt=\""._AM_CODELINK_OFF."\" title=\""._AM_CODELINK_OFF."\"></a></td>"; + } + echo "<td align=\"center\" width=\"10%\"> + <a href=\"button.php?op=edit_button&button_id=".$button_arr[$i]->getVar("button_id")."\"><img src=\"../images/deco/edit.gif\" alt=\""._AM_CODELINK_EDIT."\" title=\""._AM_CODELINK_EDIT."\"></a> + <a href=\"button.php?op=delete_button&button_id=".$button_arr[$i]->getVar("button_id")."\"><img src=\"../images/deco/delete.gif\" alt=\""._AM_CODELINK_DELETE."\" title=\""._AM_CODELINK_DELETE."\"></a> + </td> + </tr>"; + $class = ($class == "even") ? "odd" : "even"; + } + echo "</table><br />"; + echo "<div align='right'>".$pagenav."</div><br />"; + } +} +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/index.html =================================================================== --- XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/index.html (rev 0) +++ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/index.html 2012-02-07 16:20:18 UTC (rev 8900) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/index.php =================================================================== --- XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/index.php (rev 0) +++ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/index.php 2012-02-07 16:20:18 UTC (rev 8900) @@ -0,0 +1,43 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * codelink - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://www.txmodxoops.org) + * + * 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://www.txmodxoops.org) + * @license GPL + * @package codelink + * @author timgno (txm...@gm...) + * + * Version : 1.03: + * **************************************************************************** + */ + +include "admin_header.php"; +xoops_cp_header(); + $indexAdmin = new ModuleAdmin(); + //account "total" + $count_link = $linkHandler->getCount(); + //account "total" + $count_button = $buttonHandler->getCount(); + //account "total" + $count_banner = $bannerHandler->getCount(); + $indexAdmin->addInfoBox(_AM_CODELINK_LINK); + $indexAdmin->addInfoBoxLine(_AM_CODELINK_LINK,_AM_CODELINK_THEREARE_LINK, $count_link) ; + $indexAdmin->addInfoBox(_AM_CODELINK_BUTTON); + $indexAdmin->addInfoBoxLine(_AM_CODELINK_BUTTON,_AM_CODELINK_THEREARE_BUTTON, $count_button) ; + $indexAdmin->addInfoBox(_AM_CODELINK_BANNER); + $indexAdmin->addInfoBoxLine(_AM_CODELINK_BANNER,_AM_CODELINK_THEREARE_BANNER, $count_banner) ; + echo $indexAdmin->addNavigation("index.php"); + echo $indexAdmin->renderIndex(); +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/link.php =================================================================== --- XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/link.php (rev 0) +++ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/link.php 2012-02-07 16:20:18 UTC (rev 8900) @@ -0,0 +1,213 @@ +<?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) + * **************************************************************************** + * CODELINK - 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 codelink + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.36 Mon 2012/01/09 14:23:56 : Timgno Exp $ + * **************************************************************************** + */ + +include_once("admin_header.php"); + +xoops_cp_header(); + +if (isset($_REQUEST["op"])) { + $op = $_REQUEST["op"]; +} else { + @$op = "show_list_link"; +} +$link_admin = new ModuleAdmin(); +switch ($op) +{ + case "save_link": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("link.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["link_id"])) { + $obj =& $linkHandler->get($_REQUEST["link_id"]); + } else { + $obj =& $linkHandler->create(); + } + + //Form link_title + $obj->setVar("link_title", $_REQUEST["link_title"]); + //Form link_submitter + $obj->setVar("link_weight", $_REQUEST["link_weight"]); + //Form link_submitter + $obj->setVar("link_submitter", $_REQUEST["link_submitter"]); + //Form link_created + $obj->setVar("link_created", strtotime($_REQUEST["link_created"])); + //Form link_online + $verif_link_online = ($_REQUEST["link_online"] == 1) ? "1" : "0"; + $obj->setVar("link_online", $verif_link_online); + + if ($linkHandler->insert($obj)) { + redirect_header("link.php?op=show_list_link", 2, _AM_CODELINK_FORMOK); + } + //include_once("../include/forms.php"); + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + break; + + case "edit_link": + $obj = $linkHandler->get($_REQUEST["link_id"]); + $form = $obj->getForm(); + break; + + case "delete_link": + $obj =& $linkHandler->get($_REQUEST["link_id"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("link.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($linkHandler->delete($obj)) { + redirect_header("link.php", 3, _AM_CODELINK_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array("ok" => 1, "link_id" => $_REQUEST["link_id"], "op" => "delete_link"), $_SERVER["REQUEST_URI"], sprintf(_AM_CODELINK_FORMSUREDEL, $obj->getVar("link"))); + } + break; + + case "update_online_link": + + if (isset($_REQUEST["link_id"])) { + $obj =& $linkHandler->get($_REQUEST["link_id"]); + } + $obj->setVar("link_online", $_REQUEST["link_online"]); + + if ($linkHandler->insert($obj)) { + redirect_header("link.php", 3, _AM_CODELINK_FORMOK); + } + echo $obj->getHtmlErrors(); + + break; + + case "add_link": + echo $link_admin->addNavigation('link.php'); + $link_admin->addItemButton(_AM_CODELINK_LINKLIST, 'link.php?op=default', 'list'); + echo $link_admin->renderButton(); + + // Affichage du formulaire + $obj =& $linkHandler->create(); + $form = $obj->getForm(); + break; + + case "default": + default: + echo $link_admin->addNavigation('link.php'); + $link_admin->addItemButton(_AM_CODELINK_LINKNEW, 'link.php?op=add_link', 'add'); + echo $link_admin->renderButton(); + + $criteria = new CriteriaCompo(); + $criteria->setSort("link_id"); + $criteria->setOrder("ASC"); + $numrows = $linkHandler->getCount(); + + if (isset($_REQUEST['limit'])) { + $criteria->setLimit($_REQUEST['limit']); + $limit = $_REQUEST['limit']; + } else { + $criteria->setLimit($GLOBALS['xoopsModuleConfig']['admin_perpage']); + $limit = $GLOBALS['xoopsModuleConfig']['admin_perpage']; + } + if (isset($_REQUEST['start'])) { + $criteria->setStart($_REQUEST['start']); + $start = $_REQUEST['start']; + } else { + $criteria->setStart(0); + $start = 0; + } + $document_tri = 1; + $document_order = 1; + if (isset($_REQUEST['document_order'])) { + if ($_REQUEST['document_order']==1){ + $criteria->setOrder('ASC'); + $document_order=1; + } + if ($_REQUEST['document_order']==2){ + $criteria->setOrder('DESC'); + $document_order=2; + } + } else { + $criteria->setOrder('DESC'); + } + $link_arr = $linkHandler->getall($criteria); + if ( $numrows > $limit ) { + $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit=' . $limit . '&document_tri=' . $document_tri. '&document_order=' . $document_order); + $pagenav = $pagenav->renderNav(4); + } else { + $pagenav = ''; + } + //Affichage du tableau + if ($numrows>0) + { + echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> + <tr> + <th align=\"center\">"._AM_CODELINK_LINK_NAME."</th> + <th align=\"center\">"._AM_CODELINK_LINK_CODE."</th> + <th align=\"center\">"._AM_CODELINK_LINK_SUBMITTER."</th> + <th align=\"center\">"._AM_CODELINK_LINK_CREATED."</th> + <th align=\"center\">"._AM_CODELINK_LINK_WEIGHT."</th> + <th align=\"center\">"._AM_CODELINK_LINK_ONLINE."</th> + <th align=\"center\" width=\"10%\">"._AM_CODELINK_FORMACTION."</th> + </tr>"; + + $class = "odd"; + + foreach (array_keys($link_arr) as $i) + { + echo "<tr class=\"".$class."\">"; + $class = ($class == "even") ? "odd" : "even"; + echo "<td align=\"center\">".$link_arr[$i]->getVar("link_title")."</td>"; + echo "<td align=\"center\"><textarea><a href=\"".XOOPS_URL."\" title=\"".$xoopsConfig['sitename']."\" target=\"_blank\">".$link_arr[$i]->getVar("link_title")."</a></textarea></td>"; + echo "<td align=\"center\">".XoopsUser::getUnameFromId($link_arr[$i]->getVar("link_submitter"),"S")."</td>"; + echo "<td align=\"center\">".formatTimeStamp($link_arr[$i]->getVar("link_created"),"S")."</td>"; + echo "<td align=\"center\">".$link_arr[$i]->getVar("link_weight")."</td>"; + $online = $link_arr[$i]->getVar("link_online"); + if( $online == 1 ) { + echo "<td align=\"center\"><a href=\"./link.php?op=update_online_link&link_id=".$link_arr[$i]->getVar("link_id")."&link_online=0\"><img src=\"./../images/deco/on.gif\" border=\"0\" alt=\""._AM_CODELINK_ON."\" title=\""._AM_CODELINK_ON."\"></a></td>"; + } else { + echo "<td align=\"center\"><a href=\"./link.php?op=update_online_link&link_id=".$link_arr[$i]->getVar("link_id")."&link_online=1\"><img src=\"./../images/deco/off.gif\" border=\"0\" alt=\""._AM_CODELINK_OFF."\" title=\""._AM_CODELINK_OFF."\"></a></td>"; + } + echo "<td align=\"center\" width=\"10%\"> + <a href=\"link.php?op=edit_link&link_id=".$link_arr[$i]->getVar("link_id")."\"><img src=\"../images/deco/edit.gif\" alt=\""._AM_CODELINK_EDIT."\" title=\""._AM_CODELINK_EDIT."\"></a> + <a href=\"link.php?op=delete_link&link_id=".$link_arr[$i]->getVar("link_id")."\"><img src=\"../images/deco/delete.gif\" alt=\""._AM_CODELINK_DELETE."\" title=\""._AM_CODELINK_DELETE."\"></a> + </td>"; + echo "</tr>"; + } + echo "</table><br />"; + echo "<div align='right'>".$pagenav."</div><br />"; + } +} +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/menu.php =================================================================== --- XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/menu.php (rev 0) +++ XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/admin/menu.php 2012-02-07 16:20:18 UTC (rev 8900) @@ -0,0 +1,74 @@ +<?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) + * **************************************************************************** + * CODELINK - 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 codelink + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.36 Mon 2012/01/09 14:23:56 : 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_CODELINK_ADMENU1; +$adminmenu[$i]["link"] = "admin/index.php"; +//$adminmenu[$i]["desc"] = _MI_CODELINK_ADMENU1_DESC; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/home.png"; +$i++; +$adminmenu[$i]["title"] = _MI_CODELINK_ADMENU2; +$adminmenu[$i]["link"] = "admin/link.php"; +//$adminmenu[$i]["desc"] = _MI_CODELINK_ADMENU2_DESC +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/link.png"; +$i++; +$adminmenu[$i]["title"] = _MI_CODELINK_ADMENU3; +$adminmenu[$i]["link"] = "admin/button.php"; +//$adminmenu[$i]["desc"] = _MI_CODELINK_ADMENU3_DESC +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/button.png"; +$i++; +$adminmenu[$i]["title"] = _MI_CODELINK_ADMENU4; +$adminmenu[$i]["link"] = "admin/banner.php"; +//$adminmenu[$i]["desc"] = _MI_CODELINK_ADMENU4_DESC +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/banner.png"; +$i++; +$adminmenu[$i]["title"] = _MI_CODELINK_ADMENU5; +$adminmenu[$i]["link"] = "admin/about.php"; +//$adminmenu[$i]["desc"] = _MI_CODELINK_ADMENU5_DESC; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/about.png"; +unset( $i ); +?> \ No newline at end of file Added: XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/banner.php =================================================================== --- XoopsModules/codelink/release/1.36/codelink/htdocs/modules/codelink/banner.php (rev 0) +++ Xoo... [truncated message content] |
From: <txm...@us...> - 2012-02-12 20:32:27
|
Revision: 8941 http://xoops.svn.sourceforge.net/xoops/?rev=8941&view=rev Author: txmodxoops Date: 2012-02-12 20:32:16 +0000 (Sun, 12 Feb 2012) Log Message: ----------- radiostream 3 versions Added Paths: ----------- XoopsModules/radiostrem/ XoopsModules/radiostrem/branches/ XoopsModules/radiostrem/releases/ XoopsModules/radiostrem/releases/1.01/ XoopsModules/radiostrem/releases/1.01/radiostream/ XoopsModules/radiostrem/releases/1.01/radiostream/action.php XoopsModules/radiostrem/releases/1.01/radiostream/admin/ XoopsModules/radiostrem/releases/1.01/radiostream/admin/about.php XoopsModules/radiostrem/releases/1.01/radiostream/admin/action.php XoopsModules/radiostrem/releases/1.01/radiostream/admin/admin_footer.php XoopsModules/radiostrem/releases/1.01/radiostream/admin/admin_header.php XoopsModules/radiostrem/releases/1.01/radiostream/admin/index.html XoopsModules/radiostrem/releases/1.01/radiostream/admin/index.php XoopsModules/radiostrem/releases/1.01/radiostream/admin/info_header.php XoopsModules/radiostrem/releases/1.01/radiostream/admin/menu.php XoopsModules/radiostrem/releases/1.01/radiostream/blocks/ XoopsModules/radiostrem/releases/1.01/radiostream/blocks/index.html XoopsModules/radiostrem/releases/1.01/radiostream/blocks/radio_block.php XoopsModules/radiostrem/releases/1.01/radiostream/class/ XoopsModules/radiostrem/releases/1.01/radiostream/class/radio_stream.class XoopsModules/radiostrem/releases/1.01/radiostream/class/radio_stream.class.php XoopsModules/radiostrem/releases/1.01/radiostream/class/radio_stream.php XoopsModules/radiostrem/releases/1.01/radiostream/config_version.php XoopsModules/radiostrem/releases/1.01/radiostream/images/ XoopsModules/radiostrem/releases/1.01/radiostream/images/Thumbs.db XoopsModules/radiostrem/releases/1.01/radiostream/images/blank.png XoopsModules/radiostrem/releases/1.01/radiostream/images/brokenimg.png XoopsModules/radiostrem/releases/1.01/radiostream/images/icons/ XoopsModules/radiostrem/releases/1.01/radiostream/images/icons/Thumbs.db XoopsModules/radiostrem/releases/1.01/radiostream/images/icons/delete.gif XoopsModules/radiostrem/releases/1.01/radiostream/images/icons/edit.gif XoopsModules/radiostrem/releases/1.01/radiostream/images/icons/index.html XoopsModules/radiostrem/releases/1.01/radiostream/images/index.html XoopsModules/radiostrem/releases/1.01/radiostream/images/logo-txmod.png XoopsModules/radiostrem/releases/1.01/radiostream/images/logo.png XoopsModules/radiostrem/releases/1.01/radiostream/images/radiostream_slogo (1).png XoopsModules/radiostrem/releases/1.01/radiostream/images/radiostream_slogo.png XoopsModules/radiostrem/releases/1.01/radiostream/images/slogo.ico XoopsModules/radiostrem/releases/1.01/radiostream/include/ XoopsModules/radiostrem/releases/1.01/radiostream/include/functions.php XoopsModules/radiostrem/releases/1.01/radiostream/include/index.html XoopsModules/radiostrem/releases/1.01/radiostream/include/open.php XoopsModules/radiostrem/releases/1.01/radiostream/include/popup.php XoopsModules/radiostrem/releases/1.01/radiostream/index.php XoopsModules/radiostrem/releases/1.01/radiostream/info/ XoopsModules/radiostrem/releases/1.01/radiostream/info/index.html XoopsModules/radiostrem/releases/1.01/radiostream/info/readme.txt XoopsModules/radiostrem/releases/1.01/radiostream/language/ XoopsModules/radiostrem/releases/1.01/radiostream/language/english/ XoopsModules/radiostrem/releases/1.01/radiostream/language/english/admin.php XoopsModules/radiostrem/releases/1.01/radiostream/language/english/blocks.php XoopsModules/radiostrem/releases/1.01/radiostream/language/english/index.html XoopsModules/radiostrem/releases/1.01/radiostream/language/english/main.php XoopsModules/radiostrem/releases/1.01/radiostream/language/english/modinfo.php XoopsModules/radiostrem/releases/1.01/radiostream/language/index.html XoopsModules/radiostrem/releases/1.01/radiostream/language/italian/ XoopsModules/radiostrem/releases/1.01/radiostream/language/italian/admin.php XoopsModules/radiostrem/releases/1.01/radiostream/language/italian/blocks.php XoopsModules/radiostrem/releases/1.01/radiostream/language/italian/index.html XoopsModules/radiostrem/releases/1.01/radiostream/language/italian/main.php XoopsModules/radiostrem/releases/1.01/radiostream/language/italian/modinfo.php XoopsModules/radiostrem/releases/1.01/radiostream/sql/ XoopsModules/radiostrem/releases/1.01/radiostream/sql/index.html XoopsModules/radiostrem/releases/1.01/radiostream/sql/radio_stream.sql XoopsModules/radiostrem/releases/1.01/radiostream/streamlist.php XoopsModules/radiostrem/releases/1.01/radiostream/style/ XoopsModules/radiostrem/releases/1.01/radiostream/style/index.html XoopsModules/radiostrem/releases/1.01/radiostream/style/style_rs.css XoopsModules/radiostrem/releases/1.01/radiostream/submit.php XoopsModules/radiostrem/releases/1.01/radiostream/templates/ XoopsModules/radiostrem/releases/1.01/radiostream/templates/blocks/ XoopsModules/radiostrem/releases/1.01/radiostream/templates/blocks/index.html XoopsModules/radiostrem/releases/1.01/radiostream/templates/blocks/radio_block.html XoopsModules/radiostrem/releases/1.01/radiostream/templates/index.html XoopsModules/radiostrem/releases/1.01/radiostream/templates/radio_index.html XoopsModules/radiostrem/releases/1.01/radiostream/templates/radio_streamlist.html XoopsModules/radiostrem/releases/1.01/radiostream/templates/radio_submit.html XoopsModules/radiostrem/releases/1.01/radiostream/xoops_version.php XoopsModules/radiostrem/releases/1.12/ XoopsModules/radiostrem/releases/1.12/radiostream/ XoopsModules/radiostrem/releases/1.12/radiostream/admin/ XoopsModules/radiostrem/releases/1.12/radiostream/admin/about.php XoopsModules/radiostrem/releases/1.12/radiostream/admin/admin_footer.php XoopsModules/radiostrem/releases/1.12/radiostream/admin/admin_header.php XoopsModules/radiostrem/releases/1.12/radiostream/admin/index.html XoopsModules/radiostrem/releases/1.12/radiostream/admin/index.php XoopsModules/radiostrem/releases/1.12/radiostream/admin/menu.php XoopsModules/radiostrem/releases/1.12/radiostream/admin/param.php XoopsModules/radiostrem/releases/1.12/radiostream/admin/stream.php XoopsModules/radiostrem/releases/1.12/radiostream/blocks/ XoopsModules/radiostrem/releases/1.12/radiostream/blocks/blocks_stream.php XoopsModules/radiostrem/releases/1.12/radiostream/blocks/index.html XoopsModules/radiostrem/releases/1.12/radiostream/class/ XoopsModules/radiostrem/releases/1.12/radiostream/class/index.html XoopsModules/radiostrem/releases/1.12/radiostream/class/menu.php XoopsModules/radiostrem/releases/1.12/radiostream/class/object.php XoopsModules/radiostrem/releases/1.12/radiostream/class/param.php XoopsModules/radiostrem/releases/1.12/radiostream/class/stream.php XoopsModules/radiostrem/releases/1.12/radiostream/header.php XoopsModules/radiostrem/releases/1.12/radiostream/images/ XoopsModules/radiostrem/releases/1.12/radiostream/images/TDMLogo.png XoopsModules/radiostrem/releases/1.12/radiostream/images/brokenimg.png XoopsModules/radiostrem/releases/1.12/radiostream/images/deco/ XoopsModules/radiostrem/releases/1.12/radiostream/images/deco/about.png XoopsModules/radiostrem/releases/1.12/radiostream/images/deco/arrow.gif XoopsModules/radiostrem/releases/1.12/radiostream/images/deco/contact.png XoopsModules/radiostrem/releases/1.12/radiostream/images/deco/delete.gif XoopsModules/radiostrem/releases/1.12/radiostream/images/deco/edit.gif XoopsModules/radiostrem/releases/1.12/radiostream/images/deco/index.html XoopsModules/radiostrem/releases/1.12/radiostream/images/deco/index.png XoopsModules/radiostrem/releases/1.12/radiostream/images/deco/list_search.png XoopsModules/radiostrem/releases/1.12/radiostream/images/deco/off.gif XoopsModules/radiostrem/releases/1.12/radiostream/images/deco/on.gif XoopsModules/radiostrem/releases/1.12/radiostream/images/deco/permissions.png XoopsModules/radiostrem/releases/1.12/radiostream/images/deco/pref.png XoopsModules/radiostrem/releases/1.12/radiostream/images/deco/stream_search.png XoopsModules/radiostrem/releases/1.12/radiostream/images/deco/update.png XoopsModules/radiostrem/releases/1.12/radiostream/images/index.html XoopsModules/radiostrem/releases/1.12/radiostream/images/logo-txmod.png XoopsModules/radiostrem/releases/1.12/radiostream/images/menu/ XoopsModules/radiostrem/releases/1.12/radiostream/images/menu/bg.png XoopsModules/radiostrem/releases/1.12/radiostream/images/menu/index.html XoopsModules/radiostrem/releases/1.12/radiostream/images/menu/left_both.png XoopsModules/radiostrem/releases/1.12/radiostream/images/menu/right_both.png XoopsModules/radiostrem/releases/1.12/radiostream/images/radiostream_slogo.png XoopsModules/radiostrem/releases/1.12/radiostream/images/txmod_logo.png XoopsModules/radiostrem/releases/1.12/radiostream/include/ XoopsModules/radiostrem/releases/1.12/radiostream/include/functions.php XoopsModules/radiostrem/releases/1.12/radiostream/include/index.html XoopsModules/radiostrem/releases/1.12/radiostream/include/install.php XoopsModules/radiostrem/releases/1.12/radiostream/include/popup.php XoopsModules/radiostrem/releases/1.12/radiostream/include/search.inc.php XoopsModules/radiostrem/releases/1.12/radiostream/include/style.css XoopsModules/radiostrem/releases/1.12/radiostream/index.php XoopsModules/radiostrem/releases/1.12/radiostream/language/ XoopsModules/radiostrem/releases/1.12/radiostream/language/english/ XoopsModules/radiostrem/releases/1.12/radiostream/language/english/admin.php XoopsModules/radiostrem/releases/1.12/radiostream/language/english/blocks.php XoopsModules/radiostrem/releases/1.12/radiostream/language/english/index.html XoopsModules/radiostrem/releases/1.12/radiostream/language/english/main.php XoopsModules/radiostrem/releases/1.12/radiostream/language/english/modinfo.php XoopsModules/radiostrem/releases/1.12/radiostream/language/french/ XoopsModules/radiostrem/releases/1.12/radiostream/language/french/admin.php XoopsModules/radiostrem/releases/1.12/radiostream/language/french/blocks.php XoopsModules/radiostrem/releases/1.12/radiostream/language/french/index.html XoopsModules/radiostrem/releases/1.12/radiostream/language/french/main.php XoopsModules/radiostrem/releases/1.12/radiostream/language/french/modinfo.php XoopsModules/radiostrem/releases/1.12/radiostream/language/index.html XoopsModules/radiostrem/releases/1.12/radiostream/language/italian/ XoopsModules/radiostrem/releases/1.12/radiostream/language/italian/admin.php XoopsModules/radiostrem/releases/1.12/radiostream/language/italian/blocks.php XoopsModules/radiostrem/releases/1.12/radiostream/language/italian/index.html XoopsModules/radiostrem/releases/1.12/radiostream/language/italian/main.php XoopsModules/radiostrem/releases/1.12/radiostream/language/italian/modinfo.php XoopsModules/radiostrem/releases/1.12/radiostream/resource/ XoopsModules/radiostrem/releases/1.12/radiostream/resource/comment_delete.php XoopsModules/radiostrem/releases/1.12/radiostream/resource/comment_edit.php XoopsModules/radiostrem/releases/1.12/radiostream/resource/comment_new.php XoopsModules/radiostrem/releases/1.12/radiostream/resource/comment_post.php XoopsModules/radiostrem/releases/1.12/radiostream/resource/comment_reply.php XoopsModules/radiostrem/releases/1.12/radiostream/resource/index.php XoopsModules/radiostrem/releases/1.12/radiostream/resource/xoops_version.php XoopsModules/radiostrem/releases/1.12/radiostream/sql/ XoopsModules/radiostrem/releases/1.12/radiostream/sql/index.html XoopsModules/radiostrem/releases/1.12/radiostream/sql/mysql.sql XoopsModules/radiostrem/releases/1.12/radiostream/sql/x00a_radiostream_list.sql XoopsModules/radiostrem/releases/1.12/radiostream/sql/xoops245b.sql XoopsModules/radiostrem/releases/1.12/radiostream/streamlist.php XoopsModules/radiostrem/releases/1.12/radiostream/submit.php XoopsModules/radiostrem/releases/1.12/radiostream/templates/ XoopsModules/radiostrem/releases/1.12/radiostream/templates/blocks/ XoopsModules/radiostrem/releases/1.12/radiostream/templates/blocks/index.html XoopsModules/radiostrem/releases/1.12/radiostream/templates/blocks/radiostream_block.html XoopsModules/radiostrem/releases/1.12/radiostream/templates/index.html XoopsModules/radiostrem/releases/1.12/radiostream/templates/radiostream_index.html XoopsModules/radiostrem/releases/1.12/radiostream/templates/radiostream_streamlist.html XoopsModules/radiostrem/releases/1.12/radiostream/templates/radiostream_submit.html XoopsModules/radiostrem/releases/1.12/radiostream/xoops_version.php XoopsModules/radiostrem/releases/1.21/ XoopsModules/radiostrem/releases/1.21/radiostream/ XoopsModules/radiostrem/releases/1.21/radiostream/admin/ XoopsModules/radiostrem/releases/1.21/radiostream/admin/about.php XoopsModules/radiostrem/releases/1.21/radiostream/admin/admin_footer.php XoopsModules/radiostrem/releases/1.21/radiostream/admin/admin_header.php XoopsModules/radiostrem/releases/1.21/radiostream/admin/index.html XoopsModules/radiostrem/releases/1.21/radiostream/admin/index.php XoopsModules/radiostrem/releases/1.21/radiostream/admin/menu.php XoopsModules/radiostrem/releases/1.21/radiostream/admin/newstreams.php XoopsModules/radiostrem/releases/1.21/radiostream/admin/param.php XoopsModules/radiostrem/releases/1.21/radiostream/admin/stream.php XoopsModules/radiostrem/releases/1.21/radiostream/blocks/ XoopsModules/radiostrem/releases/1.21/radiostream/blocks/blocks_stream.php XoopsModules/radiostrem/releases/1.21/radiostream/blocks/blocks_stream_bis.php XoopsModules/radiostrem/releases/1.21/radiostream/blocks/index.html XoopsModules/radiostrem/releases/1.21/radiostream/class/ XoopsModules/radiostrem/releases/1.21/radiostream/class/index.html XoopsModules/radiostrem/releases/1.21/radiostream/class/menu.php XoopsModules/radiostrem/releases/1.21/radiostream/class/object.php XoopsModules/radiostrem/releases/1.21/radiostream/class/param.php XoopsModules/radiostrem/releases/1.21/radiostream/class/stream.php XoopsModules/radiostrem/releases/1.21/radiostream/header.php XoopsModules/radiostrem/releases/1.21/radiostream/images/ XoopsModules/radiostrem/releases/1.21/radiostream/images/blank.gif XoopsModules/radiostrem/releases/1.21/radiostream/images/brokenimg.png XoopsModules/radiostrem/releases/1.21/radiostream/images/deco/ XoopsModules/radiostrem/releases/1.21/radiostream/images/deco/about.png XoopsModules/radiostrem/releases/1.21/radiostream/images/deco/arrow.gif XoopsModules/radiostrem/releases/1.21/radiostream/images/deco/contact.png XoopsModules/radiostrem/releases/1.21/radiostream/images/deco/delete.gif XoopsModules/radiostrem/releases/1.21/radiostream/images/deco/edit.gif XoopsModules/radiostrem/releases/1.21/radiostream/images/deco/index.html XoopsModules/radiostrem/releases/1.21/radiostream/images/deco/index.png XoopsModules/radiostrem/releases/1.21/radiostream/images/deco/list_search.png XoopsModules/radiostrem/releases/1.21/radiostream/images/deco/off.gif XoopsModules/radiostrem/releases/1.21/radiostream/images/deco/on.gif XoopsModules/radiostrem/releases/1.21/radiostream/images/deco/permissions.png XoopsModules/radiostrem/releases/1.21/radiostream/images/deco/pref.png XoopsModules/radiostrem/releases/1.21/radiostream/images/deco/stream_search.png XoopsModules/radiostrem/releases/1.21/radiostream/images/deco/update.png XoopsModules/radiostrem/releases/1.21/radiostream/images/index.html XoopsModules/radiostrem/releases/1.21/radiostream/images/logo-big.png XoopsModules/radiostrem/releases/1.21/radiostream/images/logo-txmod.png XoopsModules/radiostrem/releases/1.21/radiostream/images/menu/ XoopsModules/radiostrem/releases/1.21/radiostream/images/menu/bg.png XoopsModules/radiostrem/releases/1.21/radiostream/images/menu/index.html XoopsModules/radiostrem/releases/1.21/radiostream/images/menu/left_both.png XoopsModules/radiostrem/releases/1.21/radiostream/images/menu/right_both.png XoopsModules/radiostrem/releases/1.21/radiostream/images/radiostream_slogo.png XoopsModules/radiostrem/releases/1.21/radiostream/images/txmod_logo.png XoopsModules/radiostrem/releases/1.21/radiostream/include/ XoopsModules/radiostrem/releases/1.21/radiostream/include/functions.php XoopsModules/radiostrem/releases/1.21/radiostream/include/index.html XoopsModules/radiostrem/releases/1.21/radiostream/include/install.php XoopsModules/radiostrem/releases/1.21/radiostream/include/notification.inc XoopsModules/radiostrem/releases/1.21/radiostream/include/notification.php XoopsModules/radiostrem/releases/1.21/radiostream/include/open.php XoopsModules/radiostrem/releases/1.21/radiostream/include/popup.php XoopsModules/radiostrem/releases/1.21/radiostream/include/search.inc.php XoopsModules/radiostrem/releases/1.21/radiostream/include/style.css XoopsModules/radiostrem/releases/1.21/radiostream/index.php XoopsModules/radiostrem/releases/1.21/radiostream/language/ XoopsModules/radiostrem/releases/1.21/radiostream/language/english/ XoopsModules/radiostrem/releases/1.21/radiostream/language/english/admin.php XoopsModules/radiostrem/releases/1.21/radiostream/language/english/blocks.php XoopsModules/radiostrem/releases/1.21/radiostream/language/english/index.html XoopsModules/radiostrem/releases/1.21/radiostream/language/english/mail_template/ XoopsModules/radiostrem/releases/1.21/radiostream/language/english/mail_template/.htaccess XoopsModules/radiostrem/releases/1.21/radiostream/language/english/mail_template/global_newstream_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/english/mail_template/global_streambroken_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/english/mail_template/global_streammodified_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/english/mail_template/global_streammodify_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/english/mail_template/global_streamsubmit_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/english/mail_template/index.html XoopsModules/radiostrem/releases/1.21/radiostream/language/english/mail_template/stream_approve_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/english/mail_template/stream_streammodified_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/english/mail_template/streambroken_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/english/main.php XoopsModules/radiostrem/releases/1.21/radiostream/language/english/modinfo.php XoopsModules/radiostrem/releases/1.21/radiostream/language/french/ XoopsModules/radiostrem/releases/1.21/radiostream/language/french/admin.php XoopsModules/radiostrem/releases/1.21/radiostream/language/french/blocks.php XoopsModules/radiostrem/releases/1.21/radiostream/language/french/index.html XoopsModules/radiostrem/releases/1.21/radiostream/language/french/mail_template/ XoopsModules/radiostrem/releases/1.21/radiostream/language/french/mail_template/.htaccess XoopsModules/radiostrem/releases/1.21/radiostream/language/french/mail_template/global_newstream_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/french/mail_template/global_streambroken_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/french/mail_template/global_streammodified_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/french/mail_template/global_streammodify_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/french/mail_template/global_streamsubmit_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/french/mail_template/index.html XoopsModules/radiostrem/releases/1.21/radiostream/language/french/mail_template/stream_approve_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/french/mail_template/stream_streammodified_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/french/mail_template/streambroken_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/french/main.php XoopsModules/radiostrem/releases/1.21/radiostream/language/french/modinfo.php XoopsModules/radiostrem/releases/1.21/radiostream/language/index.html XoopsModules/radiostrem/releases/1.21/radiostream/language/italian/ XoopsModules/radiostrem/releases/1.21/radiostream/language/italian/admin.php XoopsModules/radiostrem/releases/1.21/radiostream/language/italian/blocks.php XoopsModules/radiostrem/releases/1.21/radiostream/language/italian/index.html XoopsModules/radiostrem/releases/1.21/radiostream/language/italian/mail_template/ XoopsModules/radiostrem/releases/1.21/radiostream/language/italian/mail_template/.htaccess XoopsModules/radiostrem/releases/1.21/radiostream/language/italian/mail_template/global_newstream_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/italian/mail_template/global_streambroken_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/italian/mail_template/global_streammodified_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/italian/mail_template/global_streammodify_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/italian/mail_template/global_streamsubmit_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/italian/mail_template/index.html XoopsModules/radiostrem/releases/1.21/radiostream/language/italian/mail_template/stream_approve_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/italian/mail_template/stream_streammodified_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/italian/mail_template/streambroken_notify.tpl XoopsModules/radiostrem/releases/1.21/radiostream/language/italian/main.php XoopsModules/radiostrem/releases/1.21/radiostream/language/italian/modinfo.php XoopsModules/radiostrem/releases/1.21/radiostream/notification_update.php XoopsModules/radiostrem/releases/1.21/radiostream/sql/ XoopsModules/radiostrem/releases/1.21/radiostream/sql/index.html XoopsModules/radiostrem/releases/1.21/radiostream/sql/mysql.sql XoopsModules/radiostrem/releases/1.21/radiostream/streamlist.php XoopsModules/radiostrem/releases/1.21/radiostream/submit.php XoopsModules/radiostrem/releases/1.21/radiostream/templates/ XoopsModules/radiostrem/releases/1.21/radiostream/templates/blocks/ XoopsModules/radiostrem/releases/1.21/radiostream/templates/blocks/index.html XoopsModules/radiostrem/releases/1.21/radiostream/templates/blocks/radiostream_block.html XoopsModules/radiostrem/releases/1.21/radiostream/templates/blocks/radiostream_block_inp.html XoopsModules/radiostrem/releases/1.21/radiostream/templates/blocks/radiostream_block_sel.html XoopsModules/radiostrem/releases/1.21/radiostream/templates/blocks/x_radiostream_block.html XoopsModules/radiostrem/releases/1.21/radiostream/templates/index.html XoopsModules/radiostrem/releases/1.21/radiostream/templates/radiostream_index.html XoopsModules/radiostrem/releases/1.21/radiostream/templates/radiostream_streamlist.html XoopsModules/radiostrem/releases/1.21/radiostream/templates/radiostream_submit.html XoopsModules/radiostrem/releases/1.21/radiostream/xoops_version.php XoopsModules/radiostrem/trunk/ Added: XoopsModules/radiostrem/releases/1.01/radiostream/action.php =================================================================== --- XoopsModules/radiostrem/releases/1.01/radiostream/action.php (rev 0) +++ XoopsModules/radiostrem/releases/1.01/radiostream/action.php 2012-02-12 20:32:16 UTC (rev 8941) @@ -0,0 +1,60 @@ +<?php +// +// --------------------------------------------------- +// Module: radiostream +// File: action.php +// Version: 1.0 +// Date-Time: 2008/06/18 15:03:18 +// Author: timgno +// Email: txm...@gm... +// URL: http://txmod.freehostia.com +// --------------------------------------------------- +// +include "../../mainfile.php"; +$myts = &MyTextSanitizer::getInstance(); +$rsl = "radio_stream_list"; +//ADD NEW STREAM +if($_POST['action'] == 'add_stream') +{ + $name = $myts->addslashes(trim($_POST['name'])); + $source = $myts->addslashes(trim($_POST['source'])); + $frequence = $myts->addslashes(trim($_POST['frequence'])); + $website = $myts->addslashes(trim($_POST['website'])); + $city = $myts->addslashes(trim($_POST['city'])); + if($_POST['rid'] > 0) + $xoopsDB->query("UPDATE ".$xoopsDB->prefix($rsl)." + SET rid = $rid, name = '".mysql_escape_string($name)."', + source = '$source', frequence = '$frequence', + website = '$website', city = '$city' WHERE rid = $rid"); + else + $xoopsDB->query("INSERT INTO " . $xoopsDB->prefix($rsl) . " values ('','".mysql_escape_string($name)."','".$source."','".$frequence."','".$website."','".$city."')"); + include(XOOPS_ROOT_PATH.'/header.php'); + redirect_header('index.php', 1, sprintf(_MD_RS_SUCCESFULLYADDED, $name)); + include(XOOPS_ROOT_PATH.'/footer.php'); +} +//EDIT STREAM +if($_POST['action'] == 'edit_stream') +{ + $name = $myts->addslashes(trim($_POST['name'])); + $source = $myts->addslashes(trim($_POST['source'])); + $frequence = $myts->addslashes(trim($_POST['frequence'])); + $website = $myts->addslashes(trim($_POST['website'])); + $city = $myts->addslashes(trim($_POST['city'])); + $xoopsDB->query("UPDATE " . $xoopsDB->prefix($rsl) . " SET name = '".mysql_escape_string($name)."', + source = '$source', frequence = '$frequence', + website = '$website', city = '$city' WHERE rid = '".$_POST['rid']."'"); + include(XOOPS_ROOT_PATH.'/header.php'); + redirect_header('index.php', 1, sprintf(_MD_RS_SUCCESFULLYUPDATE, $name)); + include(XOOPS_ROOT_PATH.'/footer.php'); +} + +//DELETE STREAM +if($_POST['action'] == 'delete_stream') +{ + $name = $_POST['name']; + $xoopsDB->query("DELETE FROM ".$xoopsDB->prefix($rsl)." WHERE rid=".$_POST['rid'].""); + include(XOOPS_ROOT_PATH.'/header.php'); + redirect_header('index.php', 1, sprintf(_MD_RS_SUCCESFULLYDELETED, $name)); + include(XOOPS_ROOT_PATH.'/footer.php'); +} +?> \ No newline at end of file Added: XoopsModules/radiostrem/releases/1.01/radiostream/admin/about.php =================================================================== --- XoopsModules/radiostrem/releases/1.01/radiostream/admin/about.php (rev 0) +++ XoopsModules/radiostrem/releases/1.01/radiostream/admin/about.php 2012-02-12 20:32:16 UTC (rev 8941) @@ -0,0 +1,61 @@ +<?php +// +// --------------------------------------------------- +// File: admin/about.php +// Version: 1.0 +// Date-Time: 2008/02/18 14:53:14 +// Author: timgno +// Email: ris...@ne... +// URL: http://www.risorseweb.netsons.org +// --------------------------------------------------- +// + +include "admin_header.php"; + +xoops_cp_header(); +$myts = &MyTextSanitizer::getInstance(); + +include "info_header.php"; +am_menuheader(); + +// Author Information +$sform = new XoopsThemeForm(_AM_RS_AUTHOR_INFO, "", ""); +if ( $versioninfo->getInfo('author_realname')) + $author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")"; +else + $author_name = $versioninfo->getInfo('author'); +$sform -> addElement(new XoopsFormLabel(_AM_RS_AUTHOR_NAME, $author_name)); +$author_sites = $versioninfo -> getInfo('author_website'); +$author_site_info = ""; +foreach($author_sites as $site){ + $author_site_info .= "<a href='" . $site['url'] . "' target='blank'>" . $site['name'] . "</a>; "; +} +$sform -> addElement(new XoopsFormLabel(_AM_RS_AUTHOR_WEBSITE, $author_site_info)); +$sform -> addElement(new XoopsFormLabel(_AM_RS_AUTHOR_EMAIL, "<a href='mailto:" . $versioninfo -> getInfo('author_email') . "'>" . $versioninfo -> getInfo('author_email') . "</a>")); +$sform -> addElement(new XoopsFormLabel(_AM_RS_AUTHOR_CREDITS, $versioninfo -> getInfo('credits'))); +$sform -> display(); +echo "<br />"; +$sform = new XoopsThemeForm(_AM_RS_MODULE_INFO, "", ""); +$sform -> addElement(new XoopsFormLabel(_AM_RS_MODULE_STATUS, $versioninfo -> getInfo('status'))); +$sform -> addElement(new XoopsFormLabel(_AM_RS_MODULE_XOOPSVERSION, $versioninfo -> getInfo('xoopsversion'))); +$sform -> addElement(new XoopsFormLabel(_AM_RS_MODULE_DEMO, "<a href='" . $versioninfo -> getInfo('demo_site_url') . "' target='blank'>" . $versioninfo -> getInfo('demo_site_name') . "</a>")); +$sform -> addElement(new XoopsFormLabel(_AM_RS_MODULE_SUPPORT, "<a href='" . $versioninfo -> getInfo('support_site_url') . "' target='blank'>" . $versioninfo -> getInfo('support_site_name') . "</a>")); +$sform -> display(); +echo "<br />"; +$file = "../info/readme.txt"; +if (@file_exists($file)) +{ + $fp = @fopen($file, "r"); + $readmetext = @fread($fp, filesize($file)); + @fclose($file); + $sform = new XoopsThemeForm(_AM_RS_ABOUT, "", ""); + ob_start(); + echo "<div class='even' align='left'>".$myts->displayTarea($readmetext)."</div>"; + $sform -> addElement(new XoopsFormLabel('', ob_get_contents(), 0)); + ob_end_clean(); + $sform -> display(); + unset($file); +} + +xoops_cp_footer(); +?> \ No newline at end of file Added: XoopsModules/radiostrem/releases/1.01/radiostream/admin/action.php =================================================================== --- XoopsModules/radiostrem/releases/1.01/radiostream/admin/action.php (rev 0) +++ XoopsModules/radiostrem/releases/1.01/radiostream/admin/action.php 2012-02-12 20:32:16 UTC (rev 8941) @@ -0,0 +1,59 @@ +<?php +// +// --------------------------------------------------- +// Module: radiostream +// File: admin/action.php +// Version: 1.0 +// Date-Time: 2008/06/18 15:03:18 +// Author: timgno +// Email: txm...@gm... +// URL: http://txmod.freehostia.com +// --------------------------------------------------- +// +include "../../../mainfile.php"; +$myts = &MyTextSanitizer::getInstance(); +$rsl = "radio_stream_list"; +//ADD NEW STREAM +if($_POST['action'] == 'add_stream') +{ + $name = $myts->addslashes(trim($_POST['name'])); + $source = $myts->addslashes(trim($_POST['source'])); + $frequence = $myts->addslashes(trim($_POST['frequence'])); + $website = $myts->addslashes(trim($_POST['website'])); + $city = $myts->addslashes(trim($_POST['city'])); + if($_POST['rid'] > 0) + $xoopsDB->query("UPDATE ".$xoopsDB->prefix($rsl) . " + SET rid = $rid, name = '".mysql_escape_string($name)."', source = '$source', frequence = '$frequence', + website = '$website', city = '$city' WHERE rid = $rid"); + else + $xoopsDB->query("INSERT INTO " . $xoopsDB->prefix($rsl) . " values ('','".mysql_escape_string($name)."','".$source."','".$frequence."','".$website."','".$city."')"); + include(XOOPS_ROOT_PATH.'/header.php'); + redirect_header('index.php', 1, sprintf(_AM_RS_SUCCESFULLYADDED, $name)); + include(XOOPS_ROOT_PATH.'/footer.php'); +} +//EDIT STREAM +if($_POST['action'] == 'edit_stream') +{ + $name = $myts->addslashes(trim($_POST['name'])); + $source = $myts->addslashes(trim($_POST['source'])); + $frequence = $myts->addslashes(trim($_POST['frequence'])); + $website = $myts->addslashes(trim($_POST['website'])); + $city = $myts->addslashes(trim($_POST['city'])); + $xoopsDB->query("UPDATE " . $xoopsDB->prefix($rsl) . " SET name = '".mysql_escape_string($name)."', + source = '$source', frequence = '$frequence', + website = '$website', city = '$city' WHERE rid = '".$_POST['rid']."'"); + include(XOOPS_ROOT_PATH.'/header.php'); + redirect_header('index.php', 1, sprintf(_AM_RS_SUCCESFULLYUPDATE, $name)); + include(XOOPS_ROOT_PATH.'/footer.php'); +} + +//DELETE STREAM +if($_POST['action'] == 'delete_stream') +{ + $name = $_POST['name']; + $xoopsDB->query("DELETE FROM ".$xoopsDB->prefix($rsl)." WHERE rid=".$_POST['rid'].""); + include(XOOPS_ROOT_PATH.'/header.php'); + redirect_header('index.php', 1, sprintf(_AM_RS_SUCCESFULLYDELETED, $name)); + include(XOOPS_ROOT_PATH.'/footer.php'); +} +?> \ No newline at end of file Added: XoopsModules/radiostrem/releases/1.01/radiostream/admin/admin_footer.php =================================================================== --- XoopsModules/radiostrem/releases/1.01/radiostream/admin/admin_footer.php (rev 0) +++ XoopsModules/radiostrem/releases/1.01/radiostream/admin/admin_footer.php 2012-02-12 20:32:16 UTC (rev 8941) @@ -0,0 +1,3 @@ +<?php +xoops_cp_footer(); +?> Added: XoopsModules/radiostrem/releases/1.01/radiostream/admin/admin_header.php =================================================================== --- XoopsModules/radiostrem/releases/1.01/radiostream/admin/admin_header.php (rev 0) +++ XoopsModules/radiostrem/releases/1.01/radiostream/admin/admin_header.php 2012-02-12 20:32:16 UTC (rev 8941) @@ -0,0 +1,64 @@ +<?php +// +// --------------------------------------------------- +// File: admin/admin_header.php +// Version: 1.0 +// Date-Time: 2008/06/10 10:03:11 +// Author: timgno +// Email: ris...@ne... +// URL: http://www.risorseweb.netsons.org +// --------------------------------------------------- +// +$admin = "1"; +$debug = "0"; +include '../../../mainfile.php'; +include '../../../include/cp_header.php'; +include_once(XOOPS_ROOT_PATH.'/modules/radiostream/include/functions.php'); + +if ( !file_exists(XOOPS_ROOT_PATH."/modules/radiostream/language/".$xoopsConfig['language']."/admin.php") ){ + include XOOPS_ROOT_PATH."/modules/radiostream/language/".$xoopsConfig['language']."/admin.php"; +} else { + include XOOPS_ROOT_PATH."/modules/radiostream/language/english/admin.php"; +} + +include_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/class/uploader.php'; + +$myts = &MyTextSanitizer::getInstance(); + +global $xoopsDB; +$op = ""; +if (isset($_POST)) +{ + foreach ($_POST as $k => $v) + { + ${$k} = $v; + } +} + +if (isset($_GET)) +{ + foreach ($_GET as $k => $v) + { + ${$k} = $v; + } +} + +if (isset($_GET['op'])) $op = $_GET['op']; +if (isset($_POST['op'])) $op = $_POST['op']; + + +if (is_object($xoopsUser)) { + $xoopsModule = XoopsModule::getByDirname("radiostream"); + if (!$xoopsUser->isAdmin($xoopsModule->mid())) { + redirect_header(XOOPS_URL."/",1,_NOPERM); + exit(); + } +} else { + redirect_header(XOOPS_URL."/",1,_NOPERM); + exit(); +} + +//xoops_cp_header(); +?> \ No newline at end of file Added: XoopsModules/radiostrem/releases/1.01/radiostream/admin/index.html =================================================================== --- XoopsModules/radiostrem/releases/1.01/radiostream/admin/index.html (rev 0) +++ XoopsModules/radiostrem/releases/1.01/radiostream/admin/index.html 2012-02-12 20:32:16 UTC (rev 8941) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/radiostrem/releases/1.01/radiostream/admin/index.php =================================================================== --- XoopsModules/radiostrem/releases/1.01/radiostream/admin/index.php (rev 0) +++ XoopsModules/radiostrem/releases/1.01/radiostream/admin/index.php 2012-02-12 20:32:16 UTC (rev 8941) @@ -0,0 +1,31 @@ +<?php +include ('admin_header.php'); +switch ( $op ) +{ + case "add": + xoops_cp_header(); + am_menuheader(); + addStream(); + break; + + case "edit": + xoops_cp_header(); + am_menuheader(); + editStream(); + break; + + case "delete": + xoops_cp_header(); + am_menuheader(); + deleteStream(); + break; + + case "main": + default: + xoops_cp_header(); + am_menuheader(); + Stream(); + break; +} +include ('admin_footer.php'); +?> \ No newline at end of file Added: XoopsModules/radiostrem/releases/1.01/radiostream/admin/info_header.php =================================================================== --- XoopsModules/radiostrem/releases/1.01/radiostream/admin/info_header.php (rev 0) +++ XoopsModules/radiostrem/releases/1.01/radiostream/admin/info_header.php 2012-02-12 20:32:16 UTC (rev 8941) @@ -0,0 +1,40 @@ +<?php +// +// --------------------------------------------------- +// File: admin/info_header.php +// Version: 1.0 +// Date-Time: 2008/05/11 11:34:40 +// Author: timgno +// Email: ris...@ne... +// URL: http://www.risorseweb.netsons.org +// --------------------------------------------------- +// + +include "admin_header.php"; + +$module_handler =& xoops_gethandler('module'); +$versioninfo =& $module_handler->get($xoopsModule->getVar('mid')); + +// Left headings... +echo "<a href='index.php'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule -> dirname() . "/" . $versioninfo -> getInfo('image') . "' alt='' hspace='10' vspace='0' align='left'></a>"; +echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $versioninfo->getInfo('name') . " ver " . $versioninfo->getInfo('version') . "</div>"; +echo "</div>"; +echo " -------------------------------- "; +echo "<div>" . _AM_RS_RELEASE . ": " . $versioninfo -> getInfo('releasedate') . "</div><br />"; +echo '<div align="center">'._AM_RS_DONMESSAGE.'<br /> + <form action="https://www.paypal.com/it/cgi-bin/webscr" target="paypal" method="post"> + <input type="hidden" name="cmd" value="_xclick" /> + <input type="hidden" name="amount" id="paypal" value="5"> + <input type="hidden" name="business" value="txm...@gm..."> + <input type="hidden" name="rm" value="2"> + <input type="hidden" name="on0" value="List your name? "> + <input type="hidden" name="item_number" value="110"> + <input type="hidden" name="notify_url" value="http://mcdirectory.netsons.org/txmod/modules/donations/ipnppd.php"> + <input type="hidden" name="currency_code" value="EUR"> + <input type="hidden" name="cn" value="Comments"> + <input type="hidden" name="custom" value="txm...@gm..."> + <input type="hidden" name="image_url" value="http://mcdirectory.netsons.org/txmod/themes/obscene/img/logo.gif"> + <input type="image" src="https://www.paypal.com/it_IT/i/btn/x-click-but04.gif" border="0" name="submit" alt="Paga con PayPal - veloce, gratuito e sicuro!" /> + </form> + </div>'; +?> \ No newline at end of file Added: XoopsModules/radiostrem/releases/1.01/radiostream/admin/menu.php =================================================================== --- XoopsModules/radiostrem/releases/1.01/radiostream/admin/menu.php (rev 0) +++ XoopsModules/radiostrem/releases/1.01/radiostream/admin/menu.php 2012-02-12 20:32:16 UTC (rev 8941) @@ -0,0 +1,19 @@ +<?php +// +// --------------------------------------------------- +// File: menu.php +// Version: 1.0 +// Date-Time: 2008/02/15 10:33:10 +// Author: timgno +// Email: ris...@ne... +// URL: http://www.risorseweb.netsons.org +// --------------------------------------------------- +// +$adminmenu[0]['title'] = _MI_RS_ADMENU0; +$adminmenu[0]['link'] = "admin/index.php"; +$adminmenu[1]['title'] = _MI_RS_ADMENU1; +$adminmenu[1]['link'] = "admin/index.php?op=add"; +$adminmenu[2]['title'] = _MI_RS_ADMENU2; +$adminmenu[2]['link'] = "admin/about.php"; + +?> \ No newline at end of file Added: XoopsModules/radiostrem/releases/1.01/radiostream/blocks/index.html =================================================================== --- XoopsModules/radiostrem/releases/1.01/radiostream/blocks/index.html (rev 0) +++ XoopsModules/radiostrem/releases/1.01/radiostream/blocks/index.html 2012-02-12 20:32:16 UTC (rev 8941) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/radiostrem/releases/1.01/radiostream/blocks/radio_block.php =================================================================== --- XoopsModules/radiostrem/releases/1.01/radiostream/blocks/radio_block.php (rev 0) +++ XoopsModules/radiostrem/releases/1.01/radiostream/blocks/radio_block.php 2012-02-12 20:32:16 UTC (rev 8941) @@ -0,0 +1,56 @@ +<?php +/* +function radio_show() +{ + global $xoopsDB; + $allow_users = "1"; + + $block = array(); + $result = $xoopsDB->query("SELECT rid, name FROM " . $xoopsDB->prefix("radio_stream") . " WHERE rid > 0 ORDER BY name DESC"); + $stream = array(); + while($myrow = $xoopsDB->fetchArray($result)) + { + $stream['name'] = "<option value='".$myrow["rid"]."'>".$myrow["name"]."</option>"; + $block['names'][] = $stream; + } + $block['lang_choice'] = _choice; + $block['lang_url'] = _url; + $block['lang_name'] = _name; + $block['lang_listen'] = _listen; + $block['lang_error'] = _error; + $block['allow_users'] = $allow_users; + return $block; +} */ + +function radio_show() +{ + global $xoopsDB; + $allow_users = "1"; + $block = array(); + ///////////////////////////////////// + //Select form to change Kewords view + $result = $xoopsDB->query( "SELECT * FROM ".$xoopsDB->prefix("radio_stream_list")." ORDER By name ASC"); + $datas = array(); + while ( $myrow = $xoopsDB->fetchArray($result) ) + { + $datas[]=$myrow; + } + $radiobox="<form style='margin:0; padding:0;' action='".XOOPS_URL."/modules/radiostream/include/open.php' target='radio' name='radiostream' onsubmit='popupradio(this)' method='get'> + <select name='predefstream' size='1' onChange='popupradio(this); document.radiostream.submit();'> + <option value='' selected>----------</option>"; + foreach($datas as $data) + { + $radiobox = $radiobox . "<option value='".$data['name']."'>".$data['name']."</option>"; + } + $radiobox = $radiobox."</select>"; // form end in template file = </form> + $block['lang_choice'] = _choice; + $block['lang_url'] = _url; + $block['lang_name'] = _name; + $block['lang_listen'] = _listen; + $block['lang_error'] = _error; + $block['allow_users'] = $allow_users; + $block['radiobox'] = $radiobox; + ///////////////////////////////////// + return $block; +} +?> \ No newline at end of file Added: XoopsModules/radiostrem/releases/1.01/radiostream/class/radio_stream.class =================================================================== --- XoopsModules/radiostrem/releases/1.01/radiostream/class/radio_stream.class (rev 0) +++ XoopsModules/radiostrem/releases/1.01/radiostream/class/radio_stream.class 2012-02-12 20:32:16 UTC (rev 8941) @@ -0,0 +1,269 @@ +<?php + +class radio_stream +{ + + /*** + * DB Fields: rid + **/ + var $rid; + + /*** + * DB Fields: name + **/ + var $name; + + /*** + * DB Fields: source + **/ + var $source; + + /*** + * DB Fields: frequence + **/ + var $frequence; + + /*** + * DB Fields: website + **/ + var $website; + + /*** + * DB Fields: city + **/ + var $city; + +//--------------- GET METHODS ----------------------------- // + /*** + * Get value for field: rid + * @result rid + **/ + function get_rid( ) { + // returns the value of rid + return $this->rid; + } + + /*** + * Get value for field: name + * @result name + **/ + function get_name( ) { + // returns the value of name + return $this->name; + } + + /*** + * Get value for field: source + * @result source + **/ + function get_source( ) { + // returns the value of source + return $this->source; + } + + /*** + * Get value for field: frequence + * @result frequence + **/ + function get_frequence( ) { + // returns the value of frequence + return $this->frequence; + } + + /*** + * Get value for field: website + * @result website + **/ + function get_website( ) { + // returns the value of website + return $this->website; + } + + /*** + * Get value for field: city + * @result city + **/ + function get_city( ) { + // returns the value of city + return $this->city; + } + +//--------------- SET METHODS ----------------------------- // + /*** + * Set value for field: rid + * @param rid + * @result void + **/ + function set_rid( $rid ) { + // sets the value of rid + $this->rid = $rid; + } + /*** + * Set value for field: name + * @param name + * @result void + **/ + function set_name( $name ) { + // sets the value of name + $this->name = $name; + } + /*** + * Set value for field: source + * @param source + * @result void + **/ + function set_source( $source ) { + // sets the value of source + $this->source = $source; + } + /*** + * Set value for field: frequence + * @param frequence + * @result void + **/ + function set_frequence( $frequence ) { + // sets the value of frequence + $this->frequence = $frequence; + } + /*** + * Set value for field: website + * @param website + * @result void + **/ + function set_website( $website ) { + // sets the value of website + $this->website = $website; + } + /*** + * Set value for field: city + * @param city + * @result void + **/ + function set_city( $city ) { + // sets the value of city + $this->city = $city; + } +//--------------- CRUD METHODS ----------------------------- // + /*** + * Create a new Record: radio_stream + * @param rid + * @param name + * @param source + * @param frequence + * @param website + * @param city + * @result void + **/ + function createnew_radio_stream( $rid, $name, $source, $frequence, $website, $city ) { + + // items to be inserted in the database + $_obj = array($rid, + $name, + $source, + $frequence, + $website, + $city); + + // database object connection + $dbConn = $GLOBALS['dbConn']; + + // perform insert in the database + $dbConn->insert("radio_stream", $_obj); + } + /*** + * Retrived an existing record: radio_stream + * @param rid + * @result new radio_stream + **/ + function get_radio_stream( $rid ) { + + // retrive the data + $dbConn = $GLOBALS['dbConn']; + + // retrieved value in the database + $_resultSet = $dbConn->doQuery("SELECT * FROM radio_stream WHERE rid = '$rid'"); + + $__radio_streamObj = new radio_stream(); + // return the retrived from the database + + // create a new object + $__obj = new radio_stream(); + $__obj->set_rid($_resultSet[0]['rid']); + $__obj->set_name($_resultSet[0]['name']); + $__obj->set_source($_resultSet[0]['source']); + $__obj->set_frequence($_resultSet[0]['frequence']); + $__obj->set_website($_resultSet[0]['website']); + $__obj->set_city($_resultSet[0]['city']); + + + return $__obj; + } + /*** + * Update an existing record: radio_stream + * @param rid + * @param itemsToBeUpdated = array() + * @result void + **/ + function update_radio_stream( $rid, $itemsToBeUpdated = array() ) { + + // get database connection + $dbConn = $GLOBALS['dbConn']; + + // performs update in the database + foreach($itemsToBeUpdated as $_fName => $_fVal) { + $dbConn->addValuePair($_fName, $_fVal); + } + + // perform update operation + $dbConn->update("radio_stream", "rid = '$rid'"); + } + /*** + * Delete an existing record: radio_stream + * @param rid + * @result void + **/ + function delete_radio_stream( $rid ) { + + // get database connection + $dbConn = $GLOBALS['dbConn']; + + // performs deletion of data + $dbConn->delete("radio_stream", "rid = '$rid'"); + } + /*** + * Retrived list of objects base on a given parameters: radio_stream + * @param conditionalStatement = '' + * @result collection of objects: radio_stream + **/ + function list_radio_stream( $conditionalStatement = '' ) { + + $dbConn = $GLOBALS['dbConn']; + // check if there is a given parameter list + if(!empty($conditionalStatement)) { + $sqlStatement = "SELECT * FROM radio_stream WHERE $conditionalStatement"; + } else { + $sqlStatement = "SELECT * FROM radio_stream"; + } + + // retrieve the values base on the query result + $__resObj = $dbConn->doQuery($sqlStatement); + + $__collectionOfObjects = array(); + foreach($__resObj as $__rs) { + $__newObj = new radio_stream(); + + $__newObj->set_rid($__rs['rid']); + $__newObj->set_name($__rs['name']); + $__newObj->set_source($__rs['source']); + $__newObj->set_frequence($__rs['frequence']); + $__newObj->set_website($__rs['website']); + $__newObj->set_city($__rs['city']); + + // add object to collection + array_push($__collectionOfObjects, $__newObj); + } + + // return collection of objects + return $__collectionOfObjects; + } +} ?> \ No newline at end of file Added: XoopsModules/radiostrem/releases/1.01/radiostream/class/radio_stream.class.php =================================================================== --- XoopsModules/radiostrem/releases/1.01/radiostream/class/radio_stream.class.php (rev 0) +++ XoopsModules/radiostrem/releases/1.01/radiostream/class/radio_stream.class.php 2012-02-12 20:32:16 UTC (rev 8941) @@ -0,0 +1,270 @@ +<?php + +class radio_stream +{ + /*** + * DB Fields: rid + **/ + var $rid; + + /*** + * DB Fields: name + **/ + var $name; + + /*** + * DB Fields: source + **/ + var $source; + + /*** + * DB Fields: frequence + **/ + var $frequence; + + /*** + * DB Fields: website + **/ + var $website; + + /*** + * DB Fields: city + **/ + var $city; + +//--------------- GET METHODS ----------------------------- // + /*** + * Get value for field: rid + * @result rid + **/ + function get_rid( ) { + // returns the value of rid + return $this->rid; + } + + /*** + * Get value for field: name + * @result name + **/ + function get_name( ) { + // returns the value of name + return $this->name; + } + + /*** + * Get value for field: source + * @result source + **/ + function get_source( ) { + // returns the value of source + return $this->source; + } + + /*** + * Get value for field: frequence + * @result frequence + **/ + function get_frequence( ) { + // returns the value of frequence + return $this->frequence; + } + + /*** + * Get value for field: website + * @result website + **/ + function get_website( ) { + // returns the value of website + return $this->website; + } + + /*** + * Get value for field: city + * @result city + **/ + function get_city( ) { + // returns the value of city + return $this->city; + } + +//--------------- SET METHODS ----------------------------- // + /*** + * Set value for field: rid + * @param rid + * @result void + **/ + function set_rid( $rid ) { + // sets the value of rid + $this->rid = $rid; + } + /*** + * Set value for field: name + * @param name + * @result void + **/ + function set_name( $name ) { + // sets the value of name + $this->name = $name; + } + /*** + * Set value for field: source + * @param source + * @result void + **/ + function set_source( $source ) { + // sets the value of source + $this->source = $source; + } + /*** + * Set value for field: frequence + * @param frequence + * @result void + **/ + function set_frequence( $frequence ) { + // sets the value of frequence + $this->frequence = $frequence; + } + /*** + * Set value for field: website + * @param website + * @result void + **/ + function set_website( $website ) { + // sets the value of website + $this->website = $website; + } + /*** + * Set value for field: city + * @param city + * @result void + **/ + function set_city( $city ) { + // sets the value of city + $this->city = $city; + } +//--------------- CRUD METHODS ----------------------------- // + /*** + * Create a new Record: radio_stream + * @param rid + * @param name + * @param source + * @param frequence + * @param website + * @param city + * @result void + **/ + function createnew_radio_stream( $rid, $name, $source, $frequence, $website, $city ) { + + // items to be inserted in the database + $_obj = array($rid, + $name, + $source, + $frequence, + $website, + $city); + + // database object connection + $dbConn = $GLOBALS['dbConn']; + + // perform insert in the database + $dbConn->insert("radio_stream", $_obj); + } + /*** + * Retrived an existing record: radio_stream + * @param rid + * @result new radio_stream + **/ + function get_radio_stream( $rid ) { + + // retrive the data + $dbConn = $GLOBALS['dbConn']; + + // retrieved value in the database + $_resultSet = $dbConn->doQuery("SELECT * FROM radio_stream WHERE rid = '$rid'"); + + $__radio_streamObj = new radio_stream(); + // return the retrived from the database + + // create a new object + $__obj = new radio_stream(); + $__obj->set_rid($_resultSet[0]['rid']); + $__obj->set_name($_resultSet[0]['name']); + $__obj->set_source($_resultSet[0]['source']); + $__obj->set_frequence($_resultSet[0]['frequence']); + $__obj->set_website($_resultSet[0]['website']); + $__obj->set_city($_resultSet[0]['city']); + + + return $__obj; + } + /*** + * Update an existing record: radio_stream + * @param rid + * @param itemsToBeUpdated = array() + * @result void + **/ + function update_radio_stream( $rid, $itemsToBeUpdated = array() ) { + + // get database connection + $dbConn = $GLOBALS['dbConn']; + + // performs update in the database + foreach($itemsToBeUpdated as $_fName => $_fVal) { + $dbConn->addValuePair($_fName, $_fVal); + } + + // perform update operation + $dbConn->update("radio_stream", "rid = '$rid'"); + } + /*** + * Delete an existing record: radio_stream + * @param rid + * @result void + **/ + function delete_radio_stream( $rid ) { + + // get database connection + $dbConn = $GLOBALS['dbConn']; + + // performs deletion of data + $dbConn->delete("radio_stream", "rid = '$rid'"); + } + /*** + * Retrived list of objects base on a given parameters: radio_stream + * @param conditionalStatement = '' + * @result collection of objects: radio_stream + **/ + function list_radio_stream( $conditionalStatement = '' ) { + + $dbConn = $GLOBALS['dbConn']; + // check if there is a given parameter list + if(!empty($conditionalStatement)) { + $sqlStatement = "SELECT * FROM radio_stream WHERE $conditionalStatement"; + } else { + $sqlStatement = "SELECT * FROM radio_stream"; + } + + // retrieve the values base on the query result + $__resObj = $dbConn->doQuery($sqlStatement); + + $__collectionOfObjects = array(); + foreach($__resObj as $__rs) + { + $__newObj = new radio_stream(); + + $__newObj->set_rid($__rs['rid']); + $__newObj->set_name($__rs['name']); + $__newObj->set_source($__rs['source']); + $__newObj->set_frequence($__rs['frequence']); + $__newObj->set_website($__rs['website']); + $__newObj->set_city($__rs['city']); + + // add object to collection + array_push($__collectionOfObjects, $__newObj); + } + + // return collection of objects + return $__collectionOfObjects; + } +} +?> \ No newline at end of file Added: XoopsModules/radiostrem/releases/1.01/radiostream/class/radio_stream.php =================================================================== --- XoopsModules/radiostrem/releases/1.01/radiostream/class/radio_stream.php (rev 0) +++ XoopsModules/radiostrem/releases/1.01/radiostream/class/radio_stream.php 2012-02-12 20:32:16 UTC (rev 8941) @@ -0,0 +1,163 @@ +<?php +/* + * Class Radio Stream + * + */ +class radio_stream +{ + var $db; + var $url; + var $table; + var $params; + var $attribs; + var $rid; + var $value; + var $size; + var $selected; + var $emptyselect; + + function radio_stream($rid, $value = null, $selected = '', $size = 1, $emptyselect = 0) + { + $this->db =& Database::getInstance(); + $this->table = $this->db->prefix("radio_stream_list"); + $this->rid = $rid; + $this->value = $value; + $this->selection = $selected; + $this->path = $path; + $this->size = intval($size); + $this->emptyselect = ($emptyselect) ? 0 : 1; + } + + function getObject($url, $width, $height) + { + echo '<object id="NSPlay" width="'.$width.'" height="'.$height.'" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" align="center">'; + echo $this->getParam(); + echo $this->getEmbed($url, $width, $height); + echo '</object>'; + } + /* + * Function get embedded line + */ + function getEmbed($url, $width, $height) + { + $tmp = ""; + $this->attribs = $this->getAttribs($url, $width, $height); + foreach($this->attribs as $name => $value) + { + $tmp .= " $name='$value'"; + } + return "<embed$tmp></embed>"; + } + /* + * Function get param + */ + function getParam() + ... [truncated message content] |
From: <txm...@us...> - 2012-02-15 12:38:07
|
Revision: 8987 http://xoops.svn.sourceforge.net/xoops/?rev=8987&view=rev Author: txmodxoops Date: 2012-02-15 12:37:57 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Module googleajaxsearch v1.05 Added Paths: ----------- XoopsModules/GoogleAJAXSearch/ XoopsModules/GoogleAJAXSearch/branches/ XoopsModules/GoogleAJAXSearch/releases/ XoopsModules/GoogleAJAXSearch/releases/1.05/ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/header.php XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/images/ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/images/googleajaxsearch_slogo.gif XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/images/googleajaxsearch_slogo.png XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/images/index.html XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/images/small-logo.png XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/images/x_googleajaxsearch_slogo.gif XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/index.php XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/language/ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/language/index.html XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/language/italian/ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/language/italian/index.html XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/language/italian/main.php XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/language/italian/modinfo.php XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/templates/ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/templates/googleajaxsearch.html XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/templates/index.html XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/templates/templates/ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/templates/templates/googleajaxsearch.html XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/templates/templates/index.html XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/xoops_version.php XoopsModules/GoogleAJAXSearch/trunk/ Added: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/header.php =================================================================== --- XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/header.php (rev 0) +++ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/header.php 2012-02-15 12:37:57 UTC (rev 8987) @@ -0,0 +1,8 @@ +<?php +// +// Author: timgno +// +include("../../mainfile.php"); +global $xoopsTpl; + +?> \ No newline at end of file Added: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/images/googleajaxsearch_slogo.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/images/googleajaxsearch_slogo.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/images/googleajaxsearch_slogo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/images/googleajaxsearch_slogo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/images/index.html =================================================================== --- XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/images/index.html (rev 0) +++ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/images/index.html 2012-02-15 12:37:57 UTC (rev 8987) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/images/small-logo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/images/small-logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/images/x_googleajaxsearch_slogo.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/images/x_googleajaxsearch_slogo.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/index.php =================================================================== --- XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/index.php (rev 0) +++ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/index.php 2012-02-15 12:37:57 UTC (rev 8987) @@ -0,0 +1,29 @@ +<?php +// +// Author: timgno +// +include("header.php"); +global $xoopsModuleConfig; +$xoopsOption['template_main'] = 'googleajaxsearch.html'; + +include(XOOPS_ROOT_PATH."/header.php"); +//keywords +$keywords .= $xoopsModule->name(); +$keywords = substr($keywords, 0); +$xoTheme->addMeta('meta', 'keywords', $keywords); +//description +$xoTheme->addMeta('meta', 'description', _MI_GAJAXS_DESC); +// change this code for your site +$key = "ABQIAAAA6UkYKHUJnPAIzXd6_fdTiBS7tAiSr1eAdhtZ3H52alp52Kjq3RSQkFMbj0LpaVFNEkupSc715QMZgQ"; + +$xoTheme->addScript('http://www.google.com/jsapi?key='.$key.''); + +$xoopsTpl->assign('search_text', $xoopsModuleConfig['search_text']); + +$xoopsTpl->assign('lang_title', _MD_GAJAXS_TITLE); +$xoopsTpl->assign('lang_slogan', _MD_GAJAXS_DESC); +$xoopsTpl->assign('lang_loading', _MD_GAJAXS_LOAD); + +include(XOOPS_ROOT_PATH."/footer.php"); + +?> \ No newline at end of file Added: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/language/index.html =================================================================== --- XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/language/index.html (rev 0) +++ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/language/index.html 2012-02-15 12:37:57 UTC (rev 8987) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/language/italian/index.html =================================================================== --- XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/language/italian/index.html (rev 0) +++ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/language/italian/index.html 2012-02-15 12:37:57 UTC (rev 8987) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/language/italian/main.php =================================================================== --- XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/language/italian/main.php (rev 0) +++ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/language/italian/main.php 2012-02-15 12:37:57 UTC (rev 8987) @@ -0,0 +1,9 @@ +<?php +// +// Author: timgno +// +define('_MD_GAJAXS_TITLE','Google AJAX Search'); +define('_MD_GAJAXS_DESC','Google Search for Video, Maps, Blogs and More...'); +define('_MD_GAJAXS_LOAD','Loading...'); + +?> \ No newline at end of file Added: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/language/italian/modinfo.php =================================================================== --- XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/language/italian/modinfo.php (rev 0) +++ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/language/italian/modinfo.php 2012-02-15 12:37:57 UTC (rev 8987) @@ -0,0 +1,10 @@ +<?php +// +// Author: timgno +// +define('_MI_GAJAXS_NAME','Google AJAX Search'); +define('_MI_GAJAXS_DESC','My Google AJAX Search API Application.'); +define('_MI_GAJAXS_GASTITLE','Preferenze campo testo'); +define('_MI_GAJAXS_GASDSC','Si pu\xF2 lasciare default, inserire un\'altra parola per iniziare nel campo di ricerca oppure lasciarlo vuoto.'); + +?> \ No newline at end of file Added: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/templates/googleajaxsearch.html =================================================================== --- XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/templates/googleajaxsearch.html (rev 0) +++ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/templates/googleajaxsearch.html 2012-02-15 12:37:57 UTC (rev 8987) @@ -0,0 +1,48 @@ +<div align="center"><br /><br /> + <div align="center"><{$lang_title}></div><br /><br /> + <div align="center"><{$lang_slogan}></div><br /><br /> +</div> + +<script language="Javascript" type="text/javascript"> +<!-- + //<![CDATA[ + + google.load("search", "1"); + + function OnLoad() { + // Create a search control + var searchControl = new google.search.SearchControl(); + + // Add in a full set of searchers + var localSearch = new google.search.LocalSearch(); + searchControl.addSearcher(localSearch); + searchControl.addSearcher(new google.search.WebSearch()); + searchControl.addSearcher(new google.search.VideoSearch()); + searchControl.addSearcher(new google.search.BlogSearch()); + + // Set the Local Search center point + localSearch.setCenterPoint("New York, NY"); + + // Tell the searcher to draw itself and tell it where to attach + searchControl.draw(document.getElementById("searchcontrol")); + + // Execute an inital search + searchControl.execute("<{$search_text}>"); + } + google.setOnLoadCallback(OnLoad); + + //]]> + //--> + </script> +<div id="searchcontrol"><{$lang_loading}></div> +<script type="text/javascript"><!-- +google_ad_client = "pub-3352884075259517"; +/* 300x250, creato 01/06/10 */ +google_ad_slot = "0630708941"; +google_ad_width = 300; +google_ad_height = 250; +//--> +</script> +<script type="text/javascript" +src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> +</script> \ No newline at end of file Added: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/templates/index.html =================================================================== --- XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/templates/index.html (rev 0) +++ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/templates/index.html 2012-02-15 12:37:57 UTC (rev 8987) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/templates/templates/googleajaxsearch.html =================================================================== --- XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/templates/templates/googleajaxsearch.html (rev 0) +++ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/templates/templates/googleajaxsearch.html 2012-02-15 12:37:57 UTC (rev 8987) @@ -0,0 +1,48 @@ +<div align="center"><br /><br /> + <div align="center"><{$lang_title}></div><br /><br /> + <div align="center"><{$lang_slogan}></div><br /><br /> +</div> + +<script language="Javascript" type="text/javascript"> +<!-- + //<![CDATA[ + + google.load("search", "1"); + + function OnLoad() { + // Create a search control + var searchControl = new google.search.SearchControl(); + + // Add in a full set of searchers + var localSearch = new google.search.LocalSearch(); + searchControl.addSearcher(localSearch); + searchControl.addSearcher(new google.search.WebSearch()); + searchControl.addSearcher(new google.search.VideoSearch()); + searchControl.addSearcher(new google.search.BlogSearch()); + + // Set the Local Search center point + localSearch.setCenterPoint("New York, NY"); + + // Tell the searcher to draw itself and tell it where to attach + searchControl.draw(document.getElementById("searchcontrol")); + + // Execute an inital search + searchControl.execute("<{$search_text}>"); + } + google.setOnLoadCallback(OnLoad); + + //]]> + //--> + </script> +<div id="searchcontrol"><{$lang_loading}></div> +<script type="text/javascript"><!-- +google_ad_client = "pub-3352884075259517"; +/* 300x250, creato 01/06/10 */ +google_ad_slot = "0630708941"; +google_ad_width = 300; +google_ad_height = 250; +//--> +</script> +<script type="text/javascript" +src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> +</script> \ No newline at end of file Added: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/templates/templates/index.html =================================================================== --- XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/templates/templates/index.html (rev 0) +++ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/templates/templates/index.html 2012-02-15 12:37:57 UTC (rev 8987) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/xoops_version.php =================================================================== --- XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/xoops_version.php (rev 0) +++ XoopsModules/GoogleAJAXSearch/releases/1.05/GoogleAJAXSearch/xoops_version.php 2012-02-15 12:37:57 UTC (rev 8987) @@ -0,0 +1,32 @@ +<?php +// +// Author: timgno +// +$modversion['name'] = _MI_GAJAXS_NAME; +$modversion['version'] = 1.05; +$modversion['description'] = _MI_GAJAXS_DESC; +$modversion['author'] = "timgno - http://www.txmodxoops.org/"; +$modversion['credits'] = "Google - http://code.google.com/apis/ajaxsearch/"; +$modversion['help'] = ""; +$modversion['license'] = "GPL see LICENSE"; +$modversion['official'] = 0; +$modversion['image'] = "images/googleajaxsearch_slogo.png"; +$modversion['dirname'] = "GoogleAJAXSearch"; + +$modversion['hasAdmin'] = 1; +$modversion['adminpath'] = ""; + +$modversion['hasMain'] = 1; + +// Templates +$modversion['templates'][1]['file'] = 'googleajaxsearch.html'; +$modversion['templates'][1]['description'] = ''; +// Config +$modversion['config'][1]['name'] = 'search_text'; +$modversion['config'][1]['title'] = '_MI_GAJAXS_GASTITLE'; +$modversion['config'][1]['description'] = '_MI_GAJAXS_GASDSC'; +$modversion['config'][1]['formtype'] = 'textbox'; +$modversion['config'][1]['valuetype'] = 'text'; +$modversion['config'][1]['default'] = 'moduli per xoops'; + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-02-15 12:42:56
|
Revision: 8988 http://xoops.svn.sourceforge.net/xoops/?rev=8988&view=rev Author: txmodxoops Date: 2012-02-15 12:42:42 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Module googledocsearch v1.01 Added Paths: ----------- XoopsModules/googledocssearch/ XoopsModules/googledocssearch/branches/ XoopsModules/googledocssearch/releases/ XoopsModules/googledocssearch/releases/1.01/ XoopsModules/googledocssearch/releases/1.01/googledocssearch/ XoopsModules/googledocssearch/releases/1.01/googledocssearch/header.php XoopsModules/googledocssearch/releases/1.01/googledocssearch/image.html XoopsModules/googledocssearch/releases/1.01/googledocssearch/image_files/ XoopsModules/googledocssearch/releases/1.01/googledocssearch/image_files/api XoopsModules/googledocssearch/releases/1.01/googledocssearch/image_files/default.js XoopsModules/googledocssearch/releases/1.01/googledocssearch/image_files/gsearch.css XoopsModules/googledocssearch/releases/1.01/googledocssearch/image_files/nocover.png XoopsModules/googledocssearch/releases/1.01/googledocssearch/image_files/small-logo.png XoopsModules/googledocssearch/releases/1.01/googledocssearch/images/ XoopsModules/googledocssearch/releases/1.01/googledocssearch/images/googledocssearch_slogo.png XoopsModules/googledocssearch/releases/1.01/googledocssearch/images/index.html XoopsModules/googledocssearch/releases/1.01/googledocssearch/images/nocover.png XoopsModules/googledocssearch/releases/1.01/googledocssearch/images/small-logo.png XoopsModules/googledocssearch/releases/1.01/googledocssearch/include/ XoopsModules/googledocssearch/releases/1.01/googledocssearch/include/api XoopsModules/googledocssearch/releases/1.01/googledocssearch/include/default.js XoopsModules/googledocssearch/releases/1.01/googledocssearch/index.php XoopsModules/googledocssearch/releases/1.01/googledocssearch/style/ XoopsModules/googledocssearch/releases/1.01/googledocssearch/style/gsearch.css XoopsModules/googledocssearch/releases/1.01/googledocssearch/style/style.css XoopsModules/googledocssearch/releases/1.01/googledocssearch/templates/ XoopsModules/googledocssearch/releases/1.01/googledocssearch/templates/Copia di googledocssearch.html XoopsModules/googledocssearch/releases/1.01/googledocssearch/templates/googleajaxsearch.html XoopsModules/googledocssearch/releases/1.01/googledocssearch/templates/googledocssearch.html XoopsModules/googledocssearch/releases/1.01/googledocssearch/templates/googledocssearch_my.html XoopsModules/googledocssearch/releases/1.01/googledocssearch/templates/googledocssearch_my.html.bak XoopsModules/googledocssearch/releases/1.01/googledocssearch/templates/index.html XoopsModules/googledocssearch/releases/1.01/googledocssearch/xoops_version.php XoopsModules/googledocssearch/trunk/ Added: XoopsModules/googledocssearch/releases/1.01/googledocssearch/header.php =================================================================== --- XoopsModules/googledocssearch/releases/1.01/googledocssearch/header.php (rev 0) +++ XoopsModules/googledocssearch/releases/1.01/googledocssearch/header.php 2012-02-15 12:42:42 UTC (rev 8988) @@ -0,0 +1,8 @@ +<?php +// +// Author: timgno +// +include("../../mainfile.php"); +global $xoopsTpl; + +?> \ No newline at end of file Added: XoopsModules/googledocssearch/releases/1.01/googledocssearch/image.html =================================================================== --- XoopsModules/googledocssearch/releases/1.01/googledocssearch/image.html (rev 0) +++ XoopsModules/googledocssearch/releases/1.01/googledocssearch/image.html 2012-02-15 12:42:42 UTC (rev 8988) @@ -0,0 +1,181 @@ +<html><head> + + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Image Search Control Sample</title><!-- + note: should be http://www.google.com/uds/api? and + http://www.google.com/uds/css/gsearch.css + --> + + + + <script src="image_files/api" type="text/javascript"></script><script src="image_files/default.js" type="text/javascript"></script> + <link href="image_files/gsearch.css" rel="stylesheet" type="text/css"> + + <style type="text/css"> + body, table, p{ + background-color: white; + font-family: Arial, sans-serif; + font-size: 13px; + } + + table.search-control { + width : 100%; + } + + table.search-control .gsc-control { + width : 100%; + } + + td.left { + width : 300px; + padding-right : 20px; + } + + td { + vertical-align : top; + } + + /* Disable built in search forms */ + .gsc-control form.gsc-search-box { + display : none; + } + + /* restrict global search form width */ + #searchForm { + width : 300px; + } + + #leftSearchControl .gsc-resultsRoot { + padding-top : 6px; + } + + /* for demonstration purposes ONLY. This is not ok by the terms */ + #rightSearchControl .gsc-ad-box { + display : none; + } + + /* long form visible urls should be on */ + .gsc-webResult div.gs-visibleUrl-long { + display : block; + } + + .gsc-webResult div.gs-visibleUrl-short { + display : none; + } + + + </style> + <script type="text/javascript"> + + // the se class encapsulates a left and right search control + // both controls are driven by a shared search form + function se() { + var sFormDiv = document.getElementById("searchForm"); + var leftScDiv = document.getElementById("leftSearchControl"); + var rightScDiv = document.getElementById("rightSearchControl"); + + // create a left, right search control + // create a custom search form + this.leftControl = new GSearchControl(); + this.rightControl = new GSearchControl(); + this.searchForm = new GSearchForm(true, sFormDiv); + + // bind clear and submit functions + this.searchForm.setOnSubmitCallback(this, se.prototype.onSubmit); + this.searchForm.setOnClearCallback(this, se.prototype.onClear); + + // set up for large result sets + this.leftControl.setResultSetSize(GSearch.LARGE_RESULTSET); + this.rightControl.setResultSetSize(GSearch.LARGE_RESULTSET); + + var searcher; + var options; + + // configure left control + // vertical layout, image and blog + this.leftControl.addSearcher(new GimageSearch()); + this.leftControl.addSearcher(new GvideoSearch()); + + // configure right control + // tabbed layout image, web, news, video + this.rightControl.addSearcher(new GimageSearch()); + this.rightControl.addSearcher(new GwebSearch()); + this.rightControl.addSearcher(new GnewsSearch()); + this.rightControl.addSearcher(new GblogSearch()); + this.rightControl.addSearcher(new GbookSearch()); + + var drawOptions = new GdrawOptions(); + drawOptions.setDrawMode(GSearchControl.DRAW_MODE_TABBED); + + this.rightControl.setNoResultsString(GSearchControl.NO_RESULTS_DEFAULT_STRING); + this.leftControl.setNoResultsString(GSearchControl.NO_RESULTS_DEFAULT_STRING); + this.leftControl.draw(leftScDiv); + this.rightControl.draw(rightScDiv, drawOptions); + + // execute a starter search + this.searchForm.execute("Ferrari"); + + } + + // when the form fires a submit, grab its + // value and call the left and right control + se.prototype.onSubmit = function(form) { + var q = form.input.value; + if (q && q!= "") { + this.leftControl.execute(q); + this.rightControl.execute(q); + } + return false; + } + + // when the form fires a clear, call the left and right control + se.prototype.onClear = function(form) { + this.leftControl.clearAllResults(); + this.rightControl.clearAllResults(); + form.input.value = ""; + return false; + } + + function OnLoad() { + new se(); + } + GSearch.setOnLoadCallback(OnLoad); + </script></head><body> + <div id="searchForm"><form accept-charset="utf-8" class="gsc-search-box"><table class="gsc-search-box" cellpadding="0" cellspacing="0"><tbody><tr><td class="gsc-input"><input title="ricerca" name="search" class="gsc-input" size="10" autocomplete="off" type="text"></td><td class="gsc-search-button"><input title="ricerca" class="gsc-search-button" value="Cerca" type="submit"></td><td class="gsc-clear-button"><div title="cancella i risultati" class="gsc-clear-button"> </div></td></tr></tbody></table><table class="gsc-branding" cellpadding="0" cellspacing="0"><tbody><tr><td class="gsc-branding-user-defined"></td><td class="gsc-branding-text"><div class="gsc-branding-text">powered by</div></td><td class="gsc-branding-img"><img class="gsc-branding-img" src="image_files/small-logo.png"></td></tr></tbody></table></form></div> + <table class="search-control"> + <tbody><tr><td class="left"> + <div id="leftSearchControl" class="search-control"><div class="gsc-control"><form accept-charset="utf-8" class="gsc-search-box"><table class="gsc-search-box" cellpadding="0" cellspacing="0"><tbody><tr><td class="gsc-input"><input title="ricerca" name="search" class="gsc-input" size="10" autocomplete="off" type="text"></td><td class="gsc-search-button"><input title="ricerca" class="gsc-search-button" value="Cerca" type="submit"></td><td class="gsc-clear-button"><div title="cancella i risultati" class="gsc-clear-button"> </div></td></tr></tbody></table><table class="gsc-branding" cellpadding="0" cellspacing="0"><tbody><tr><td class="gsc-branding-user-defined"></td><td class="gsc-branding-text"><div class="gsc-branding-text">powered by</div></td><td class="gsc-branding-img"><img class="gsc-branding-img" src="image_files/small-logo.png"></td></tr></tbody></table></form><div class="gsc-resultsbox-visible"><div class="gsc-resultsRoot"><table class="gsc-resultsHeader" cellpadding="0" cellspacing="0"><tbody><tr><td class="gsc-twiddleRegionCell gsc-twiddle-opened"><div class="gsc-twiddle"><div class="gsc-title">Immagine</div></div><div class="gsc-stats">(8)</div><div class="gsc-results-selector gsc-one-result-active"><div title="mostra un risultato" class="gsc-result-selector gsc-one-result"> </div><div title="mostra altri risultati" class="gsc-result-selector gsc-more-results"> </div><div title="mostra tutti i risultati" class="gsc-result-selector gsc-all-results"> </div></div></td><td class="gsc-configLabelCell"></td></tr></tbody></table><div style="display: block;" class="gsc-results gsc-imageResult"><div class="gsc-imageResult gsc-result"><div class="gs-imageResult gs-result"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://www.autoshopitalia.com/public/public/2006/10/art_15823_2_ferrari_01.jpg"><img title="art_15823_2_ferrari_01.jpg (www.autoshopitalia.com)" style="left: 0px;" class="gs-image" src="image_files/images_003.jpg" height="81" width="112"></a></div><div class="gs-text-box"><div title="Ferrari: concept car e trazione ..." class="gs-snippet"><b>Ferrari</b>: concept car e trazione <b>...</b></div><div class="gs-size">520 x 376</div><div title="www.autoshopitalia.com" class="gs-visibleUrl"><a target="_blank" class="gs-visibleUrl" href="http://www.autoshopitalia.com/tag/lamborghini/page/8/">www.autoshopitalia.com</a></div></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-imageResult gsc-result"><div class="gs-imageResult gs-result"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://pasquale2.files.wordpress.com/2007/02/michelle-ferrari.jpg"><img title="michelle-ferrari.jpg (pasquale2.wordpress.com)" style="left: 0px;" class="gs-image" src="image_files/images_002.jpg" height="84" width="112"></a></div><div class="gs-text-box"><div title="Michelle Ferrari" class="gs-snippet">Michelle <b>Ferrari</b></div><div class="gs-size">550 x 413</div><div title="pasquale2.wordpress.com" class="gs-visibleUrl"><a target="_blank" class="gs-visibleUrl" href="http://pasquale2.wordpress.com/2007/02/23/michelle-ferrari/">pasquale2.wordpress.com</a></div></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div style="display: none;" class="gsc-expansionArea"><div class="gsc-imageResult gsc-result"><div class="gs-imageResult gs-result"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://www.simoneercoli.com/immagini_wordpress/ferrari.jpg"><img title="ferrari.jpg (www.simoneercoli.com)" style="left: 0px;" class="gs-image" src="image_files/images_008.jpg" height="83" width="112"></a></div><div class="gs-text-box"><div title="Ferrari fashion" class="gs-snippet"><b>Ferrari</b> fashion</div><div class="gs-size">400 x 296</div><div title="www.simoneercoli.com" class="gs-visibleUrl"><a target="_blank" class="gs-visibleUrl" href="http://www.simoneercoli.com/category/cavolate-varie/">www.simoneercoli.com</a></div></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-imageResult gsc-result"><div class="gs-imageResult gs-result"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://www.calshop.biz/FERRARI.jpg"><img title="FERRARI.jpg (www.calshop.biz)" style="left: 0px;" class="gs-image" src="image_files/images.jpg" height="70" width="112"></a></div><div class="gs-text-box"><div title="FERRARI, ARRIVA LA NUOVA F430 SPIDER ..." class="gs-snippet"><b>FERRARI</b>, ARRIVA LA NUOVA F430 SPIDER <b>...</b></div><div class="gs-size">550 x 342</div><div title="www.calshop.biz" class="gs-visibleUrl"><a target="_blank" class="gs-visibleUrl" href="http://www.calshop.biz/ferrari_f430_spider.html">www.calshop.biz</a></div></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-imageResult gsc-result"><div class="gs-imageResult gs-result"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://www.mart.trento.it/UploadImgs/1182_Ferrari_F_40__1987___La_Presse_Ferrari_Spa.jpg"><img title="1182_Ferrari_F_40__1987___La_Presse_ ... (www.mart.trento.it)" style="left: 4px;" class="gs-image" src="image_files/images_007.jpg" height="84" width="104"></a></div><div class="gs-text-box"><div title="Ferrari F 40, 1987 © La Presse ..." class="gs-snippet"><b>Ferrari</b> F 40, 1987 © La Presse <b>...</b></div><div class="gs-size">4961 x 4000</div><div title="www.mart.trento.it" class="gs-visibleUrl"><a target="_blank" class="gs-visibleUrl" href="http://www.mart.trento.it/intranet_newsletter.jsp?area=42&ID_LINK=59&page=61">www.mart.trento.it</a></div></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-imageResult gsc-result"><div class="gs-imageResult gs-result"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://www.wallpaperez.net/wallpaper/car/Ferrari-612-Scaglietti-938.jpg"><img title="Ferrari-612-Scaglietti-938.jpg (www.wallpaperez.net)" style="left: 0px;" class="gs-image" src="image_files/images_006.jpg" height="70" width="112"></a></div><div class="gs-text-box"><div title="Tutte sfondi con Ferrari" class="gs-snippet">Tutte sfondi con <b>Ferrari</b></div><div class="gs-size">1920 x 1200</div><div title="www.wallpaperez.net" class="gs-visibleUrl"><a target="_blank" class="gs-visibleUrl" href="http://www.wallpaperez.net/it/car/Ferrari-612-Scaglietti-938.html">www.wallpaperez.net</a></div></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-imageResult gsc-result"><div class="gs-imageResult gs-result"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://portfolio.tirolle.net/fichiers/Wallpapers/20060619/Ferrari_FXX.jpg"><img title="Ferrari_FXX.jpg (donbosco94.wordpress.com)" style="left: 0px;" class="gs-image" src="image_files/images_004.jpg" height="84" width="112"></a></div><div class="gs-text-box"><div title="Ferrari FXX" class="gs-snippet"><b>Ferrari</b> FXX</div><div class="gs-size">1024 x 768</div><div title="donbosco94.wordpress.com" class="gs-visibleUrl"><a target="_blank" class="gs-visibleUrl" href="http://donbosco94.wordpress.com/2007/12/17/ferrari-fxx-lauto-stradale-da-f1/">donbosco94.wordpress.com</a></div></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-imageResult gsc-result"><div class="gs-imageResult gs-result"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://www.radio.rai.it/radiorai/online/ev_images/ferrari3.jpg"><img title="ferrari3.jpg (www.radio.rai.it)" style="left: 14px;" class="gs-image" src="image_files/images_005.jpg" height="84" width="84"></a></div><div class="gs-text-box"><div title="LA FERRARI: UN MITO ITALIANO" class="gs-snippet">LA <b>FERRARI</b>: UN MITO ITALIANO</div><div class="gs-size">300 x 300</div><div title="www.radio.rai.it" class="gs-visibleUrl"><a target="_blank" class="gs-visibleUrl" href="http://www.radio.rai.it/radio3/view.cfm?Q_EV_ID=154122&Q_PROG_ID=502">www.radio.rai.it</a></div></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-cursor-box"><div class="gsc-cursor"><div class="gsc-cursor-page gsc-cursor-current-page">1</div><div class="gsc-cursor-page">2</div><div class="gsc-cursor-page">3</div><div class="gsc-cursor-page">4</div></div><div class="gsc-trailing-more-results"><a target="_blank" class="gsc-trailing-more-results" href="http://www.google.com/images?oe=utf8&ie=utf8&source=uds&start=0&hl=it&q=Ferrari">Altri risultati »</a></div></div></div></div></div><div class="gsc-resultsRoot"><table class="gsc-resultsHeader" cellpadding="0" cellspacing="0"><tbody><tr><td class="gsc-twiddleRegionCell gsc-twiddle-opened"><div class="gsc-twiddle"><div class="gsc-title">Video</div></div><div class="gsc-stats">(8)</div><div class="gsc-results-selector gsc-one-result-active"><div title="mostra un risultato" class="gsc-result-selector gsc-one-result"> </div><div title="mostra altri risultati" class="gsc-result-selector gsc-more-results"> </div><div title="mostra tutti i risultati" class="gsc-result-selector gsc-all-results"> </div></div></td><td class="gsc-configLabelCell"><span title="impostazioni" class="gsc-configLabel gsc-twiddle-closed"> </span></td></tr></tbody></table><div style="display: none;" class="gsc-config gsc-videoConfig"><form class="gsc-config gsc-videoConfig"></form></div><div style="display: block;" class="gsc-results gsc-videoResult"><div class="gsc-videoResult gsc-result"><div class="gs-videoResult gs-result"><table cellpadding="0" cellspacing="0"><tbody><tr><td class="gs-image-box"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://video.google.com/url?docid=8457042397326651981&esrc=rss_uds&ev=v&len=38&q=Ferrari+%28site%3Avideo.google.com+OR+site%3Ayoutube.com%29&srcurl=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdV1zQMcSsk0&vidurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D8457042397326651981%26q%3DFerrari%2B%2528site%253Avideo.google.com%2BOR%2Bsite%253Ayoutube.com%2529%26hl%3Dit&usg=AL29H23EuwVh13NY6XDfwuZKc4kHjYxogw"><img class="gs-image" src="image_files/2_002.jpg" height="75" width="100"></a></div></td><td class="gs-text-box"><div class="gs-text-box"><div class="gs-title"><a target="_blank" class="gs-title" href="http://video.google.com/url?docid=8457042397326651981&esrc=rss_uds&ev=v&len=38&q=Ferrari+%28site%3Avideo.google.com+OR+site%3Ayoutube.com%29&srcurl=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdV1zQMcSsk0&vidurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D8457042397326651981%26q%3DFerrari%2B%2528site%253Avideo.google.com%2BOR%2Bsite%253Ayoutube.com%2529%26hl%3Dit&usg=AL29H23EuwVh13NY6XDfwuZKc4kHjYxogw">Smart Fortwo Diablo vs Ferrari F430</a></div><div class="gs-snippet">1/4 +mile drag race between a Ferrari F430 and a Smart Fortwo Diablo fitted +with a 180Hp Suzuki GSXR 1000 engine. And no, the Ferrari didn' win...</div><div class="gs-publishedDate">08 Set 2006</div><div class="gs-publisher"><a target="_blank" class="gs-publisher" href="http://www.youtube.com/">www.youtube.com</a></div></div></td></tr></tbody></table><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div style="display: none;" class="gsc-expansionArea"><div class="gsc-videoResult gsc-result"><div class="gs-videoResult gs-result"><table cellpadding="0" cellspacing="0"><tbody><tr><td class="gs-image-box"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://video.google.com/url?docid=7340970731095838614&esrc=rss_uds&ev=v&len=290&q=Ferrari+%28site%3Avideo.google.com+OR+site%3Ayoutube.com%29&srcurl=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DZeBd_F2Bz5Y&vidurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D7340970731095838614%26q%3DFerrari%2B%2528site%253Avideo.google.com%2BOR%2Bsite%253Ayoutube.com%2529%26hl%3Dit&usg=AL29H22ZGjvqygj3h1Svey1HLVwBJ4d72Q"><img class="gs-image" src="image_files/2.jpg" height="75" width="100"></a></div></td><td class="gs-text-box"><div class="gs-text-box"><div class="gs-title"><a target="_blank" class="gs-title" href="http://video.google.com/url?docid=7340970731095838614&esrc=rss_uds&ev=v&len=290&q=Ferrari+%28site%3Avideo.google.com+OR+site%3Ayoutube.com%29&srcurl=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DZeBd_F2Bz5Y&vidurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D7340970731095838614%26q%3DFerrari%2B%2528site%253Avideo.google.com%2BOR%2Bsite%253Ayoutube.com%2529%26hl%3Dit&usg=AL29H22ZGjvqygj3h1Svey1HLVwBJ4d72Q">Ferrari vs. Lamborghini</a></div><div class="gs-snippet">This is a video my brother made of two of Italy's finest supercar makers, Ferrari and Lamborghini + +The song is called "Dread Rock" by Paul Oakenfold ...</div><div class="gs-publishedDate">09 Nov 2006</div><div class="gs-publisher"><a target="_blank" class="gs-publisher" href="http://www.youtube.com/">www.youtube.com</a></div></div></td></tr></tbody></table><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-videoResult gsc-result"><div class="gs-videoResult gs-result"><table cellpadding="0" cellspacing="0"><tbody><tr><td class="gs-image-box"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://video.google.com/url?docid=5670591497274292054&esrc=rss_uds&ev=v&len=112&q=Ferrari+%28site%3Avideo.google.com+OR+site%3Ayoutube.com%29&srcurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D5670591497274292054&vidurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D5670591497274292054%26q%3DFerrari%2B%2528site%253Avideo.google.com%2BOR%2Bsite%253Ayoutube.com%2529%26hl%3Dit&usg=AL29H22aEFmVou-cK08mmIHRZBHyPuYweg"><img class="gs-image" src="image_files/ThumbnailServer2_002.jpg" height="75" width="100"></a></div></td><td class="gs-text-box"><div class="gs-text-box"><div class="gs-title"><a target="_blank" class="gs-title" href="http://video.google.com/url?docid=5670591497274292054&esrc=rss_uds&ev=v&len=112&q=Ferrari+%28site%3Avideo.google.com+OR+site%3Ayoutube.com%29&srcurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D5670591497274292054&vidurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D5670591497274292054%26q%3DFerrari%2B%2528site%253Avideo.google.com%2BOR%2Bsite%253Ayoutube.com%2529%26hl%3Dit&usg=AL29H22aEFmVou-cK08mmIHRZBHyPuYweg">Lamborghini vs Ferrari</a></div><div class="gs-snippet">Compilation of Lamborghini vs Ferrari. Include a Ferrari F430, Enzo, Modena Novitec, Testarossa and a Diablo. + +More exotics on www.Gumball3000blog.com</div><div class="gs-publishedDate">29 Dic 2005</div><div class="gs-publisher"><a target="_blank" class="gs-publisher" href="http://video.google.com/">video.google.com</a></div></div></td></tr></tbody></table><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-videoResult gsc-result"><div class="gs-videoResult gs-result"><table cellpadding="0" cellspacing="0"><tbody><tr><td class="gs-image-box"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://video.google.com/url?docid=8759279851765339288&esrc=rss_uds&ev=v&len=52&q=Ferrari+%28site%3Avideo.google.com+OR+site%3Ayoutube.com%29&srcurl=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DeY82ndS1lJg&vidurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D8759279851765339288%26q%3DFerrari%2B%2528site%253Avideo.google.com%2BOR%2Bsite%253Ayoutube.com%2529%26hl%3Dit&usg=AL29H23VfNt7xJ3QgrPrz0KxA3l1ebyPTw"><img class="gs-image" src="image_files/2_004.jpg" height="75" width="100"></a></div></td><td class="gs-text-box"><div class="gs-text-box"><div class="gs-title"><a target="_blank" class="gs-title" href="http://video.google.com/url?docid=8759279851765339288&esrc=rss_uds&ev=v&len=52&q=Ferrari+%28site%3Avideo.google.com+OR+site%3Ayoutube.com%29&srcurl=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DeY82ndS1lJg&vidurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D8759279851765339288%26q%3DFerrari%2B%2528site%253Avideo.google.com%2BOR%2Bsite%253Ayoutube.com%2529%26hl%3Dit&usg=AL29H23VfNt7xJ3QgrPrz0KxA3l1ebyPTw">Novitec Ferrari F430 Bi-Compressor</a></div><div class="gs-snippet">0 to 250km/h More- http://carscoop.blogspot.com/2007/04/2008-novitec-ferrari-f430-bi-compressor.html</div><div class="gs-publishedDate">15 Apr 2007</div><div class="gs-publisher"><a target="_blank" class="gs-publisher" href="http://www.youtube.com/">www.youtube.com</a></div></div></td></tr></tbody></table><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-videoResult gsc-result"><div class="gs-videoResult gs-result"><table cellpadding="0" cellspacing="0"><tbody><tr><td class="gs-image-box"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://video.google.com/url?docid=-7320960375181402397&esrc=rss_uds&ev=v&len=198&q=Ferrari+%28site%3Avideo.google.com+OR+site%3Ayoutube.com%29&srcurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D-7320960375181402397&vidurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D-7320960375181402397%26q%3DFerrari%2B%2528site%253Avideo.google.com%2BOR%2Bsite%253Ayoutube.com%2529%26hl%3Dit&usg=AL29H21QQQUrx0eqi9yLUDie8sOslONuLg"><img class="gs-image" src="image_files/ThumbnailServer2_003.jpg" height="75" width="100"></a></div></td><td class="gs-text-box"><div class="gs-text-box"><div class="gs-title"><a target="_blank" class="gs-title" href="http://video.google.com/url?docid=-7320960375181402397&esrc=rss_uds&ev=v&len=198&q=Ferrari+%28site%3Avideo.google.com+OR+site%3Ayoutube.com%29&srcurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D-7320960375181402397&vidurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D-7320960375181402397%26q%3DFerrari%2B%2528site%253Avideo.google.com%2BOR%2Bsite%253Ayoutube.com%2529%26hl%3Dit&usg=AL29H21QQQUrx0eqi9yLUDie8sOslONuLg">F1 vs Ferrari vs Fiat</a></div><div class="gs-snippet">Three cars race against each other but the Fiat and the Ferrari 360 Modena are both given headstarts against the Formula 1.</div><div class="gs-publishedDate">31 Mag 2006</div><div class="gs-publisher"><a target="_blank" class="gs-publisher" href="http://video.google.com/">video.google.com</a></div></div></td></tr></tbody></table><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-videoResult gsc-result"><div class="gs-videoResult gs-result"><table cellpadding="0" cellspacing="0"><tbody><tr><td class="gs-image-box"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://video.google.com/url?docid=-299742401666629304&esrc=rss_uds&ev=v&len=105&q=Ferrari+%28site%3Avideo.google.com+OR+site%3Ayoutube.com%29&srcurl=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D-9cZ37CJwUg&vidurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D-299742401666629304%26q%3DFerrari%2B%2528site%253Avideo.google.com%2BOR%2Bsite%253Ayoutube.com%2529%26hl%3Dit&usg=AL29H231y9XyVi-qs7lDKBwaCKlhfnPyyg"><img class="gs-image" src="image_files/2_005.jpg" height="75" width="100"></a></div></td><td class="gs-text-box"><div class="gs-text-box"><div class="gs-title"><a target="_blank" class="gs-title" href="http://video.google.com/url?docid=-299742401666629304&esrc=rss_uds&ev=v&len=105&q=Ferrari+%28site%3Avideo.google.com+OR+site%3Ayoutube.com%29&srcurl=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D-9cZ37CJwUg&vidurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D-299742401666629304%26q%3DFerrari%2B%2528site%253Avideo.google.com%2BOR%2Bsite%253Ayoutube.com%2529%26hl%3Dit&usg=AL29H231y9XyVi-qs7lDKBwaCKlhfnPyyg">FERRARI ENZO Vs. CAMARO AND MUSTANG!</a></div><div class="gs-snippet">On a sunny highway, Camaro starts screwing around with a Enzo. + +POST SPAM AND YOU WILL BE REPORTED, YOUR POST DELETED</div><div class="gs-publishedDate">01 Mag 2006</div><div class="gs-publisher"><a target="_blank" class="gs-publisher" href="http://www.youtube.com/">www.youtube.com</a></div></div></td></tr></tbody></table><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-videoResult gsc-result"><div class="gs-videoResult gs-result"><table cellpadding="0" cellspacing="0"><tbody><tr><td class="gs-image-box"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://video.google.com/url?docid=2042433800110624616&esrc=rss_uds&ev=v&len=90&q=Ferrari+%28site%3Avideo.google.com+OR+site%3Ayoutube.com%29&srcurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D2042433800110624616&vidurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D2042433800110624616%26q%3DFerrari%2B%2528site%253Avideo.google.com%2BOR%2Bsite%253Ayoutube.com%2529%26hl%3Dit&usg=AL29H23xzd1GEi-k2bjPUFKN_OSd_ISttA"><img class="gs-image" src="image_files/ThumbnailServer2.jpg" height="75" width="100"></a></div></td><td class="gs-text-box"><div class="gs-text-box"><div class="gs-title"><a target="_blank" class="gs-title" href="http://video.google.com/url?docid=2042433800110624616&esrc=rss_uds&ev=v&len=90&q=Ferrari+%28site%3Avideo.google.com+OR+site%3Ayoutube.com%29&srcurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D2042433800110624616&vidurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D2042433800110624616%26q%3DFerrari%2B%2528site%253Avideo.google.com%2BOR%2Bsite%253Ayoutube.com%2529%26hl%3Dit&usg=AL29H23xzd1GEi-k2bjPUFKN_OSd_ISttA">evo vs ferrari</a></div><div class="gs-snippet">evo spanks a ferrari</div><div class="gs-publishedDate">15 Apr 2005</div><div class="gs-publisher"><a target="_blank" class="gs-publisher" href="http://video.google.com/">video.google.com</a></div></div></td></tr></tbody></table><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-videoResult gsc-result"><div class="gs-videoResult gs-result"><table cellpadding="0" cellspacing="0"><tbody><tr><td class="gs-image-box"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://video.google.com/url?docid=480386691536327252&esrc=rss_uds&ev=v&len=147&q=Ferrari+%28site%3Avideo.google.com+OR+site%3Ayoutube.com%29&srcurl=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DBqqtJpfZElQ&vidurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D480386691536327252%26q%3DFerrari%2B%2528site%253Avideo.google.com%2BOR%2Bsite%253Ayoutube.com%2529%26hl%3Dit&usg=AL29H2186304YCgzIcxhlrXndZnWrsXOjw"><img class="gs-image" src="image_files/2_003.jpg" height="75" width="100"></a></div></td><td class="gs-text-box"><div class="gs-text-box"><div class="gs-title"><a target="_blank" class="gs-title" href="http://video.google.com/url?docid=480386691536327252&esrc=rss_uds&ev=v&len=147&q=Ferrari+%28site%3Avideo.google.com+OR+site%3Ayoutube.com%29&srcurl=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DBqqtJpfZElQ&vidurl=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D480386691536327252%26q%3DFerrari%2B%2528site%253Avideo.google.com%2BOR%2Bsite%253Ayoutube.com%2529%26hl%3Dit&usg=AL29H2186304YCgzIcxhlrXndZnWrsXOjw">Electric car vs Ferrari</a></div><div class="gs-snippet">Electric car vs Ferrari</div><div class="gs-publishedDate">11 Set 2006</div><div class="gs-publisher"><a target="_blank" class="gs-publisher" href="http://www.youtube.com/">www.youtube.com</a></div></div></td></tr></tbody></table><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-cursor-box"><div class="gsc-cursor"><div class="gsc-cursor-page gsc-cursor-current-page">1</div><div class="gsc-cursor-page">2</div><div class="gsc-cursor-page">3</div><div class="gsc-cursor-page">4</div></div><div class="gsc-trailing-more-results"><a target="_blank" class="gsc-trailing-more-results" href="http://video.google.com/videosearch?source=uds&hl=it&type=search&q=Ferrari+%28site%3Avideo.google.com+OR+site%3Ayoutube.com%29&start=0">Altri risultati »</a></div></div></div></div></div></div></div></div> + </td> + <td class="right"> + <div id="rightSearchControl" class="search-control"><div class="gsc-control"><form accept-charset="utf-8" class="gsc-search-box"><table class="gsc-search-box" cellpadding="0" cellspacing="0"><tbody><tr><td class="gsc-input"><input title="ricerca" name="search" class="gsc-input" size="10" autocomplete="off" type="text"></td><td class="gsc-search-button"><input title="ricerca" class="gsc-search-button" value="Cerca" type="submit"></td><td class="gsc-clear-button"><div title="cancella i risultati" class="gsc-clear-button"> </div></td></tr></tbody></table><table class="gsc-branding" cellpadding="0" cellspacing="0"><tbody><tr><td class="gsc-branding-user-defined"></td><td class="gsc-branding-text"><div class="gsc-branding-text">powered by</div></td><td class="gsc-branding-img"><img class="gsc-branding-img" src="image_files/small-logo.png"></td></tr></tbody></table></form><div class="gsc-tabsArea"><div class="gsc-tabHeader gsc-tabhActive">Immagine</div><span class="gs-spacer"> </span><div class="gsc-tabHeader gsc-tabhInactive">Web</div><span class="gs-spacer"> </span><div class="gsc-tabHeader gsc-tabhInactive">News</div><span class="gs-spacer"> </span><div class="gsc-tabHeader gsc-tabhInactive">Blog</div><span class="gs-spacer"> </span><div class="gsc-tabHeader gsc-tabhInactive">Libri</div><span class="gs-spacer"> </span></div><div class="gsc-resultsbox-visible"><div class="gsc-resultsRoot gsc-tabData gsc-tabdActive"><table class="gsc-resultsHeader" cellpadding="0" cellspacing="0"><tbody><tr><td class="gsc-twiddleRegionCell gsc-twiddle-opened"><div class="gsc-twiddle"><div class="gsc-title">Immagine</div></div><div class="gsc-stats">(8)</div><div class="gsc-results-selector gsc-all-results-active"><div title="mostra un risultato" class="gsc-result-selector gsc-one-result"> </div><div title="mostra altri risultati" class="gsc-result-selector gsc-more-results"> </div><div title="mostra tutti i risultati" class="gsc-result-selector gsc-all-results"> </div></div></td><td class="gsc-configLabelCell"></td></tr></tbody></table><div style="display: block;" class="gsc-results gsc-imageResult"><div class="gsc-imageResult gsc-result"><div class="gs-imageResult gs-result"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://www.autoshopitalia.com/public/public/2006/10/art_15823_2_ferrari_01.jpg"><img title="art_15823_2_ferrari_01.jpg (www.autoshopitalia.com)" style="left: 0px;" class="gs-image" src="image_files/images_003.jpg" height="81" width="112"></a></div><div class="gs-text-box"><div title="Ferrari: concept car e trazione ..." class="gs-snippet"><b>Ferrari</b>: concept car e trazione <b>...</b></div><div class="gs-size">520 x 376</div><div title="www.autoshopitalia.com" class="gs-visibleUrl"><a target="_blank" class="gs-visibleUrl" href="http://www.autoshopitalia.com/tag/lamborghini/page/8/">www.autoshopitalia.com</a></div></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-imageResult gsc-result"><div class="gs-imageResult gs-result"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://pasquale2.files.wordpress.com/2007/02/michelle-ferrari.jpg"><img title="michelle-ferrari.jpg (pasquale2.wordpress.com)" style="left: 0px;" class="gs-image" src="image_files/images_002.jpg" height="84" width="112"></a></div><div class="gs-text-box"><div title="Michelle Ferrari" class="gs-snippet">Michelle <b>Ferrari</b></div><div class="gs-size">550 x 413</div><div title="pasquale2.wordpress.com" class="gs-visibleUrl"><a target="_blank" class="gs-visibleUrl" href="http://pasquale2.wordpress.com/2007/02/23/michelle-ferrari/">pasquale2.wordpress.com</a></div></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-expansionArea"><div class="gsc-imageResult gsc-result"><div class="gs-imageResult gs-result"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://www.simoneercoli.com/immagini_wordpress/ferrari.jpg"><img title="ferrari.jpg (www.simoneercoli.com)" style="left: 0px;" class="gs-image" src="image_files/images_008.jpg" height="83" width="112"></a></div><div class="gs-text-box"><div title="Ferrari fashion" class="gs-snippet"><b>Ferrari</b> fashion</div><div class="gs-size">400 x 296</div><div title="www.simoneercoli.com" class="gs-visibleUrl"><a target="_blank" class="gs-visibleUrl" href="http://www.simoneercoli.com/category/cavolate-varie/">www.simoneercoli.com</a></div></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-imageResult gsc-result"><div class="gs-imageResult gs-result"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://www.calshop.biz/FERRARI.jpg"><img title="FERRARI.jpg (www.calshop.biz)" style="left: 0px;" class="gs-image" src="image_files/images.jpg" height="70" width="112"></a></div><div class="gs-text-box"><div title="FERRARI, ARRIVA LA NUOVA F430 SPIDER ..." class="gs-snippet"><b>FERRARI</b>, ARRIVA LA NUOVA F430 SPIDER <b>...</b></div><div class="gs-size">550 x 342</div><div title="www.calshop.biz" class="gs-visibleUrl"><a target="_blank" class="gs-visibleUrl" href="http://www.calshop.biz/ferrari_f430_spider.html">www.calshop.biz</a></div></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-imageResult gsc-result"><div class="gs-imageResult gs-result"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://www.mart.trento.it/UploadImgs/1182_Ferrari_F_40__1987___La_Presse_Ferrari_Spa.jpg"><img title="1182_Ferrari_F_40__1987___La_Presse_ ... (www.mart.trento.it)" style="left: 4px;" class="gs-image" src="image_files/images_007.jpg" height="84" width="104"></a></div><div class="gs-text-box"><div title="Ferrari F 40, 1987 © La Presse ..." class="gs-snippet"><b>Ferrari</b> F 40, 1987 © La Presse <b>...</b></div><div class="gs-size">4961 x 4000</div><div title="www.mart.trento.it" class="gs-visibleUrl"><a target="_blank" class="gs-visibleUrl" href="http://www.mart.trento.it/intranet_newsletter.jsp?area=42&ID_LINK=59&page=61">www.mart.trento.it</a></div></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-imageResult gsc-result"><div class="gs-imageResult gs-result"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://www.wallpaperez.net/wallpaper/car/Ferrari-612-Scaglietti-938.jpg"><img title="Ferrari-612-Scaglietti-938.jpg (www.wallpaperez.net)" style="left: 0px;" class="gs-image" src="image_files/images_006.jpg" height="70" width="112"></a></div><div class="gs-text-box"><div title="Tutte sfondi con Ferrari" class="gs-snippet">Tutte sfondi con <b>Ferrari</b></div><div class="gs-size">1920 x 1200</div><div title="www.wallpaperez.net" class="gs-visibleUrl"><a target="_blank" class="gs-visibleUrl" href="http://www.wallpaperez.net/it/car/Ferrari-612-Scaglietti-938.html">www.wallpaperez.net</a></div></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-imageResult gsc-result"><div class="gs-imageResult gs-result"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://portfolio.tirolle.net/fichiers/Wallpapers/20060619/Ferrari_FXX.jpg"><img title="Ferrari_FXX.jpg (donbosco94.wordpress.com)" style="left: 0px;" class="gs-image" src="image_files/images_004.jpg" height="84" width="112"></a></div><div class="gs-text-box"><div title="Ferrari FXX" class="gs-snippet"><b>Ferrari</b> FXX</div><div class="gs-size">1024 x 768</div><div title="donbosco94.wordpress.com" class="gs-visibleUrl"><a target="_blank" class="gs-visibleUrl" href="http://donbosco94.wordpress.com/2007/12/17/ferrari-fxx-lauto-stradale-da-f1/">donbosco94.wordpress.com</a></div></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-imageResult gsc-result"><div class="gs-imageResult gs-result"><div class="gs-image-box"><a class="gs-image" target="_blank" href="http://www.radio.rai.it/radiorai/online/ev_images/ferrari3.jpg"><img title="ferrari3.jpg (www.radio.rai.it)" style="left: 14px;" class="gs-image" src="image_files/images_005.jpg" height="84" width="84"></a></div><div class="gs-text-box"><div title="LA FERRARI: UN MITO ITALIANO" class="gs-snippet">LA <b>FERRARI</b>: UN MITO ITALIANO</div><div class="gs-size">300 x 300</div><div title="www.radio.rai.it" class="gs-visibleUrl"><a target="_blank" class="gs-visibleUrl" href="http://www.radio.rai.it/radio3/view.cfm?Q_EV_ID=154122&Q_PROG_ID=502">www.radio.rai.it</a></div></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-cursor-box"><div class="gsc-cursor"><div class="gsc-cursor-page gsc-cursor-current-page">1</div><div class="gsc-cursor-page">2</div><div class="gsc-cursor-page">3</div><div class="gsc-cursor-page">4</div></div><div class="gsc-trailing-more-results"><a target="_blank" class="gsc-trailing-more-results" href="http://www.google.com/images?oe=utf8&ie=utf8&source=uds&start=0&hl=it&q=Ferrari">Altri risultati »</a></div></div></div></div></div><div class="gsc-resultsRoot gsc-tabData gsc-tabdInactive"><table class="gsc-resultsHeader" cellpadding="0" cellspacing="0"><tbody><tr><td class="gsc-twiddleRegionCell gsc-twiddle-opened"><div class="gsc-twiddle"><div class="gsc-title">Web</div></div><div class="gsc-stats">(8)</div><div class="gsc-results-selector gsc-all-results-active"><div title="mostra un risultato" class="gsc-result-selector gsc-one-result"> </div><div title="mostra altri risultati" class="gsc-result-selector gsc-more-results"> </div><div title="mostra tutti i risultati" class="gsc-result-selector gsc-all-results"> </div></div></td><td class="gsc-configLabelCell"></td></tr></tbody></table><div style="display: block;" class="gsc-results gsc-webResult"><div class="gsc-webResult gsc-result"><div class="gs-webResult gs-result"><div class="gs-title"><a target="_blank" class="gs-title" href="http://www.ferrariworld.com/"><b>Ferrari</b> World</a></div><div class="gs-snippet">La storia di un mito italiano, le vetture, le competizioni e gli eventi, gli oggetti e il Club <b>Ferrari</b>, lo spazio dei tifosi della Rossa e dei suoi piloti, <b>...</b></div><div class="gs-visibleUrl gs-visibleUrl-short">www.ferrariworld.com</div><div class="gs-visibleUrl gs-visibleUrl-long">www.ferrariworld.com/</div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-expansionArea"><div class="gsc-webResult gsc-result"><div class="gs-webResult gs-result"><div class="gs-title"><a target="_blank" class="gs-title" href="http://www.ferrariworld.com/FWorld/fw/index.jsp"><b>Ferrari</b> World – Il sito ufficiale <b>Ferrari</b></a></div><div class="gs-snippet">The official <b>Ferrari</b> international website. Includes news, information on new models, photo galleries and Racing details.</div><div class="gs-visibleUrl gs-visibleUrl-short">www.ferrariworld.com</div><div class="gs-visibleUrl gs-visibleUrl-long">www.ferrariworld.com/FWorld/fw/index.jsp</div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-webResult gsc-result"><div class="gs-webResult gs-result"><div class="gs-title"><a target="_blank" class="gs-title" href="http://it.wikipedia.org/wiki/Ferrari"><b>Ferrari</b> - Wikipedia</a></div><div class="gs-snippet">La <b>Ferrari</b> SpA è una casa automobilistica italiana tra le più famose al mondo. È stata fondata da Enzo <b>Ferrari</b> e produce autovetture sportive d'alta fascia <b>...</b></div><div class="gs-visibleUrl gs-visibleUrl-short">it.wikipedia.org</div><div class="gs-visibleUrl gs-visibleUrl-long">it.wikipedia.org/wiki/Ferrari</div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-webResult gsc-result"><div class="gs-webResult gs-result"><div class="gs-title"><a target="_blank" class="gs-title" href="http://it.wikipedia.org/wiki/Scuderia_Ferrari">Scuderia <b>Ferrari</b> - Wikipedia</a></div><div class="gs-snippet">La Scuderia <b>Ferrari</b> è la sezione sportiva della Casa automobilistica <b>Ferrari</b>. Esistente fin dal 1930 ma costituitasi in ragione sociale dal 1947, <b>...</b></div><div class="gs-visibleUrl gs-visibleUrl-short">it.wikipedia.org</div><div class="gs-visibleUrl gs-visibleUrl-long">it.wikipedia.org/wiki/Scuderia_Ferrari</div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-webResult gsc-result"><div class="gs-webResult gs-result"><div class="gs-title"><a target="_blank" class="gs-title" href="http://www.galleria.ferrari.com/"><b>Ferrari</b> World: the official website dedicated to the Galleria <b>Ferrari</b></a></div><div class="gs-snippet">The official <b>Ferrari</b> website dedicated to the Galleria <b>Ferrari</b>. Includes news, exhibitions, timetables, cars exhibited description and informations about <b>...</b></div><div class="gs-visibleUrl gs-visibleUrl-short">www.galleria.ferrari.com</div><div class="gs-visibleUrl gs-visibleUrl-long">www.galleria.ferrari.com/</div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-webResult gsc-result"><div class="gs-webResult gs-result"><div class="gs-title"><a target="_blank" class="gs-title" href="http://www.ferrariusa.com/"><b>Ferrari</b> North America</a></div><div class="gs-snippet"></div><div class="gs-visibleUrl gs-visibleUrl-short">www.ferrariusa.com</div><div class="gs-visibleUrl gs-visibleUrl-long">www.ferrariusa.com/</div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-webResult gsc-result"><div class="gs-webResult gs-result"><div class="gs-title"><a target="_blank" class="gs-title" href="http://www.cantineferrari.it/">Cantine <b>Ferrari</b></a></div><div class="gs-snippet">cantine <b>ferrari</b>, spumante <b>ferrari</b>. <b>...</b> <b>Ferrari</b> f.lli Lunelli S.p.A. | P.I. 00123890220 | site map.</div><div class="gs-visibleUrl gs-visibleUrl-short">www.cantineferrari.it</div><div class="gs-visibleUrl gs-visibleUrl-long">www.cantineferrari.it/</div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-webResult gsc-result"><div class="gs-webResult gs-result"><div class="gs-title"><a target="_blank" class="gs-title" href="http://www.f2008.it/">New F2008</a></div><div class="gs-snippet"><b>Ferrari</b> F1 2008.</div><div class="gs-visibleUrl gs-visibleUrl-short">www.f2008.it</div><div class="gs-visibleUrl gs-visibleUrl-long">www.f2008.it/</div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-cursor-box"><div class="gsc-cursor"><div class="gsc-cursor-page gsc-cursor-current-page">1</div><div class="gsc-cursor-page">2</div><div class="gsc-cursor-page">3</div><div class="gsc-cursor-page">4</div></div><div class="gsc-trailing-more-results"><a target="_blank" class="gsc-trailing-more-results" href="http://www.google.com/search?oe=utf8&ie=utf8&source=uds&start=0&hl=it&q=Ferrari">Altri risultati »</a></div></div></div></div></div><div class="gsc-resultsRoot gsc-tabData gsc-tabdInactive"><table class="gsc-resultsHeader" cellpadding="0" cellspacing="0"><tbody><tr><td class="gsc-twiddleRegionCell gsc-twiddle-opened"><div class="gsc-twiddle"><div class="gsc-title">News</div></div><div class="gsc-stats">(8)</div><div class="gsc-results-selector gsc-all-results-active"><div title="mostra un risultato" class="gsc-result-selector gsc-one-result"> </div><div title="mostra altri risultati" class="gsc-result-selector gsc-more-results"> </div><div title="mostra tutti i risultati" class="gsc-result-selector gsc-all-results"> </div></div></td><td class="gsc-configLabelCell"><span title="impostazioni" class="gsc-configLabel gsc-twiddle-closed"> </span></td></tr></tbody></table><div style="display: none;" class="gsc-config gsc-newsConfig"><form class="gsc-config gsc-newsConfig"></form></div><div style="display: block;" class="gsc-results gsc-newsResult"><div class="gsc-newsResult gsc-result"><div class="gs-newsResult gs-result"><div class="gs-title"><a target="_blank" class="gs-title" href="http://www.corrieredellosport.it/Notizie/Formula1/30936/Monaco,+prima+fila+tutta+Ferrari">Monaco, prima fila tutta <b>Ferrari</b></a></div><div class="gs-publisher">Corriere dello Sport.it</div><div class="gs-publishedDate"> - 25 Mag 2008</div><div class="gs-relativePublishedDate"> - 10 ore fa</div><div class="gs-snippet">Anche sulle strade del Principato di Monaco la <b>Ferrari</b> è la monoposto da battere. La pole è di Felipe Massa, il secondo posto di Kimi Raikkonen. <b>...</b></div><div class="gs-clusterUrl"><a target="_blank" class="gs-clusterUrl" href="http://news.google.com/news?client=internal-uds&ncl=1219233094&hl=it">Articoli correlati »</a></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-expansionArea"><div class="gsc-newsResult gsc-result"><div class="gs-newsResult gs-result"><div class="gs-title"><a target="_blank" class="gs-title" href="http://www.lastampa.it/sport/cmsSezioni/formula1/200805articoli/14886girata.asp"><b>Ferrari</b>, addio punti deboli</a></div><div class="gs-publisher">La Stampa</div><div class="gs-location">, Italy</div><div class="gs-publishedDate"> - 25 Mag 2008</div><div class="gs-relativePublishedDate"> - 3 ore fa</div><div class="gs-snippet">Lo scorso anno il tallone d’Achille della <b>Ferrari</b> era rappresentato dalla scarsa agilità della F2007 e dalle difficoltà che la vettura mostrava nel passare <b>...</b></div><div class="gs-clusterUrl"><a target="_blank" class="gs-clusterUrl" href="http://news.google.com/news?client=internal-uds&ncl=1219459986&hl=it">Articoli correlati »</a></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-newsResult gsc-result"><div class="gs-newsResult gs-result"><div class="gs-title"><a target="_blank" class="gs-title" href="http://www.ilgiornale.it/a.pic1?ID=264126">Massa lancia la carica <b>Ferrari</b> «Io in</a></div><div class="gs-publisher">il Giornale</div><div class="gs-location">, Italy</div><div class="gs-publishedDate"> - 25 Mag 2008</div><div class="gs-relativePublishedDate"> - 4 ore fa</div><div class="gs-snippet">Fanno parte della vita, ma quando senti di essere veloce, quando guidi una <b>Ferrari</b> per cui sai che se ti trovi a Maranello vuol dire che loro si fidano di <b>...</b></div><div class="gs-clusterUrl"><a target="_blank" class="gs-clusterUrl" href="http://news.google.com/news?client=internal-uds&ncl=1219463998&hl=it">Articoli correlati »</a></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-newsResult gsc-result"><div class="gs-newsResult gs-result"><div class="gs-title"><a target="_blank" class="gs-title" href="http://www.repubblica.it/news/sport_gen/sport_n_3136232.html">GINNASTICA: ASSOLUTI ARTISTICA, <b>FERRARI</b> FUORI DA FINALE</a></div><div class="gs-publisher">La Repubblica</div><div class="gs-publishedDate"> - 24 Mag 2008</div><div class="gs-relativePublishedDate"> - 12 ore fa</div><div class="gs-snippet">La campionessa uscente, Vanessa <b>Ferrari</b>, ha preso parte soltanto alla prova delle parallele dove si è piazzata settima, e quindi non è entrata nella finale <b>...</b></div><div class="gs-clusterUrl"><a target="_blank" class="gs-clusterUrl" href="http://news.google.com/news?client=internal-uds&ncl=1219319537&hl=it">Articoli correlati »</a></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-newsResult gsc-result"><div class="gs-newsResult gs-result"><div class="gs-title"><a target="_blank" class="gs-title" href="http://www.ilsussidiario.net/articolo.aspx?articolo=2276">MOTORI/ <b>Ferrari</b> California, il nuovo "sogno" targato Maranello</a></div><div class="gs-publisher">Il Sussidiario.net</div><div class="gs-location">, Italy</div><div class="gs-publishedDate"> - 25 Mag 2008</div><div class="gs-relativePublishedDate"> - 2 ore fa</div><div class="gs-snippet">Ecco le prime foto ufficiali della nuova nata in casa del Cavallino Rampante, la <b>Ferrari</b> California: in linea con la tradizione del prestigioso marchio <b>...</b></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-newsResult gsc-result"><div class="gs-newsResult gs-result"><div class="gs-title"><a target="_blank" class="gs-title" href="http://www.giraitalia.it/altre_manifestazioni/23889_incontro_ferrari_ducati.html">Incontro <b>Ferrari</b></a></div><div class="gs-publisher">GiraItalia.it</div><div class="gs-publishedDate"> - 25 Mag 2008</div><div class="gs-relativePublishedDate"> - 11 ore fa</div><div class="gs-snippet"><b>...</b> l'Associazione Italiana Sclerosi Multipla, Sezione Provinciale di Cagliari, in collaborazione con il <b>Ferrari</b> Club Italia, Ducati e Ducati Sardinia Doc, <b>...</b></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-newsResult gsc-result"><div class="gs-newsResult gs-result"><div class="gs-title"><a target="_blank" class="gs-title" href="http://www.romagnaoggi.it/formulauno/2008/5/24/91598/">Montecarlo, prima fila tutta <b>Ferrari</b>: pole a Massa</a></div><div class="gs-publisher">Romagnaoggi.it</div><div class="gs-location">, Italy</div><div class="gs-publishedDate"> - 24 Mag 2008</div><div class="gs-relativePublishedDate"> - 19 ore fa</div><div class="gs-snippet">Per la <b>Ferrari</b> +si tratta della 199esima pole position, la quarta stagionale. Mentre +per Massa è la 12esima partenza dal palo, la terza in questo +campionato. <b>...</b></div><div class="gs-clusterUrl"><a target="_blank" class="gs-clusterUrl" href="http://news.google.com/news?client=internal-uds&ncl=1219233099&hl=it">Articoli correlati »</a></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-newsResult gsc-result"><div class="gs-newsResult gs-result"><div class="gs-title"><a target="_blank" class="gs-title" href="http://www.agi.it/sport/altro/notizie/200805231302-spr-rom1079-art.html">PISTORIUS: CON LA PIRELLI "SARO' UNA <b>FERRARI</b>"</a></div><div class="gs-publisher">AGI - Agenzia Giornalistica Italia</div><div class="gs-location">, Italy</div><div class="gs-publishedDate"> - 23 Mag 2008</div><div class="gs-relativePublishedDate"> - 23 Mag 2008</div><div class="gs-snippet">"Con l'aiuto della Pirelli vorrei diventare anch'io una <b>Ferrari</b>". Cosi' Oscar Pistorius, soprannominato "Oz", commenta la sigla di un accordo di <b>...</b></div><div class="gs-watermark"><a target="_blank" class="gs-watermark" href="http://code.google.com/apis/ajaxsearch/faq.html">ritagliato da Google - 5/2008</a></div></div></div><div class="gsc-cursor-box"><div class="gsc-cursor"><div class="gsc-cursor-page gsc-cursor-current-page">1</div><div class="gsc-cursor-page">2</div><div class="gsc-cursor-page">3</div><div class="gsc-cursor-page">4</div></div><div class="gsc-trailing-more-results"><a target="_blank" class="gsc-trailing-more-results" href="http://news.google.com/nwshp?oe=utf8... [truncated message content] |
From: <txm...@us...> - 2012-02-15 12:53:32
|
Revision: 8989 http://xoops.svn.sourceforge.net/xoops/?rev=8989&view=rev Author: txmodxoops Date: 2012-02-15 12:53:19 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Module googlemapsearch v1.05 Added Paths: ----------- XoopsModules/googlemapsearch/ XoopsModules/googlemapsearch/branches/ XoopsModules/googlemapsearch/releases/ XoopsModules/googlemapsearch/releases/1.05/ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/about.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/admin_footer.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/admin_header.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/index.html XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/index.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/menu.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/blocks/ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/blocks/index.html XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/class/ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/class/index.html XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/class/menu.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/class/object.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/header.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/about.png XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/arrow.gif XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/delete.gif XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/edit.gif XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/index.html XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/index.png XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/off.gif XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/on.gif XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/permissions.png XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/pref.png XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/update.png XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/googlemapsearch_slogo.png XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/index.html XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/menu/ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/menu/bg.png XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/menu/index.html XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/menu/left_both.png XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/menu/right_both.png XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/include/ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/include/common.js XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/include/default.js XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/include/functions.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/include/gsmapsearch.js XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/include/index.html XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/include/install.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/include/main.js XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/include/mod_control_api.js XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/include/mydirname.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/include/urchin.js XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/index.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/english/ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/english/admin.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/english/blocks.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/english/index.html XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/english/main.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/english/modinfo.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/french/ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/french/admin.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/french/blocks.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/french/index.html XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/french/main.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/french/modinfo.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/index.html XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/italian/ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/italian/admin.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/italian/blocks.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/italian/index.html XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/italian/main.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/language/italian/modinfo.php XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/sql/ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/sql/index.html XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/templates/ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/templates/blocks/ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/templates/blocks/index.html XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/templates/googlemapsearch.html XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/templates/index.html XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/xoops_version.php XoopsModules/googlemapsearch/trunk/ Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/about.php =================================================================== --- XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/about.php (rev 0) +++ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/about.php 2012-02-15 12:53:19 UTC (rev 8989) @@ -0,0 +1,116 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Google Map Search - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://txmod.netsons.org) + * + * 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 txmod (http://txmod.netsons.org) + * @license GNU GPL + * @package Google Map Search + * @author txmod () + * + * Version : 1.00: + * **************************************************************************** + */ + +include_once("admin_header.php"); + +xoops_cp_header(); + +if ( !is_readable(XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php")) { +googlemapsearch_adminmenu(1, _AM_GOOGLEMAPSEARCH_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 (1, _AM_GOOGLEMAPSEARCH_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_GOOGLEMAPSEARCH_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_GOOGLEMAPSEARCH_ABOUT_RELEASEDATE.":</label><text>".$versioninfo->getInfo("release")."</text><br /> + <label>"._AM_GOOGLEMAPSEARCH_ABOUT_AUTHOR.":</label><text>".$versioninfo->getInfo("author")."</text><br /> + <label>"._AM_GOOGLEMAPSEARCH_ABOUT_CREDITS.":</label><text>".$versioninfo->getInfo("credits")."</text><br /> + <label>"._AM_GOOGLEMAPSEARCH_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_GOOGLEMAPSEARCH_ABOUT_MODULE_INFO."</legend> + <div style=\"padding: 8px;\"> + <label>"._AM_GOOGLEMAPSEARCH_ABOUT_MODULE_STATUS.":</label><text>".$versioninfo->getInfo("module_status")."</text><br /> + <label>"._AM_GOOGLEMAPSEARCH_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_GOOGLEMAPSEARCH_ABOUT_AUTHOR_INFO."</legend> + <div style=\"padding: 8px;\"> + <label>"._AM_GOOGLEMAPSEARCH_ABOUT_AUTHOR_NAME.":</label><text>".$versioninfo->getInfo("author")."</text><br /> + <label>"._AM_GOOGLEMAPSEARCH_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_GOOGLEMAPSEARCH_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/googlemapsearch/releases/1.05/googlemapsearch/admin/admin_footer.php =================================================================== --- XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/admin_footer.php (rev 0) +++ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/admin_footer.php 2012-02-15 12:53:19 UTC (rev 8989) @@ -0,0 +1,29 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Google Map Search - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://txmod.netsons.org) + * + * 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 txmod (http://txmod.netsons.org) + * @license GNU GPL + * @package Google Map Search + * @author txmod () + * + * Version : 1.00: + * **************************************************************************** + */ + +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/googlemapsearch/releases/1.05/googlemapsearch/admin/admin_header.php =================================================================== --- XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/admin_header.php (rev 0) +++ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/admin_header.php 2012-02-15 12:53:19 UTC (rev 8989) @@ -0,0 +1,105 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Google Map Search - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://txmod.netsons.org) + * + * 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 txmod (http://txmod.netsons.org) + * @license GNU GPL + * @package Google Map Search + * @author txmod () + * + * 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(); + +if ( $xoopsUser ) { + $xoopsModule = XoopsModule::getByDirname("googlemapsearch"); + 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 googlemapsearch_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/googlemapsearch/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/googlemapsearch/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/googlemapsearch/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_GOOGLEMAPSEARCH_GENERALSET</a> + | <a href=\"".XOOPS_URL."/modules/googlemapsearch/index.php\">_AM_GOOGLEMAPSEARCH_GOINDEX</a> + | <a href=\"".XOOPS_URL."/modules/googlemapsearch/admin/upgrade.php\">_AM_GOOGLEMAPSEARCH_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/googlemapsearch/admin/index.php\"><span>_MI_GOOGLEMAPSEARCH_MANAGER_INDEX</span></a></li> + <li id=\"$tblColors[1]\"><a href=\"".XOOPS_URL."/modules/googlemapsearch/admin/about.php\"><span>_MI_GOOGLEMAPSEARCH_MANAGER_ABOUT</span></a></li> + </ul></div>"; +} + + +?> \ No newline at end of file Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/index.html =================================================================== --- XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/index.html (rev 0) +++ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/index.html 2012-02-15 12:53:19 UTC (rev 8989) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/index.php =================================================================== --- XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/index.php (rev 0) +++ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/index.php 2012-02-15 12:53:19 UTC (rev 8989) @@ -0,0 +1,63 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Google Map Search - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://txmod.netsons.org) + * + * 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 txmod (http://txmod.netsons.org) + * @license GNU GPL + * @package Google Map Search + * @author txmod () + * + * Version : 1.00: + * **************************************************************************** + */ + +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")) { +googlemapsearch_adminmenu(0, _AM_GOOGLEMAPSEARCH_MANAGER_INDEX); +} else { +include_once XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php"; +loadModuleAdminMenu (0, _AM_GOOGLEMAPSEARCH_MANAGER_INDEX); +} + +include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->dirname()."/class/menu.php"; + + $menu = new googlemapsearchMenu(); + + $menu->addItem("update", "../../system/admin.php?fct=modulesadmin&op=update&module=googlemapsearch", "../images/deco/update.png", _AM_GOOGLEMAPSEARCH_MANAGER_UPDATE); + $menu->addItem("preference", "../../system/admin.php?fct=preferences&op=showmod&mod=".$xoopsModule->getVar("mid"). + "&&confcat_id=1", "../images/deco/pref.png", _AM_GOOGLEMAPSEARCH_MANAGER_PREFERENCES); + $menu->addItem("about", "about.php", "../images/deco/about.png", _AM_GOOGLEMAPSEARCH_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_GOOGLEMAPSEARCH_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 "</td> + </tr> + </table>"; +include_once("admin_footer.php"); +xoops_cp_footer(); + +?> \ No newline at end of file Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/menu.php =================================================================== --- XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/menu.php (rev 0) +++ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/admin/menu.php 2012-02-15 12:53:19 UTC (rev 8989) @@ -0,0 +1,31 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Google Map Search - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://txmod.netsons.org) + * + * 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 txmod (http://txmod.netsons.org) + * @license GNU GPL + * @package Google Map Search + * @author txmod () + * + * Version : 1.00: + * **************************************************************************** + */ + +$adminmenu = array(); +$adminmenu[0]["title"] = _MI_GOOGLEMAPSEARCH_MANAGER_INDEX; +$adminmenu[0]["link"] = "admin/index.php"; +$adminmenu[1]["title"] = _MI_GOOGLEMAPSEARCH_MANAGER_ABOUT; +$adminmenu[1]["link"] = "admin/about.php"; + +?> \ No newline at end of file Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/blocks/index.html =================================================================== --- XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/blocks/index.html (rev 0) +++ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/blocks/index.html 2012-02-15 12:53:19 UTC (rev 8989) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/class/index.html =================================================================== --- XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/class/index.html (rev 0) +++ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/class/index.html 2012-02-15 12:53:19 UTC (rev 8989) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/class/menu.php =================================================================== --- XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/class/menu.php (rev 0) +++ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/class/menu.php 2012-02-15 12:53:19 UTC (rev 8989) @@ -0,0 +1,176 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Google Map Search - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://txmod.netsons.org) + * + * 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 txmod (http://txmod.netsons.org) + * @license GNU GPL + * @package Google Map Search + * @author txmod () + * + * Version : 1.00: + * **************************************************************************** + */ + +class googlemapsearchMenu +{ + public $Width = 100; + public $Height = 100; + public $BgColor = "transparent"; + public $OverBgColor = "#FFF6C1"; + public $BorderWidth = 1; + public $BorderColor = "#CCCCCC"; + public $OverBorderColor = "#FF9900"; + public $BorderStyle = "solid"; + public $OverBorderStyle = "solid"; + public $Font = "Tahoma, Arial, Helvetica"; + public $FontColor = "#666666"; + public $OverFontColor = "#1E90FF"; + public $FontDeco = "none"; + public $OverFontDeco = "none"; + public $FontSize = 11; + public $FontWeight = "bold"; + public $FontExtra = "Tahoma, Arial, Helvetica"; + public $FontExtraColor = "#A98952"; + public $OverFontExtraColor = "#0033FF"; + public $FontExtraDeco = "underline"; + public $OverFontExtraDeco = "underline"; + public $FontExtraSize = 9; + public $FontExtraWeight = "normal"; + public $TextAlign = "center"; + private $_items = array(); + + public function addItem($id, $link="", $icon="", $name="", $extra="", $alt=""){ + if (isset($this->_items[$id])) return false; + $rtn["link"] = $link; + $rtn["icon"] = $icon; + $rtn["name"] = $name; + $rtn["extra"] = $extra; + $rtn["alt"] = $alt; + $this->_items[$id] = $rtn; + return true; + } + + public function setLink($id, $link){ + if (isset($this->_items[$id])){ + $this->_items[$id]["link"] = $link; + return true; + } else { + return false; + } + } + + public function setIcon($id, $icon){ + if (isset($this->_items[$id])){ + $this->_items[$id]["icon"] = $icon; + return true; + } else { + return false; + } + } + + public function setName($id, $name){ + if (isset($this->_items[$id])){ + $this->_items[$id]["name"] = $name; + return true; + } else { + return false; + } + } + + public function setExtra($id, $extra){ + if (isset($this->_items[$id])){ + $this->_items[$id]["extra"] = $extra; + return true; + } else { + return false; + } + } + + public function setAlt($id, $alt){ + if (isset($this->_items[$id])){ + $this->_items[$id]["alt"] = $alt; + return true; + } else { + return false; + } + } + + public function getCSS($ws = true){ + if ($ws) $csscode = "<style type=\"text/css\">\n<!--"; + $csscode .= "div.rmmenuicon{ + margin: 3px; + font-family: $this->Font; + text-align: ".$this->TextAlign."; + } + div.rmmenuicon a { + display: block; float: left; + height: ".$this->Height."px !important; + height: ".$this->Height."px; + width: ".$this->Width."px !important; + width: ".$this->Width."px; + vertical-align: middle; + text-decoration : none; + border: ".$this->BorderWidth."px $this->BorderStyle $this->BorderColor; + padding: 2px 5px 1px 5px; + margin: 3px; + color: $this->FontColor; + } + div.rmmenuicon img { margin-top: 8px; margin-bottom: 8px; } + div.rmmenuicon a span { + font-size: ".$this->FontSize."px; + font-weight: $this->FontWeight; + display: block; + } + div.rmmenuicon a span.uno{ + font-size: ".$this->FontExtraSize."px; + font-weight: $this->FontExtraWeight; + text-decoration: $this->FontExtraDeco; + color: $this->FontExtraColor; + } + div.rmmenuicon a:hover{ + background-color: $this->OverBgColor; + border: ".$this->BorderWidth."px $this->BorderStyle $this->OverBorderColor; + color: $this->OverFontColor; + } + div.rmmenuicon a:hover span{ + text-decoration: $this->OverFontDeco; + } + div.rmmenuicon a:hover span.uno{ + text-decoration: $this->OverFontExtraDeco; + color: $this->OverFontExtraColor; + }"; + if ($ws) $csscode .= "\n-->\n</style>"; + return $csscode; + } + + public function render(){ + + $ret = "<div class=\"rmmenuicon\">"; + foreach ($this->_items as $k => $v){ + $ret .= "<a href=\"".$v["link"]."\" title=\"".($v["alt"]!="" ? $v["alt"] : $v["name"])."\">".($v["icon"]!="" ? "<img src=\"".$v["icon"]."\" alt=\"".$v["name"]."\" /> " : ""); + if ($v["name"] != "") $ret .= "<span>".$v["name"]."</span>"; + if ($v["extra"] != "") $ret .= "<span class=\"uno\">".$v["extra"]."</span>"; + if ($v["extra"] != "") $ret .= "<span class=\"uno\">".$v["extra"]."</span>"; + $ret .= "</a>"; + } + $ret .= "</div><div style=\"clear: both;\"></div>"; + return $ret; + } + + public function display(){ + echo $this->render(); + } +} + +?> \ No newline at end of file Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/class/object.php =================================================================== --- XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/class/object.php (rev 0) +++ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/class/object.php 2012-02-15 12:53:19 UTC (rev 8989) @@ -0,0 +1,412 @@ +<?php +/** + * **************************************************************************** + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * + * Cette licence, contient des limitations!!! + * + * 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. + * + * @license TDM GPL license + * @author TDM TEAM DEV MODULE + * + * **************************************************************************** + */ + +class XoopsPersistableObjectHandler extends XoopsObjectHandler{ + + /** + * Information about the class, the handler is managing + * + * @var string + */ + var $table; + var $keyName; + var $className; + var $identifierName; + + + /** + * Constructor - called from child classes + * @param object $db {@link XoopsDatabase} object + * @param string $tablename Name of database table + * @param string $classname Name of Class, this handler is managing + * @param string $keyname Name of the property, holding the key + * + * @return void + */ + function XoopsPersistableObjectHandler(&$db, $tablename, $classname, $keyname, $idenfierName = false) { + $this->XoopsObjectHandler($db); + $this->table = $db->prefix($tablename); + $this->keyName = $keyname; + $this->className = $classname; + if ($idenfierName != false) { + $this->identifierName = $idenfierName; + } + } + + /** + * create a new user + * + * @param bool $isNew Flag the new objects as "new"? + * + * @return object + */ + function &create($isNew = true) { + $obj =& new $this->className(); + if ($isNew === true) { + $obj->setNew(); + } + return $obj; + } + + /** + * retrieve an object + * + * @param mixed $id ID of the object - or array of ids for joint keys. Joint keys MUST be given in the same order as in the constructor + * @param bool $as_object whether to return an object or an array + * @return mixed reference to the object, FALSE if failed + */ + function &get($id, $as_object=true) { + if (is_array($this->keyName)) { + $criteria = new CriteriaCompo(); + for ($i = 0; $i < count($this->keyName); $i++) { + $criteria->add(new Criteria($this->keyName[$i], intval($id[$i]))); + } + } else { + $criteria = new Criteria($this->keyName, intval($id)); + } + $criteria->setLimit(1); + $obj_array = $this->getObjects($criteria, false, $as_object); + if (count($obj_array) != 1) { + $obj = $this->create(); + return $obj; + } + return $obj_array[0]; + } + + /** + * retrieve objects from the database + * + * @param object $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the ID as key for the array? + * @param bool $as_object return an array of objects? + * + * @return array + */ + function getObjects($criteria=null, $id_as_key=false, $as_object=true){ + $ret = array(); + $limit = $start = 0; + $sql = 'SELECT * FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->getSort() != '') { + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + return $this->convertResultSet($result, $id_as_key, $as_object); + } + + /** + * Convert a database resultset to a returnable array + * + * @param object $result database resultset + * @param bool $id_as_key - should NOT be used with joint keys + * @param bool $as_object + * + * @return array + */ + function convertResultSet($result, $id_as_key = false, $as_object = true) { + $ret = array(); + while ($myrow = $this->db->fetchArray($result)) { + $obj =& $this->create(false); + $obj->assignVars($myrow); + if (!$id_as_key) { + if ($as_object) { + $ret[] =& $obj; + } else { + $row = array(); + $vars = $obj->getVars(); + foreach (array_keys($vars) as $i) { + $row[$i] = $obj->getVar($i); + } + $ret[] = $row; + } + } else { + if ($as_object) { + $ret[$myrow[$this->keyName]] =& $obj; + } else { + $row = array(); + $vars = $obj->getVars(); + foreach (array_keys($vars) as $i) { + $row[$i] = $obj->getVar($i); + } + $ret[$myrow[$this->keyName]] = $row; + } + } + unset($obj); + } + return $ret; + } + + /** + * Retrieve a list of objects as arrays - DON'T USE WITH JOINT KEYS + * + * @param object $criteria {@link CriteriaElement} conditions to be met + * @param int $limit Max number of objects to fetch + * @param int $start Which record to start at + * + * @return array + */ + function getList($criteria = null, $limit = 0, $start = 0) { + $ret = array(); + if ($criteria == null) { + $criteria = new CriteriaCompo(); + } + + if ($criteria->getSort() == '') { + $criteria->setSort($this->identifierName); + } + + $sql = 'SELECT '.$this->keyName; + if(!empty($this->identifierName)){ + $sql .= ', '.$this->identifierName; + } + $sql .= ' FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->getSort() != '') { + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + $myts =& MyTextSanitizer::getInstance(); + while ($myrow = $this->db->fetchArray($result)) { + //identifiers should be textboxes, so sanitize them like that + $ret[$myrow[$this->keyName]] = empty($this->identifierName)?1:$myts->htmlSpecialChars($myrow[$this->identifierName]); + } + return $ret; + } + + /** + * count objects matching a condition + * + * @param object $criteria {@link CriteriaElement} to match + * @return int count of objects + */ + function getCount($criteria=null){ + $field = ""; + $groupby = false; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + if ($criteria->groupby != "") { + $groupby = true; + $field = $criteria->groupby.", "; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used + } + } + $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->groupby != "") { + $sql .= $criteria->getGroupby(); + } + } + $result = $this->db->query($sql); + if (!$result) { + return 0; + } + if ($groupby == false) { + list($count) = $this->db->fetchRow($result); + return $count; + } else { + $ret = array(); + while (list($id, $count) = $this->db->fetchRow($result)) { + $ret[$id] = $count; + } + return $ret; + } + } + + /** + * delete an object from the database + * + * @param object $obj reference to the object to delete + * @param bool $force + * @return bool FALSE if failed. + */ + function delete(&$obj, $force = false){ + if (is_array($this->keyName)) { + $clause = array(); + for ($i = 0; $i < count($this->keyName); $i++) { + $clause[] = $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]); + } + $whereclause = implode(" AND ", $clause); + } else { + $whereclause = $this->keyName." = ".$obj->getVar($this->keyName); + } + $sql = "DELETE FROM ".$this->table." WHERE ".$whereclause; + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } + + /** + * insert a new object in the database + * + * @param object $obj reference to the object + * @param bool $force whether to force the query execution despite security settings + * @param bool $checkObject check if the object is dirty and clean the attributes + * @return bool FALSE if failed, TRUE if already present and unchanged or successful + */ + + function insert(&$obj, $force=false, $checkObject=true){ + if ($checkObject != false) { + if (!is_object($obj)) { + var_dump($obj); + return false; + } + /** + * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5 + */ + if (!is_a($obj, $this->className)) { + $obj->setErrors(get_class($obj)." Differs from ".$this->className); + return false; + } + if (!$obj->isDirty()) { + $obj->setErrors("Not dirty"); //will usually not be outputted as errors are not displayed when the method returns true, but it can be helpful when troubleshooting code - Mith + return true; + } + } + if (!$obj->cleanVars()) { + return false; + } + + foreach ($obj->cleanVars as $k => $v) { + if ($obj->vars[$k]['data_type'] == XOBJ_DTYPE_INT) { + $cleanvars[$k] = intval($v); + } elseif ( is_array( $v ) ) { + $cleanvars[ $k ] = $this->db->quoteString( implode( ',', $v ) ); + } else { + $cleanvars[$k] = $this->db->quoteString($v); + } + } + if ($obj->isNew()) { + if (!is_array($this->keyName)) { + if ($cleanvars[$this->keyName] < 1) { + $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq'); + } + } + $sql = "INSERT INTO ".$this->table." (".implode(',', array_keys($cleanvars)).") VALUES (".implode(',', array_values($cleanvars)) .")"; + } else { + $sql = "UPDATE ".$this->table." SET"; + foreach ($cleanvars as $key => $value) { + if ((!is_array($this->keyName) && $key == $this->keyName) || (is_array($this->keyName) && in_array($key, $this->keyName))) { + continue; + } + if (isset($notfirst) ) { + $sql .= ","; + } + $sql .= " ".$key." = ".$value; + $notfirst = true; + } + if (is_array($this->keyName)) { + $whereclause = ""; + for ($i = 0; $i < count($this->keyName); $i++) { + if ($i > 0) { + $whereclause .= " AND "; + } + $whereclause .= $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]); + } + } else { + $whereclause = $this->keyName." = ".$obj->getVar($this->keyName); + } + $sql .= " WHERE ".$whereclause; + } + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + if ($obj->isNew() && !is_array($this->keyName)) { + $obj->assignVar($this->keyName, $this->db->getInsertId()); + } + return true; + } + + /** + * Change a value for objects with a certain criteria + * + * @param string $fieldname Name of the field + * @param string $fieldvalue Value to write + * @param object $criteria {@link CriteriaElement} + * @return bool + */ + function updateAll($fieldname, $fieldvalue, $criteria = null, $force = false){ + $set_clause = $fieldname . ' = '; + if ( is_numeric( $fieldvalue ) ) { + $set_clause .= $fieldvalue; + } elseif ( is_array( $fieldvalue ) ) { + $set_clause .= $this->db->quoteString( implode( ',', $fieldvalue ) ); + } else { + $set_clause .= $this->db->quoteString( $fieldvalue ); + } + $sql = 'UPDATE '.$this->table.' SET '.$set_clause; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + } + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } + + /** + * delete all objects meeting the conditions + * + * @param object $criteria {@link CriteriaElement} with conditions to meet + * @return bool + */ + function deleteAll($criteria = null){ + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql = 'DELETE FROM '.$this->table; + $sql .= ' '.$criteria->renderWhere(); + if (!$this->db->queryF($sql)) { + return false; + } + $rows = $this->db->getAffectedRows(); + return $rows > 0 ? $rows : true; + } + return false; + } +} +?> \ No newline at end of file Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/header.php =================================================================== --- XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/header.php (rev 0) +++ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/header.php 2012-02-15 12:53:19 UTC (rev 8989) @@ -0,0 +1,28 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Google Map Search - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://txmod.netsons.org) + * + * 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 txmod (http://txmod.netsons.org) + * @license GNU GPL + * @package Google Map Search + * @author txmod (txm...@gm...) + * + * Version : 1.00: + * **************************************************************************** + */ +include("../../mainfile.php"); +include "include/mydirname.php"; +global $xoopsTpl, $xoopsModuleConfig; + +?> \ No newline at end of file Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/about.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/about.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/arrow.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/arrow.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/delete.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/delete.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/edit.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/edit.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/index.html =================================================================== --- XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/index.html (rev 0) +++ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/index.html 2012-02-15 12:53:19 UTC (rev 8989) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/index.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/index.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/off.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/off.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/on.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/on.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/permissions.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/permissions.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/pref.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/pref.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/update.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/deco/update.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/googlemapsearch_slogo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/googlemapsearch_slogo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/index.html =================================================================== --- XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/index.html (rev 0) +++ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/index.html 2012-02-15 12:53:19 UTC (rev 8989) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/menu/bg.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/menu/bg.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/menu/index.html =================================================================== --- XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/menu/index.html (rev 0) +++ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/menu/index.html 2012-02-15 12:53:19 UTC (rev 8989) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/menu/left_both.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/menu/left_both.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/menu/right_both.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/images/menu/right_both.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/include/common.js =================================================================== --- XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/include/common.js (rev 0) +++ XoopsModules/googlemapsearch/releases/1.05/googlemapsearch/include/common.js 2012-02-15 12:53:19 UTC (rev 8989) @@ -0,0 +1,654 @@ +function parseCgiParams(str) { + var params = {}; + str = str.replace(/#.*$/,""); + var urlHalves = str.split("?"); + var parts = urlHalves[urlHalves.length - 1].split("&"); + for (var i = 0; i < parts.length; i++) { + var keyvalue = parts[i].split("="); + if (keyvalue[0]) { // in case parts[i] is empty + params[keyvalue[0].toLowerCase()] = + keyvalue.length > 1 ? urlDecode(keyvalue[1]) : ""; + } + } + params["<<BASEPAGE>>"] = urlHalves[0]; + return params; +} + +// URL-decodes the string. We need to specially handle '+'s because +// the javascript library doesn't properly convert them to spaces +var plus_re_ = /\+/g; +function urlDecode(str) { + return decodeURIComponent(str.replace(plus_re_, ' ')); +} + +// e.g., ABQIAAAATdeyMKVMEFPfZpv20xC45BTRERdeAiwZ9EeJWta3L_JZVS0bOBQD53LFwS04JmT5XsI_dLLI91YRLg +var KEY_RE = /^([a-zA-Z0-9\-\_=]{86})|(internal.*)$/ +function getKeyFromParams(params) { + var rv = null; + + if (params['key']) { + passedKey = params['key']; + if (passedKey.match(KEY_RE)) { + return passedKey; + } + } + return null; +} + +var squote_re_ = /\'/g; +var quote_re_ = /\"/g; +var amp_re_ = /&/g; +var lt_re_ = /</g; +var gt_re_ = />/g; +var script_re_ = /<.*?script.*?>/g; +function HtmlEscape(str) { + if (!str) return ""; + return str.replace(amp_re_, "&").replace(lt_re_, "<"). + replace(gt_re_, ">").replace(quote_re_, """). + replace(squote_re_, "'").replace(script_re_, ""); + +} + +var leadingws_re_ = /^\s*/; +var trailingws_re_ = /\s*$/; +function TrimWS(str) { + if (!str) return ""; + return str.replace(leadingws_re_, "").replace(trailingws_re_, ""); +} + +function cssSetClass(el, className) { + el.className = className; +} + +function methodClosure(object, method, opt_argArray) { + return function() { + return method.apply(object, opt_argArray); + } +} + +Twidler.MINIMIZE = "minimize"; +Twidler.MAXIMIZE = "maximize"; +function Twidler(header, container, minimizeString, maximizeString, state, + headerClassPrefix, containerClassPrefix) { + this.header = header; + this.container = container; + this.stateData = new Array(); + this.stateData[Twidler.MINIMIZE] = { + value : minimizeString, + headerClass : headerClassPrefix + Twidler.MINIMIZE, + containerClass : containerClassPrefix + Twidler.MINIMIZE + }; + this.stateData[Twidler.MAXIMIZE] = { + value : maximizeString, + headerClass : headerClassPrefix + Twidler.MAXIMIZE, + containerClass : containerClassPrefix + Twidler.MAXIMIZE + }; + this.state = state; + this.header.onclick = methodClosure(this, Twidler.prototype.twiddle, []); + this.setState(this.state); +} + +Twidler.prototype.setState = function(state) { + this.state = state; + this.header.value = this.stateData[state].value; + cssSetClass(this.header, this.stateData[state].headerClass); + cssSetClass(this.container, this.stateData[state].containerClass); +} + +Twidler.prototype.twiddle = function() { + var newState; + if (this.state == Twidler.MINIMIZE) { + newState = Twidler.MAXIMIZE; + } else { + newState = Twidler.MINIMIZE; + } + this.setState(newState); +} + +Wizard.FT_STRING = "string"; +Wizard.FT_STRING_LIST = "string-list"; +Wizard.FT_URL = "url"; +Wizard.FT_KEY = "key"; +Wizard.FT_INT = "int"; +Wizard.FT_CHECKBOX = "check"; +Wizard.FT_RADIO = "radio"; +function Wizard(form, keyCell, config, baseName) { + this.form = form; + this.keyCell = keyCell; + this.config = config; + this.baseName = baseName; +} + +var KEY_RE = /^([a-zA-Z0-9\-\_=]{86})|(internal.*)$/ +var URL_RE = /^http[s]?:\/\/.*$/ +var SMALLINT_RE = /^\d{1,4}$/ +// read the form and return an array of captured content +Wizard.prototype.captureForm = function(allowInvalidEntries) { + + var args = new Array(); + var rv = args; + + for (var i=0; i<this.config.length; i++) { + var desc = this.config[i]; + var obj; + var valid; + var element; + var elementWrap; + var value; + + obj = new Object(); + element = this.form[desc.elementName]; + elementWrap = document.getElementById(desc.elementName + "_wrap"); + + switch (desc.type) { + case Wizard.FT_STRING: + value = HtmlEscape(element.value); + if (value != null && value != "") { + valid = true; + } else { + valid = false; + } + break; + + case Wizard.FT_STRING_LIST: + value = HtmlEscape(element.value); + if (value != null && value != "") { + // now split the comma seperated list into an array + var listItems = value.split(","); + + var processedList = new Array(); + // now, for each non-null item, strip leading and trailing whitespace + // and push into value array + for (var li=0; li < listItems.length; li++) { + var str = listItems[li]; + if (str && str != "") { + var tstr = TrimWS(str); + if (tstr && tstr != "") { + processedList.push(tstr); + } + } + } + + if (processedList.length > 0) { + value = processedList; + valid = true; + } else { + valid = false; + } + } else { + valid = false; + } + break; + + case Wizard.FT_URL: + value = HtmlEscape(element.value); + if (value.match(URL_RE)) { + valid = true; + } else { + valid = false; + } + if (desc.siteUrl) { + obj.siteUrl = true; + } + break; + + case Wizard.FT_KEY: + value = HtmlEscape(element.value); + if (value.match(KEY_RE)) { + valid = true; + } else { + valid = false; + } + break; + + case Wizard.FT_INT: + value = HtmlEscape(element.value); + if (value.match(SMALLINT_RE)) { + if (value >= desc.range[0] && value <= desc.range[1]) { + valid = true; + } else { + valid = false; + } + } else { + valid = false; + } + break; + + case Wizard.FT_RADIO: + value = desc.valueMap[0]; + for (var r=0; r<desc.range; r++) { + if (element[r].checked) { + value = desc.valueMap[r]; + obj... [truncated message content] |
From: <txm...@us...> - 2012-02-15 12:58:02
|
Revision: 8990 http://xoops.svn.sourceforge.net/xoops/?rev=8990&view=rev Author: txmodxoops Date: 2012-02-15 12:57:49 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Module imprint v1.01 Added Paths: ----------- XoopsModules/imprint/ XoopsModules/imprint/branches/ XoopsModules/imprint/releases/ XoopsModules/imprint/releases/1.01/ XoopsModules/imprint/releases/1.01/imprint/ XoopsModules/imprint/releases/1.01/imprint/admin/ XoopsModules/imprint/releases/1.01/imprint/admin/about.php XoopsModules/imprint/releases/1.01/imprint/admin/header.php XoopsModules/imprint/releases/1.01/imprint/admin/imp.php XoopsModules/imprint/releases/1.01/imprint/admin/index.html XoopsModules/imprint/releases/1.01/imprint/admin/index.php XoopsModules/imprint/releases/1.01/imprint/admin/menu.php XoopsModules/imprint/releases/1.01/imprint/blocks/ XoopsModules/imprint/releases/1.01/imprint/blocks/index.html XoopsModules/imprint/releases/1.01/imprint/changelog.txt XoopsModules/imprint/releases/1.01/imprint/class/ XoopsModules/imprint/releases/1.01/imprint/class/imp.php XoopsModules/imprint/releases/1.01/imprint/class/index.html XoopsModules/imprint/releases/1.01/imprint/class/menu.php XoopsModules/imprint/releases/1.01/imprint/class/object.php XoopsModules/imprint/releases/1.01/imprint/header.php XoopsModules/imprint/releases/1.01/imprint/images/ XoopsModules/imprint/releases/1.01/imprint/images/deco/ XoopsModules/imprint/releases/1.01/imprint/images/deco/about.png XoopsModules/imprint/releases/1.01/imprint/images/deco/arrow.gif XoopsModules/imprint/releases/1.01/imprint/images/deco/delete.gif XoopsModules/imprint/releases/1.01/imprint/images/deco/edit.gif XoopsModules/imprint/releases/1.01/imprint/images/deco/imp_search.png XoopsModules/imprint/releases/1.01/imprint/images/deco/index.html XoopsModules/imprint/releases/1.01/imprint/images/deco/index.png XoopsModules/imprint/releases/1.01/imprint/images/deco/off.gif XoopsModules/imprint/releases/1.01/imprint/images/deco/on.gif XoopsModules/imprint/releases/1.01/imprint/images/deco/permissions.png XoopsModules/imprint/releases/1.01/imprint/images/deco/pref.png XoopsModules/imprint/releases/1.01/imprint/images/deco/topic.png XoopsModules/imprint/releases/1.01/imprint/images/deco/update.png XoopsModules/imprint/releases/1.01/imprint/images/imprint_slogo.png XoopsModules/imprint/releases/1.01/imprint/images/index.html XoopsModules/imprint/releases/1.01/imprint/images/menu/ XoopsModules/imprint/releases/1.01/imprint/images/menu/bg.png XoopsModules/imprint/releases/1.01/imprint/images/menu/index.html XoopsModules/imprint/releases/1.01/imprint/images/menu/left_both.png XoopsModules/imprint/releases/1.01/imprint/images/menu/right_both.png XoopsModules/imprint/releases/1.01/imprint/images/society_logo.png XoopsModules/imprint/releases/1.01/imprint/images/txmod_logo.png XoopsModules/imprint/releases/1.01/imprint/include/ XoopsModules/imprint/releases/1.01/imprint/include/configs.php XoopsModules/imprint/releases/1.01/imprint/include/functions.php XoopsModules/imprint/releases/1.01/imprint/include/index.html XoopsModules/imprint/releases/1.01/imprint/include/install.php XoopsModules/imprint/releases/1.01/imprint/include/search.inc.php XoopsModules/imprint/releases/1.01/imprint/include/style.css XoopsModules/imprint/releases/1.01/imprint/index.php XoopsModules/imprint/releases/1.01/imprint/language/ XoopsModules/imprint/releases/1.01/imprint/language/index.html XoopsModules/imprint/releases/1.01/imprint/language/italian/ XoopsModules/imprint/releases/1.01/imprint/language/italian/admin.php XoopsModules/imprint/releases/1.01/imprint/language/italian/blocks.php XoopsModules/imprint/releases/1.01/imprint/language/italian/index.html XoopsModules/imprint/releases/1.01/imprint/language/italian/main.php XoopsModules/imprint/releases/1.01/imprint/language/italian/modinfo.php XoopsModules/imprint/releases/1.01/imprint/readme.txt XoopsModules/imprint/releases/1.01/imprint/sql/ XoopsModules/imprint/releases/1.01/imprint/sql/index.html XoopsModules/imprint/releases/1.01/imprint/sql/mysql.sql XoopsModules/imprint/releases/1.01/imprint/templates/ XoopsModules/imprint/releases/1.01/imprint/templates/blocks/ XoopsModules/imprint/releases/1.01/imprint/templates/blocks/index.html XoopsModules/imprint/releases/1.01/imprint/templates/imprint_footer.html XoopsModules/imprint/releases/1.01/imprint/templates/imprint_header.html XoopsModules/imprint/releases/1.01/imprint/templates/imprint_index.html XoopsModules/imprint/releases/1.01/imprint/templates/index.html XoopsModules/imprint/releases/1.01/imprint/xoops_version.php XoopsModules/imprint/trunk/ Added: XoopsModules/imprint/releases/1.01/imprint/admin/about.php =================================================================== --- XoopsModules/imprint/releases/1.01/imprint/admin/about.php (rev 0) +++ XoopsModules/imprint/releases/1.01/imprint/admin/about.php 2012-02-15 12:57:49 UTC (rev 8990) @@ -0,0 +1,110 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * imprint - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) TXMod Xoops (http://www.txmodxoops.org) + * + * 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 TXMod Xoops (http://www.txmodxoops.org) + * @license GNU GPL + * @package imprint + * @author TXMod Xoops (http://www.txmodxoops.org) + * + * Version : 1.00: + * **************************************************************************** + */ + +include_once("./header.php"); + +xoops_cp_header(); + +if ( !is_readable(XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php")) { +imprint_adminmenu(2, _AM_IMPRINT_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_IMPRINT_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; height: 48px;\"><strong>"._AM_IMPRINT_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_IMPRINT_ABOUT_RELEASEDATE.":</label><text>".$versioninfo->getInfo("release")."</text><br /> + <label>"._AM_IMPRINT_ABOUT_AUTHOR.":</label><text>".$versioninfo->getInfo("author")."</text><br /> + <label>"._AM_IMPRINT_ABOUT_CREDITS.":</label><text>".$versioninfo->getInfo("credits")."</text><br /> + <label>"._AM_IMPRINT_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_IMPRINT_ABOUT_MODULE_INFO."</legend> + <div style=\"padding: 8px;\"> + <label>"._AM_IMPRINT_ABOUT_MODULE_STATUS.":</label><text>".$versioninfo->getInfo("module_status")."</text><br /> + <label>"._AM_IMPRINT_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_IMPRINT_ABOUT_AUTHOR_INFO."</legend> + <div style=\"padding: 8px;\"> + <label>"._AM_IMPRINT_ABOUT_AUTHOR_NAME.":</label><text>".$versioninfo->getInfo("author")."</text><br /> + <label>"._AM_IMPRINT_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_IMPRINT_ABOUT_CHANGELOG."</legend> + <div style=\"padding: 8px;\"><div>".implode("<br />", file( $file ))."</div></div> + </fieldset> + <br clear=\"all\" />"; +} +xoops_cp_footer(); +?> \ No newline at end of file Added: XoopsModules/imprint/releases/1.01/imprint/admin/header.php =================================================================== --- XoopsModules/imprint/releases/1.01/imprint/admin/header.php (rev 0) +++ XoopsModules/imprint/releases/1.01/imprint/admin/header.php 2012-02-15 12:57:49 UTC (rev 8990) @@ -0,0 +1,110 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * imprint - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) TXMod Xoops (http://www.txmodxoops.org) + * + * 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 TXMod Xoops (http://www.txmodxoops.org) + * @license GNU GPL + * @package imprint + * @author TXMod Xoops (http://www.txmodxoops.org) + * + * 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/imprint/class/imp.php"; + +if ( $xoopsUser ) { + $xoopsModule = XoopsModule::getByDirname("imprint"); + 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 imprint_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/imprint/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/imprint/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/imprint/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_IMPRINT_GENERALSET</a> + | <a href=\"".XOOPS_URL."/modules/imprint/index.php\">_AM_IMPRINT_GOINDEX</a> + | <a href=\"".XOOPS_URL."/modules/imprint/admin/upgrade.php\">_AM_IMPRINT_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/imprint/admin/index.php\"><span>_MI_IMPRINT_MANAGER_INDEX</span></a></li> + <li id=\"$tblColors[1]\"><a href=\"".XOOPS_URL."/modules/imprint/admin/imp.php\"><span>_MI_IMPRINT_MANAGER_IMP</span></a></li>"; + + /* <li id=\"$tblColors[2]\"><a href=\"".XOOPS_URL."/modules/imprint/admin/permissions.php\"><span>_MI_IMPRINT_MANAGER_PERMISSIONS</span></a></li> */ + echo "<li id=\"$tblColors[3]\"><a href=\"".XOOPS_URL."/modules/imprint/admin/about.php\"><span>_MI_IMPRINT_MANAGER_ABOUT</span></a></li> + </ul></div>"; +} + +$impHandler =& xoops_getModuleHandler("imprint_imp", "imprint"); + +?> \ No newline at end of file Added: XoopsModules/imprint/releases/1.01/imprint/admin/imp.php =================================================================== --- XoopsModules/imprint/releases/1.01/imprint/admin/imp.php (rev 0) +++ XoopsModules/imprint/releases/1.01/imprint/admin/imp.php 2012-02-15 12:57:49 UTC (rev 8990) @@ -0,0 +1,222 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * imprint - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) TXMod Xoops (http://www.txmodxoops.org) + * + * 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 TXMod Xoops (http://www.txmodxoops.org) + * @license GNU GPL + * @package imprint + * @author TXMod Xoops (http://www.txmodxoops.org) + * + * Version : 1.00: + * **************************************************************************** + */ + +include_once("./header.php"); + +xoops_cp_header(); + +if (isset($_REQUEST["op"])) { + $op = $_REQUEST["op"]; +} else { + @$op = "show_list_imp"; +} + +//Menu admin +if ( !is_readable(XOOPS_ROOT_PATH . "/Frameworks/art/functions.admin.php") ) { +imprint_adminmenu(1, _AM_IMPRINT_MANAGER_IMP); +} else { +include_once XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php"; +loadModuleAdminMenu (1, _AM_IMPRINT_MANAGER_IMP); +} + +//Sous menu +echo "<div class=\"CPbigTitle\" style=\"background-image: url(../images/deco/topic.png); background-repeat: no-repeat; background-position: left; padding-left: 50px; height: 48px;\"> + <strong>"._AM_IMPRINT_MANAGER_IMP."</strong> + </div><br /><br>"; +switch ($op) +{ + case "save_imp": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("imp.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["imp_id"])) { + $obj =& $impHandler->get($_REQUEST["imp_id"]); + } else { + $obj =& $impHandler->create(); + } + + //Form imp_title + $obj->setVar("imp_title", $_REQUEST["imp_title"]); + //Form imp_name + $obj->setVar("imp_name", $_REQUEST["imp_name"]); + //Form imp_address + $obj->setVar("imp_address", $_REQUEST["imp_address"]); + //Form imp_postalcode + $obj->setVar("imp_postalcode", $_REQUEST["imp_postalcode"]); + //Form imp_city + $obj->setVar("imp_city", $_REQUEST["imp_city"]); + //Form imp_phone + $obj->setVar("imp_phone", $_REQUEST["imp_phone"]); + //Form imp_fax + $obj->setVar("imp_fax", $_REQUEST["imp_fax"]); + //Form imp_email + $obj->setVar("imp_email", $_REQUEST["imp_email"]); + //Form imp_image + include_once XOOPS_ROOT_PATH."/class/uploader.php"; + $uploaddir_imp_image = XOOPS_ROOT_PATH."/uploads/imprint/imp/imp_image/"; + $uploader_imp_image = new XoopsMediaUploader($uploaddir_imp_image, $xoopsModuleConfig["imp_image_mimetypes"], $xoopsModuleConfig["imp_image_size"], null, null); + + if ($uploader_imp_image->fetchMedia("imp_image")) { + $uploader_imp_image->setPrefix("imp_image_") ; + $uploader_imp_image->fetchMedia("imp_image"); + if (!$uploader_imp_image->upload()) { + $errors = $uploader_imp_image->getErrors(); + redirect_header("javascript:history.go(-1)",3, $errors); + } else { + $obj->setVar("imp_image", $uploader_imp_image->getSavedFileName()); + } + } else { + $obj->setVar("imp_image", $_REQUEST["imp_image"]); + } + //Form imp_title_desclaimer + $obj->setVar("imp_title_desclaimer", $_REQUEST["imp_title_desclaimer"]); + //Form imp_disclaimer + $obj->setVar("imp_disclaimer", $_REQUEST["imp_disclaimer"]); + //Form imp_submitter + $obj->setVar("imp_submitter", $_REQUEST["imp_submitter"]); + //Form imp_date_created + $obj->setVar("imp_date_created", strtotime($_REQUEST["imp_date_created"])); + //Form imp_online + $verif_imp_online = ($_REQUEST["imp_online"] == 1) ? "1" : "0"; + $obj->setVar("imp_online", $verif_imp_online); + + + if ($impHandler->insert($obj)) { + redirect_header("imp.php?op=show_list_imp", 2, _AM_IMPRINT_FORMOK); + } + //include_once("../include/forms.php"); + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + break; + + case "edit_imp": + $obj = $impHandler->get($_REQUEST["imp_id"]); + $form = $obj->getForm(); + break; + case "delete_imp": + $obj =& $impHandler->get($_REQUEST["imp_id"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { redirect_header("imp.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($impHandler->delete($obj)) { redirect_header("imp.php", 3, _AM_IMPRINT_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array("ok" => 1, "imp_id" => $_REQUEST["imp_id"], "op" => "delete_imp"), $_SERVER["REQUEST_URI"], sprintf(_AM_IMPRINT_FORMSUREDEL, $obj->getVar("imp"))); + } + break; + + case "update_online_imp": + + if (isset($_REQUEST["imp_id"])) { + $obj =& $impHandler->get($_REQUEST["imp_id"]); + } + $obj->setVar("imp_online", $_REQUEST["imp_online"]); + + if ($impHandler->insert($obj)) { + redirect_header("imp.php", 3, _AM_IMPRINT_FORMOK); + } + echo $obj->getHtmlErrors(); + + break; + + case "default": + default: + + $criteria = new CriteriaCompo(); + $criteria->setSort("imp_id"); + $criteria->setOrder("ASC"); + $numrows = $impHandler->getCount(); + $imp_arr = $impHandler->getall($criteria); + + //Affichage du tableau + if ($numrows>0) + { + echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> + <tr> + <th align=\"center\">"._AM_IMPRINT_IMP_TITLE."</th> + <th align=\"center\">"._AM_IMPRINT_IMP_NAME."</th> + <th align=\"center\">"._AM_IMPRINT_IMP_ADDRESS."</th> + <th align=\"center\">"._AM_IMPRINT_IMP_POSTALCODE."</th> + <th align=\"center\">"._AM_IMPRINT_IMP_CITY."</th> + <th align=\"center\">"._AM_IMPRINT_IMP_PHONE."</th> + <th align=\"center\">"._AM_IMPRINT_IMP_FAX."</th> + <th align=\"center\">"._AM_IMPRINT_IMP_EMAIL."</th> + <th align=\"center\">"._AM_IMPRINT_IMP_IMAGE."</th> + <th align=\"center\">"._AM_IMPRINT_IMP_TITLE_DESCLAIMER."</th> + <th align=\"center\">"._AM_IMPRINT_IMP_DISCLAIMER."</th> + <th align=\"center\">"._AM_IMPRINT_IMP_SUBMITTER."</th> + <th align=\"center\">"._AM_IMPRINT_IMP_DATE_CREATED."</th> + <th align=\"center\">"._AM_IMPRINT_IMP_ONLINE."</th> + + <th align=\"center\" width=\"10%\">"._AM_IMPRINT_FORMACTION."</th> + </tr>"; + + $class = "odd"; + + foreach (array_keys($imp_arr) as $i) + { + if ( $imp_arr[$i]->getVar("topic_pid") == 0) + { + echo "<tr class=\"".$class."\">"; + $class = ($class == "even") ? "odd" : "even"; + echo "<td align=\"center\">".$imp_arr[$i]->getVar("imp_title")."</td>"; + echo "<td align=\"center\">".$imp_arr[$i]->getVar("imp_name")."</td>"; + echo "<td align=\"center\">".$imp_arr[$i]->getVar("imp_address")."</td>"; + echo "<td align=\"center\">".$imp_arr[$i]->getVar("imp_postalcode")."</td>"; + echo "<td align=\"center\">".$imp_arr[$i]->getVar("imp_city")."</td>"; + echo "<td align=\"center\">".$imp_arr[$i]->getVar("imp_phone")."</td>"; + echo "<td align=\"center\">".$imp_arr[$i]->getVar("imp_fax")."</td>"; + echo "<td align=\"center\">".$imp_arr[$i]->getVar("imp_email")."</td>"; + echo "<td align=\"center\"><img src=\"".XOOPS_URL."/uploads/imprint/imp/imp_image/".$imp_arr[$i]->getVar("imp_image")."\" height=\"30px\" title=\"imp_image\" alt=\"imp_image\"></td>"; + echo "<td align=\"center\">".$imp_arr[$i]->getVar("imp_title_desclaimer")."</td>"; + echo "<td align=\"center\">".$imp_arr[$i]->getVar("imp_disclaimer")."</td>"; + echo "<td align=\"center\">".XoopsUser::getUnameFromId($imp_arr[$i]->getVar("imp_submitter"),"S")."</td>"; + echo "<td align=\"center\">".formatTimeStamp($imp_arr[$i]->getVar("imp_date_created"),"S")."</td>"; + + $online = $imp_arr[$i]->getVar("imp_online"); + + if( $online == 1 ) { + echo "<td align=\"center\"><a href=\"./imp.php?op=update_online_imp&imp_id=".$imp_arr[$i]->getVar("imp_id")."&imp_online=0\"><img src=\"./../images/deco/on.gif\" border=\"0\" alt=\""._AM_IMPRINT_ON."\" title=\""._AM_IMPRINT_ON."\"></a></td>"; + } else { + echo "<td align=\"center\"><a href=\"./imp.php?op=update_online_imp&imp_id=".$imp_arr[$i]->getVar("imp_id")."&imp_online=1\"><img src=\"./../images/deco/off.gif\" border=\"0\" alt=\""._AM_IMPRINT_OFF."\" title=\""._AM_IMPRINT_OFF."\"></a></td>"; + } + echo "<td align=\"center\" width=\"10%\"> + <a href=\"imp.php?op=edit_imp&imp_id=".$imp_arr[$i]->getVar("imp_id")."\"><img src=\"../images/deco/edit.gif\" alt=\""._AM_IMPRINT_EDIT."\" title=\""._AM_IMPRINT_EDIT."\"></a> + <a href=\"imp.php?op=delete_imp&imp_id=".$imp_arr[$i]->getVar("imp_id")."\"><img src=\"../images/deco/delete.gif\" alt=\""._AM_IMPRINT_DELETE."\" title=\""._AM_IMPRINT_DELETE."\"></a> + </td>"; + echo "</tr>"; + } + } + echo "</table><br><br>"; + } + + // Affichage du formulaire + $obj =& $impHandler->create(); + $form = $obj->getForm(); +} +xoops_cp_footer(); + +?> \ No newline at end of file Added: XoopsModules/imprint/releases/1.01/imprint/admin/index.html =================================================================== --- XoopsModules/imprint/releases/1.01/imprint/admin/index.html (rev 0) +++ XoopsModules/imprint/releases/1.01/imprint/admin/index.html 2012-02-15 12:57:49 UTC (rev 8990) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/imprint/releases/1.01/imprint/admin/index.php =================================================================== --- XoopsModules/imprint/releases/1.01/imprint/admin/index.php (rev 0) +++ XoopsModules/imprint/releases/1.01/imprint/admin/index.php 2012-02-15 12:57:49 UTC (rev 8990) @@ -0,0 +1,74 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * imprint - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) TXMod Xoops (http://www.txmodxoops.org) + * + * 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 TXMod Xoops (http://www.txmodxoops.org) + * @license GNU GPL + * @package imprint + * @author TXMod Xoops (http://www.txmodxoops.org) + * + * Version : 1.00: + * **************************************************************************** + */ + +include_once("./header.php"); + +xoops_cp_header(); + +global $xoopsModule; + +//Apelle du menu admin +if ( !is_readable(XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php")) { +imprint_adminmenu(0, _AM_IMPRINT_MANAGER_INDEX); +} else { +include_once XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php"; +loadModuleAdminMenu (0, _AM_IMPRINT_MANAGER_INDEX); +} + //compte "total" + $count_imp = $impHandler->getCount(); + //compte "attente" + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria("imp_online", 1)); + $imp_online = $impHandler->getCount($criteria); + +include_once XOOPS_ROOT_PATH."/modules/imprint/class/menu.php"; + + $menu = new imprintMenu(); + $menu->addItem("imp", "imp.php", "../images/deco/topic.png", _AM_IMPRINT_MANAGER_IMP); + $menu->addItem("update", "../../system/admin.php?fct=modulesadmin&op=update&module=imprint", "../images/deco/update.png", _AM_IMPRINT_MANAGER_UPDATE); + /*$menu->addItem("permissions", "permissions.php", "../images/deco/permissions.png", _AM_IMPRINT_MANAGER_PERMISSIONS); */ + $menu->addItem("preference", "../../system/admin.php?fct=preferences&op=showmod&mod=".$xoopsModule->getVar("mid"). + "&&confcat_id=1", "../images/deco/pref.png", _AM_IMPRINT_MANAGER_PREFERENCES); + $menu->addItem("about", "about.php", "../images/deco/about.png", _AM_IMPRINT_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; height: 48px;\"><strong>"._AM_IMPRINT_MANAGER_INDEX."</strong></div><br /> + <table width=\"100%\" border=\"0\" cellspacing=\"10\" cellpadding=\"4\"> + <tr> + <td valign=\"top\" width=\"auto\">".$menu->render()."</td> + <td valign=\"top\" width=\"auto\">"; + + echo "<fieldset> + <legend class=\"CPmediumTitle\">"._AM_IMPRINT_MANAGER_IMP."</legend> + <br />"; + printf(_AM_IMPRINT_THEREARE_IMP, $count_imp); + echo "<br /><br />"; + printf(_AM_IMPRINT_THEREARE_IMP_ONLINE, $imp_online); + echo "<br /></fieldset><br /><br />"; +echo "</td></tr></table>"; +xoops_cp_footer(); + +?> \ No newline at end of file Added: XoopsModules/imprint/releases/1.01/imprint/admin/menu.php =================================================================== --- XoopsModules/imprint/releases/1.01/imprint/admin/menu.php (rev 0) +++ XoopsModules/imprint/releases/1.01/imprint/admin/menu.php 2012-02-15 12:57:49 UTC (rev 8990) @@ -0,0 +1,35 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * imprint - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) TXMod Xoops (http://www.txmodxoops.org) + * + * 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 TXMod Xoops (http://www.txmodxoops.org) + * @license GNU GPL + * @package imprint + * @author TXMod Xoops (http://www.txmodxoops.org) + * + * Version : 1.00: + * **************************************************************************** + */ + +$adminmenu = array(); +$adminmenu[0]["title"] = _MI_IMPRINT_MANAGER_INDEX; +$adminmenu[0]["link"] = "admin/index.php"; +$adminmenu[1]["title"] = _MI_IMPRINT_MANAGER_IMP; +$adminmenu[1]["link"] = "admin/imp.php"; +//$adminmenu[2]["title"] = _MI_IMPRINT_MANAGER_PERMISSIONS; +//$adminmenu[2]["link"] = "admin/permissions.php"; +$adminmenu[2]["title"] = _MI_IMPRINT_MANAGER_ABOUT; +$adminmenu[2]["link"] = "admin/about.php"; + +?> \ No newline at end of file Added: XoopsModules/imprint/releases/1.01/imprint/blocks/index.html =================================================================== --- XoopsModules/imprint/releases/1.01/imprint/blocks/index.html (rev 0) +++ XoopsModules/imprint/releases/1.01/imprint/blocks/index.html 2012-02-15 12:57:49 UTC (rev 8990) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/imprint/releases/1.01/imprint/changelog.txt =================================================================== --- XoopsModules/imprint/releases/1.01/imprint/changelog.txt (rev 0) +++ XoopsModules/imprint/releases/1.01/imprint/changelog.txt 2012-02-15 12:57:49 UTC (rev 8990) @@ -0,0 +1,11 @@ +Imprint Versione 1.01 +- Base mode +- Database mode with multiple pages + +Italiano +-------- +Questo modulo può essere modificato come vuoi, aggiungendo oppure sottraendo delle voci dal file xoops_version.php. Può essere utilizzato in vari modi anche con l'utilizzo delle tabelle del database che troverete allegato. In versione normale non fa uso di database, ma lo può fare. + +English +------- +This module can be modified as you wish, adding or subtracting items from the file xoops_version.php. It can be used in various ways including the use of database tables that you will find attached. In the normal version does not use databases, but will do so. \ No newline at end of file Added: XoopsModules/imprint/releases/1.01/imprint/class/imp.php =================================================================== --- XoopsModules/imprint/releases/1.01/imprint/class/imp.php (rev 0) +++ XoopsModules/imprint/releases/1.01/imprint/class/imp.php 2012-02-15 12:57:49 UTC (rev 8990) @@ -0,0 +1,135 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * imprint - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) TXMod Xoops (http://www.txmodxoops.org) + * + * 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 TXMod Xoops (http://www.txmodxoops.org) + * @license GNU GPL + * @package imprint + * @author TXMod Xoops (http://www.txmodxoops.org) + * + * Version : 1.00: + * **************************************************************************** + */ + + +if (!defined("XOOPS_ROOT_PATH")) { +die("XOOPS root path not defined"); +} + +if (!class_exists("XoopsPersistableObjectHandler")) { +include_once XOOPS_ROOT_PATH."/modules/imprint/class/object.php"; +} + +class imprint_imp extends XoopsObject +{ +//Constructor +function __construct() +{ +$this->XoopsObject(); +$this->initVar("imp_id",XOBJ_DTYPE_INT,null,false,8); +$this->initVar("imp_title",XOBJ_DTYPE_TXTBOX,null,false); +$this->initVar("imp_name",XOBJ_DTYPE_TXTBOX,null,false); +$this->initVar("imp_address",XOBJ_DTYPE_TXTBOX,null,false); +$this->initVar("imp_postalcode",XOBJ_DTYPE_TXTBOX,null,false); +$this->initVar("imp_city",XOBJ_DTYPE_TXTBOX,null,false); +$this->initVar("imp_phone",XOBJ_DTYPE_TXTBOX,null,false); +$this->initVar("imp_fax",XOBJ_DTYPE_TXTBOX,null,false); +$this->initVar("imp_email",XOBJ_DTYPE_TXTBOX,null,false); +$this->initVar("imp_image",XOBJ_DTYPE_TXTBOX,null,false); +$this->initVar("imp_title_desclaimer",XOBJ_DTYPE_TXTBOX,null,false); +$this->initVar("imp_disclaimer",XOBJ_DTYPE_TXTAREA,null,false); +$this->initVar("imp_submitter",XOBJ_DTYPE_INT,null,false,10); +$this->initVar("imp_date_created",XOBJ_DTYPE_INT,null,false,10); +$this->initVar("imp_online",XOBJ_DTYPE_INT,null,false,1); + +// Pour autoriser le html +$this->initVar("dohtml", XOBJ_DTYPE_INT, 1, false); + +} + +function imprint_imp() +{ +$this->__construct(); +} + +function getForm($action = false) +{ +global $xoopsDB, $xoopsModuleConfig; + +if ($action === false) { +$action = $_SERVER["REQUEST_URI"]; +} + +$title = $this->isNew() ? sprintf(_AM_IMPRINT_IMP_ADD) : sprintf(_AM_IMPRINT_IMP_EDIT); + +include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php"); + +$form = new XoopsThemeForm($title, "form", $action, "post", true); +$form->setExtra('enctype="multipart/form-data"'); + +$form->addElement(new XoopsFormText(_AM_IMPRINT_IMP_TITLE, "imp_title", 50, 255, $this->getVar("imp_title")), true); +$form->addElement(new XoopsFormText(_AM_IMPRINT_IMP_NAME, "imp_name", 50, 255, $this->getVar("imp_name")), true); +$form->addElement(new XoopsFormText(_AM_IMPRINT_IMP_ADDRESS, "imp_address", 50, 255, $this->getVar("imp_address")), true); +$form->addElement(new XoopsFormText(_AM_IMPRINT_IMP_POSTALCODE, "imp_postalcode", 50, 255, $this->getVar("imp_postalcode")), true); +$form->addElement(new XoopsFormText(_AM_IMPRINT_IMP_CITY, "imp_city", 50, 255, $this->getVar("imp_city")), true); +$form->addElement(new XoopsFormText(_AM_IMPRINT_IMP_PHONE, "imp_phone", 50, 255, $this->getVar("imp_phone")), true); +$form->addElement(new XoopsFormText(_AM_IMPRINT_IMP_FAX, "imp_fax", 50, 255, $this->getVar("imp_fax")), true); +$form->addElement(new XoopsFormText(_AM_IMPRINT_IMP_EMAIL, "imp_email", 50, 255, $this->getVar("imp_email")), true); + +$imp_image = $this->getVar("imp_image") ? $this->getVar("imp_image") : 'blank.gif'; + +$uploadirectory_imp_image = '/uploads/imprint/imp/imp_image'; +$imgtray_imp_image = new XoopsFormElementTray(_AM_IMPRINT_IMP_IMAGE,'<br />'); +$imgpath_imp_image = sprintf(_AM_IMPRINT_FORMIMAGE_PATH, $uploadirectory_imp_image); +$imageselect_imp_image = new XoopsFormSelect($imgpath_imp_image, 'imp_image', $imp_image); +$image_array_imp_image = XoopsLists :: getImgListAsArray( XOOPS_ROOT_PATH.$uploadirectory_imp_image ); +foreach( $image_array_imp_image as $image_imp_image ) { +$imageselect_imp_image->addOption("$image_imp_image", $image_imp_image); +} +$imageselect_imp_image->setExtra( "onchange='showImgSelected(\"image_imp_image\", \"imp_image\", \"".$uploadirectory_imp_image."\", \"\", \"".XOOPS_URL."\")'" ); +$imgtray_imp_image->addElement($imageselect_imp_image, false); +$imgtray_imp_image->addElement( new XoopsFormLabel( '', "<br /><img src='".XOOPS_URL."/".$uploadirectory_imp_image."/".$imp_image."' name='image_imp_image' id='image_imp_image' alt='' />" ) ); + +$fileseltray_imp_image = new XoopsFormElementTray('','<br />'); +$fileseltray_imp_image->addElement(new XoopsFormFile(_AM_IMPRINT_FORMUPLOAD , "imp_image", $xoopsModuleConfig["imp_image_size"]),false); +$fileseltray_imp_image->addElement(new XoopsFormLabel(''), false); +$imgtray_imp_image->addElement($fileseltray_imp_image); +$form->addElement($imgtray_imp_image); + +$form->addElement(new XoopsFormText(_AM_IMPRINT_IMP_TITLE_DESCLAIMER, "imp_title_desclaimer", 50, 255, $this->getVar("imp_title_desclaimer")), true); +$form->addElement(new XoopsFormTextArea(_AM_IMPRINT_IMP_DISCLAIMER, "imp_disclaimer", $this->getVar("imp_disclaimer"), 4, 47), true); +$form->addElement(new XoopsFormSelectUser(_AM_IMPRINT_IMP_SUBMITTER, "imp_submitter", false, $this->getVar("imp_submitter"), 1, false), true); +$form->addElement(new XoopsFormTextDateSelect(_AM_IMPRINT_IMP_DATE_CREATED, "imp_date_created", "", $this->getVar("imp_date_created"))); + $imp_online = $this->isNew() ? 1 : $this->getVar("imp_online"); +$check_imp_online = new XoopsFormCheckBox(_AM_IMPRINT_IMP_ONLINE, "imp_online", $imp_online); +$check_imp_online->addOption(1, " "); +$form->addElement($check_imp_online); + +$form->addElement(new XoopsFormHidden("op", "save_imp")); +$form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit")); +$form->display(); +return $form; +} +} +class imprintimprint_impHandler extends XoopsPersistableObjectHandler +{ + +function __construct(&$db) +{ +parent::__construct($db, "imprint_imp", "imprint_imp", "imp_id", "imp_title"); +} + +} + +?> \ No newline at end of file Added: XoopsModules/imprint/releases/1.01/imprint/class/index.html =================================================================== --- XoopsModules/imprint/releases/1.01/imprint/class/index.html (rev 0) +++ XoopsModules/imprint/releases/1.01/imprint/class/index.html 2012-02-15 12:57:49 UTC (rev 8990) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/imprint/releases/1.01/imprint/class/menu.php =================================================================== --- XoopsModules/imprint/releases/1.01/imprint/class/menu.php (rev 0) +++ XoopsModules/imprint/releases/1.01/imprint/class/menu.php 2012-02-15 12:57:49 UTC (rev 8990) @@ -0,0 +1,176 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * imprint - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) TXMod Xoops (http://www.txmodxoops.org) + * + * 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 TXMod Xoops (http://www.txmodxoops.org) + * @license GNU GPL + * @package imprint + * @author TXMod Xoops (http://www.txmodxoops.org) + * + * Version : 1.00: + * **************************************************************************** + */ + +class imprintMenu +{ + public $Width = 100; + public $Height = 100; + public $BgColor = "transparent"; + public $OverBgColor = "#FFF6C1"; + public $BorderWidth = 1; + public $BorderColor = "#CCCCCC"; + public $OverBorderColor = "#FF9900"; + public $BorderStyle = "solid"; + public $OverBorderStyle = "solid"; + public $Font = "Tahoma, Arial, Helvetica"; + public $FontColor = "#666666"; + public $OverFontColor = "#1E90FF"; + public $FontDeco = "none"; + public $OverFontDeco = "none"; + public $FontSize = 11; + public $FontWeight = "bold"; + public $FontExtra = "Tahoma, Arial, Helvetica"; + public $FontExtraColor = "#A98952"; + public $OverFontExtraColor = "#0033FF"; + public $FontExtraDeco = "underline"; + public $OverFontExtraDeco = "underline"; + public $FontExtraSize = 9; + public $FontExtraWeight = "normal"; + public $TextAlign = "center"; + private $_items = array(); + + public function addItem($id, $link="", $icon="", $name="", $extra="", $alt=""){ + if (isset($this->_items[$id])) return false; + $rtn["link"] = $link; + $rtn["icon"] = $icon; + $rtn["name"] = $name; + $rtn["extra"] = $extra; + $rtn["alt"] = $alt; + $this->_items[$id] = $rtn; + return true; + } + + public function setLink($id, $link){ + if (isset($this->_items[$id])){ + $this->_items[$id]["link"] = $link; + return true; + } else { + return false; + } + } + + public function setIcon($id, $icon){ + if (isset($this->_items[$id])){ + $this->_items[$id]["icon"] = $icon; + return true; + } else { + return false; + } + } + + public function setName($id, $name){ + if (isset($this->_items[$id])){ + $this->_items[$id]["name"] = $name; + return true; + } else { + return false; + } + } + + public function setExtra($id, $extra){ + if (isset($this->_items[$id])){ + $this->_items[$id]["extra"] = $extra; + return true; + } else { + return false; + } + } + + public function setAlt($id, $alt){ + if (isset($this->_items[$id])){ + $this->_items[$id]["alt"] = $alt; + return true; + } else { + return false; + } + } + + public function getCSS($ws = true){ + if ($ws) $csscode = "<style type=\"text/css\">\n<!--"; + $csscode .= "div.rmmenuicon{ + margin: 3px; + font-family: $this->Font; + text-align: ".$this->TextAlign."; + } + div.rmmenuicon a { + display: block; float: left; + height: ".$this->Height."px !important; + height: ".$this->Height."px; + width: ".$this->Width."px !important; + width: ".$this->Width."px; + vertical-align: middle; + text-decoration : none; + border: ".$this->BorderWidth."px $this->BorderStyle $this->BorderColor; + padding: 2px 5px 1px 5px; + margin: 3px; + color: $this->FontColor; + } + div.rmmenuicon img { margin-top: 8px; margin-bottom: 8px; } + div.rmmenuicon a span { + font-size: ".$this->FontSize."px; + font-weight: $this->FontWeight; + display: block; + } + div.rmmenuicon a span.uno{ + font-size: ".$this->FontExtraSize."px; + font-weight: $this->FontExtraWeight; + text-decoration: $this->FontExtraDeco; + color: $this->FontExtraColor; + } + div.rmmenuicon a:hover{ + background-color: $this->OverBgColor; + border: ".$this->BorderWidth."px $this->BorderStyle $this->OverBorderColor; + color: $this->OverFontColor; + } + div.rmmenuicon a:hover span{ + text-decoration: $this->OverFontDeco; + } + div.rmmenuicon a:hover span.uno{ + text-decoration: $this->OverFontExtraDeco; + color: $this->OverFontExtraColor; + }"; + if ($ws) $csscode .= "\n-->\n</style>"; + return $csscode; + } + + public function render(){ + + $ret = "<div class=\"rmmenuicon\">"; + foreach ($this->_items as $k => $v){ + $ret .= "<a href=\"".$v["link"]."\" title=\"".($v["alt"]!="" ? $v["alt"] : $v["name"])."\">".($v["icon"]!="" ? "<img src=\"".$v["icon"]."\" alt=\"".$v["name"]."\" /> " : ""); + if ($v["name"] != "") $ret .= "<span>".$v["name"]."</span>"; + if ($v["extra"] != "") $ret .= "<span class=\"uno\">".$v["extra"]."</span>"; + if ($v["extra"] != "") $ret .= "<span class=\"uno\">".$v["extra"]."</span>"; + $ret .= "</a>"; + } + $ret .= "</div><div style=\"clear: both;\"></div>"; + return $ret; + } + + public function display(){ + echo $this->render(); + } +} + +?> \ No newline at end of file Added: XoopsModules/imprint/releases/1.01/imprint/class/object.php =================================================================== --- XoopsModules/imprint/releases/1.01/imprint/class/object.php (rev 0) +++ XoopsModules/imprint/releases/1.01/imprint/class/object.php 2012-02-15 12:57:49 UTC (rev 8990) @@ -0,0 +1,412 @@ +<?php +/** + * **************************************************************************** + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * + * Cette licence, contient des limitations!!! + * + * 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. + * + * @license TDM GPL license + * @author TDM TEAM DEV MODULE + * + * **************************************************************************** + */ + +class XoopsPersistableObjectHandler extends XoopsObjectHandler{ + + /** + * Information about the class, the handler is managing + * + * @var string + */ + var $table; + var $keyName; + var $className; + var $identifierName; + + + /** + * Constructor - called from child classes + * @param object $db {@link XoopsDatabase} object + * @param string $tablename Name of database table + * @param string $classname Name of Class, this handler is managing + * @param string $keyname Name of the property, holding the key + * + * @return void + */ + function XoopsPersistableObjectHandler(&$db, $tablename, $classname, $keyname, $idenfierName = false) { + $this->XoopsObjectHandler($db); + $this->table = $db->prefix($tablename); + $this->keyName = $keyname; + $this->className = $classname; + if ($idenfierName != false) { + $this->identifierName = $idenfierName; + } + } + + /** + * create a new user + * + * @param bool $isNew Flag the new objects as "new"? + * + * @return object + */ + function &create($isNew = true) { + $obj =& new $this->className(); + if ($isNew === true) { + $obj->setNew(); + } + return $obj; + } + + /** + * retrieve an object + * + * @param mixed $id ID of the object - or array of ids for joint keys. Joint keys MUST be given in the same order as in the constructor + * @param bool $as_object whether to return an object or an array + * @return mixed reference to the object, FALSE if failed + */ + function &get($id, $as_object=true) { + if (is_array($this->keyName)) { + $criteria = new CriteriaCompo(); + for ($i = 0; $i < count($this->keyName); $i++) { + $criteria->add(new Criteria($this->keyName[$i], intval($id[$i]))); + } + } else { + $criteria = new Criteria($this->keyName, intval($id)); + } + $criteria->setLimit(1); + $obj_array = $this->getObjects($criteria, false, $as_object); + if (count($obj_array) != 1) { + $obj = $this->create(); + return $obj; + } + return $obj_array[0]; + } + + /** + * retrieve objects from the database + * + * @param object $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the ID as key for the array? + * @param bool $as_object return an array of objects? + * + * @return array + */ + function getObjects($criteria=null, $id_as_key=false, $as_object=true){ + $ret = array(); + $limit = $start = 0; + $sql = 'SELECT * FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->getSort() != '') { + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + return $this->convertResultSet($result, $id_as_key, $as_object); + } + + /** + * Convert a database resultset to a returnable array + * + * @param object $result database resultset + * @param bool $id_as_key - should NOT be used with joint keys + * @param bool $as_object + * + * @return array + */ + function convertResultSet($result, $id_as_key = false, $as_object = true) { + $ret = array(); + while ($myrow = $this->db->fetchArray($result)) { + $obj =& $this->create(false); + $obj->assignVars($myrow); + if (!$id_as_key) { + if ($as_object) { + $ret[] =& $obj; + } else { + $row = array(); + $vars = $obj->getVars(); + foreach (array_keys($vars) as $i) { + $row[$i] = $obj->getVar($i); + } + $ret[] = $row; + } + } else { + if ($as_object) { + $ret[$myrow[$this->keyName]] =& $obj; + } else { + $row = array(); + $vars = $obj->getVars(); + foreach (array_keys($vars) as $i) { + $row[$i] = $obj->getVar($i); + } + $ret[$myrow[$this->keyName]] = $row; + } + } + unset($obj); + } + return $ret; + } + + /** + * Retrieve a list of objects as arrays - DON'T USE WITH JOINT KEYS + * + * @param object $criteria {@link CriteriaElement} conditions to be met + * @param int $limit Max number of objects to fetch + * @param int $start Which record to start at + * + * @return array + */ + function getList($criteria = null, $limit = 0, $start = 0) { + $ret = array(); + if ($criteria == null) { + $criteria = new CriteriaCompo(); + } + + if ($criteria->getSort() == '') { + $criteria->setSort($this->identifierName); + } + + $sql = 'SELECT '.$this->keyName; + if(!empty($this->identifierName)){ + $sql .= ', '.$this->identifierName; + } + $sql .= ' FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->getSort() != '') { + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + $myts =& MyTextSanitizer::getInstance(); + while ($myrow = $this->db->fetchArray($result)) { + //identifiers should be textboxes, so sanitize them like that + $ret[$myrow[$this->keyName]] = empty($this->identifierName)?1:$myts->htmlSpecialChars($myrow[$this->identifierName]); + } + return $ret; + } + + /** + * count objects matching a condition + * + * @param object $criteria {@link CriteriaElement} to match + * @return int count of objects + */ + function getCount($criteria=null){ + $field = ""; + $groupby = false; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + if ($criteria->groupby != "") { + $groupby = true; + $field = $criteria->groupby.", "; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used + } + } + $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->groupby != "") { + $sql .= $criteria->getGroupby(); + } + } + $result = $this->db->query($sql); + if (!$result) { + return 0; + } + if ($groupby == false) { + list($count) = $this->db->fetchRow($result); + return $count; + } else { + $ret = array(); + while (list($id, $count) = $this->db->fetchRow($result)) { + $ret[$id] = $count; + } + return $ret; + } + } + + /** + * delete an object from the database + * + * @param object $obj reference to the object to delete + * @param bool $force + * @return bool FALSE if failed. + */ + function delete(&$obj, $force = false){ + if (is_array($this->keyName)) { + $clause = array(); + for ($i = 0; $i < count($this->keyName); $i++) { + $clause[] = $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]); + } + $whereclause = implode(" AND ", $clause); + } else { + $whereclause = $this->keyName." = ".$obj->getVar($this->keyName); + } + $sql = "DELETE FROM ".$this->table." WHERE ".$whereclause; + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } + + /** + * insert a new object in the database + * + * @param object $obj reference to the object + * @param bool $force whether to force the query execution despite security settings + * @param bool $checkObject check if the object is dirty and clean the attributes + * @return bool FALSE if failed, TRUE if already present and unchanged or successful + */ + + function insert(&$obj, $force=false, $checkObject=true){ + if ($checkObject != false) { + if (!is_object($obj)) { + var_dump($obj); + return false; + } + /** + * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5 + */ + if (!is_a($obj, $this->className)) { + $obj->setErrors(get_class($obj)." Differs from ".$this->className); + return false; + } + if (!$obj->isDirty()) { + $obj->setErrors("Not dirty"); //will usually not be outputted as errors are not displayed when the method returns true, but it can be helpful when troubleshooting code - Mith + return true; + } + } + if (!$obj->cleanVars()) { + return false; + } + + foreach ($obj->cleanVars as $k => $v) { + if ($obj->vars[$k]['data_type'] == XOBJ_DTYPE_INT) { + $cleanvars[$k] = intval($v); + } elseif ( is_array( $v ) ) { + $cleanvars[ $k ] = $this->db->quoteString( implode( ',', $v ) ); + } else { + $cleanvars[$k] = $this->db->quoteString($v); + } + } + if ($obj->isNew()) { + if (!is_array($this->keyName)) { + if ($cleanvars[$this->keyName] < 1) { + $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq'); + } + } + $sql = "INSERT INTO ".$this->table." (".implode(',', array_keys($cleanvars)).") VALUES (".implode(',', array_values($cleanvars)) .")"; + } else { + $sql = "UPDATE ".$this->table." SET"; + foreach ($cleanvars as $key => $value) { + if ((!is_array($this->keyName) && $key == $this->keyName) || (is_array($this->keyName) && in_array($key, $this->keyName))) { + continue; + } + if (isset($notfirst) ) { + $sql .= ","; + } + $sql .= " ".$key." = ".$value; + $notfirst = true; + } + if (is_array($this->keyName)) { + $whereclause = ""; + for ($i = 0; $i < count($this->keyName); $i++) { + if ($i > 0) { + $whereclause .= " AND "; + } + $whereclause .= $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]); + } + } else { + $whereclause = $this->keyName." = ".$obj->getVar($this->keyName); + } + $sql .= " WHERE ".$whereclause; + } + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + if ($obj->isNew() && !is_array($this->keyName)) { + $obj->assignVar($this->keyName, $this->db->getInsertId()); + } + return true; + } + + /** + * Change a value for objects with a certain criteria + * + * @param string $fieldname Name of the field + * @param string $fieldvalue Value to write + * @param object $criteria {@link CriteriaElement} + * @return bool + */ + function updateAll($fieldname, $fieldvalue, $criteria = null, $force = false){ + $set_clause = $fieldname . ' = '; + if ( is_numeric( $fieldvalue ) ) { + $set_clause .= $fieldvalue; + } elseif ( is_array( $fieldvalue ) ) { + $set_clause .= $this->db->quoteString( implode( ',', $fieldvalue ) ); + } else { + $set_clause .= $this->db->quoteString( $fieldvalue ); + } + $sql = 'UPDATE '.$this->table.' SET '.$set_clause; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + } + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } + + /** + * delete all objects meeting the conditions + * + * @param object $criteria {@link CriteriaElement} with conditions to meet + * @return bool + */ + function deleteAll($criteria = null){ + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql = 'DELETE FROM '.$this->table; + $sql .= ' '.$criteria->renderWhere(); + if (!$this->db->queryF($sql)) { + return false; + } + $rows = $this->db->getAffectedRows(); + return $rows > 0 ? $rows : true; + } + return false; + } +} +?> \ No newline at end of file Added: XoopsModules/imprint/releases/1.01/imprint/header.php =================================================================== --- XoopsModules/imprint/releases/1.01/imprint/header.php (rev 0) +++ XoopsModules/imprint/releases/1.01/imprint/header.php 2012-02-15 12:57:49 UTC (rev 8990) @@ -0,0 +1,37 @@ +<?php +/** + * ************************************... [truncated message content] |
From: <txm...@us...> - 2012-02-15 13:04:56
|
Revision: 8991 http://xoops.svn.sourceforge.net/xoops/?rev=8991&view=rev Author: txmodxoops Date: 2012-02-15 13:04:41 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Module Password Generator v1.15 Final Added Paths: ----------- XoopsModules/passgen/ XoopsModules/passgen/branches/ XoopsModules/passgen/releases/ XoopsModules/passgen/releases/1.15/ XoopsModules/passgen/releases/1.15/passgen/ XoopsModules/passgen/releases/1.15/passgen/admin/ XoopsModules/passgen/releases/1.15/passgen/admin/about.php XoopsModules/passgen/releases/1.15/passgen/admin/admin_footer.php XoopsModules/passgen/releases/1.15/passgen/admin/admin_header.php XoopsModules/passgen/releases/1.15/passgen/admin/index.html XoopsModules/passgen/releases/1.15/passgen/admin/index.php XoopsModules/passgen/releases/1.15/passgen/admin/menu.php XoopsModules/passgen/releases/1.15/passgen/blocks/ XoopsModules/passgen/releases/1.15/passgen/blocks/blocks_passgen.php XoopsModules/passgen/releases/1.15/passgen/blocks/index.html XoopsModules/passgen/releases/1.15/passgen/changelog.txt XoopsModules/passgen/releases/1.15/passgen/class/ XoopsModules/passgen/releases/1.15/passgen/class/index.html XoopsModules/passgen/releases/1.15/passgen/class/menu.php XoopsModules/passgen/releases/1.15/passgen/class/object.php XoopsModules/passgen/releases/1.15/passgen/header.php XoopsModules/passgen/releases/1.15/passgen/images/ XoopsModules/passgen/releases/1.15/passgen/images/deco/ XoopsModules/passgen/releases/1.15/passgen/images/deco/about.png XoopsModules/passgen/releases/1.15/passgen/images/deco/arrow.gif XoopsModules/passgen/releases/1.15/passgen/images/deco/delete.gif XoopsModules/passgen/releases/1.15/passgen/images/deco/edit.gif XoopsModules/passgen/releases/1.15/passgen/images/deco/index.html XoopsModules/passgen/releases/1.15/passgen/images/deco/index.png XoopsModules/passgen/releases/1.15/passgen/images/deco/off.gif XoopsModules/passgen/releases/1.15/passgen/images/deco/on.gif XoopsModules/passgen/releases/1.15/passgen/images/deco/permissions.png XoopsModules/passgen/releases/1.15/passgen/images/deco/pref.png XoopsModules/passgen/releases/1.15/passgen/images/deco/update.png XoopsModules/passgen/releases/1.15/passgen/images/index.html XoopsModules/passgen/releases/1.15/passgen/images/menu/ XoopsModules/passgen/releases/1.15/passgen/images/menu/bg.png XoopsModules/passgen/releases/1.15/passgen/images/menu/index.html XoopsModules/passgen/releases/1.15/passgen/images/menu/left_both.png XoopsModules/passgen/releases/1.15/passgen/images/menu/right_both.png XoopsModules/passgen/releases/1.15/passgen/images/passgen_logo.png XoopsModules/passgen/releases/1.15/passgen/images/passgen_slogo.png XoopsModules/passgen/releases/1.15/passgen/images/txmod_logo.png XoopsModules/passgen/releases/1.15/passgen/include/ XoopsModules/passgen/releases/1.15/passgen/include/Handheld.css XoopsModules/passgen/releases/1.15/passgen/include/Passgen.js XoopsModules/passgen/releases/1.15/passgen/include/Print.css XoopsModules/passgen/releases/1.15/passgen/include/Screen.css XoopsModules/passgen/releases/1.15/passgen/include/configs.php XoopsModules/passgen/releases/1.15/passgen/include/functions.php XoopsModules/passgen/releases/1.15/passgen/include/index.html XoopsModules/passgen/releases/1.15/passgen/include/install.php XoopsModules/passgen/releases/1.15/passgen/index.php XoopsModules/passgen/releases/1.15/passgen/language/ XoopsModules/passgen/releases/1.15/passgen/language/english/ XoopsModules/passgen/releases/1.15/passgen/language/english/admin.php XoopsModules/passgen/releases/1.15/passgen/language/english/blocks.php XoopsModules/passgen/releases/1.15/passgen/language/english/index.html XoopsModules/passgen/releases/1.15/passgen/language/english/main.php XoopsModules/passgen/releases/1.15/passgen/language/english/modinfo.php XoopsModules/passgen/releases/1.15/passgen/language/french/ XoopsModules/passgen/releases/1.15/passgen/language/french/admin.php XoopsModules/passgen/releases/1.15/passgen/language/french/blocks.php XoopsModules/passgen/releases/1.15/passgen/language/french/index.html XoopsModules/passgen/releases/1.15/passgen/language/french/main.php XoopsModules/passgen/releases/1.15/passgen/language/french/modinfo.php XoopsModules/passgen/releases/1.15/passgen/language/index.html XoopsModules/passgen/releases/1.15/passgen/language/italian/ XoopsModules/passgen/releases/1.15/passgen/language/italian/admin.php XoopsModules/passgen/releases/1.15/passgen/language/italian/blocks.php XoopsModules/passgen/releases/1.15/passgen/language/italian/index.html XoopsModules/passgen/releases/1.15/passgen/language/italian/main.php XoopsModules/passgen/releases/1.15/passgen/language/italian/modinfo.php XoopsModules/passgen/releases/1.15/passgen/sql/ XoopsModules/passgen/releases/1.15/passgen/sql/index.html XoopsModules/passgen/releases/1.15/passgen/templates/ XoopsModules/passgen/releases/1.15/passgen/templates/blocks/ XoopsModules/passgen/releases/1.15/passgen/templates/blocks/index.html XoopsModules/passgen/releases/1.15/passgen/templates/blocks/passgen_block.html XoopsModules/passgen/releases/1.15/passgen/templates/index.html XoopsModules/passgen/releases/1.15/passgen/templates/passgen_index.html XoopsModules/passgen/releases/1.15/passgen/xoops_version.php XoopsModules/passgen/trunk/ Added: XoopsModules/passgen/releases/1.15/passgen/admin/about.php =================================================================== --- XoopsModules/passgen/releases/1.15/passgen/admin/about.php (rev 0) +++ XoopsModules/passgen/releases/1.15/passgen/admin/about.php 2012-02-15 13:04:41 UTC (rev 8991) @@ -0,0 +1,116 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Pass Gen - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://www.txmodxoops.org) + * + * 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 txmod (http://www.txmodxoops.org) + * @license GNU GPL + * @package Pass Gen + * @author txmod (web...@tx...) + * + * Version : 1.00: + * **************************************************************************** + */ + +include_once("admin_header.php"); + +xoops_cp_header(); + +if ( !is_readable(XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php")) { +passgen_adminmenu(1, _AM_PASSGEN_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 (1, _AM_PASSGEN_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_PASSGEN_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_PASSGEN_ABOUT_RELEASEDATE.":</label><text>".$versioninfo->getInfo("release")."</text><br /> + <label>"._AM_PASSGEN_ABOUT_AUTHOR.":</label><text>".$versioninfo->getInfo("author")."</text><br /> + <label>"._AM_PASSGEN_ABOUT_CREDITS.":</label><text>".$versioninfo->getInfo("credits")."</text><br /> + <label>"._AM_PASSGEN_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_PASSGEN_ABOUT_MODULE_INFO."</legend> + <div style=\"padding: 8px;\"> + <label>"._AM_PASSGEN_ABOUT_MODULE_STATUS.":</label><text>".$versioninfo->getInfo("module_status")."</text><br /> + <label>"._AM_PASSGEN_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_PASSGEN_ABOUT_AUTHOR_INFO."</legend> + <div style=\"padding: 8px;\"> + <label>"._AM_PASSGEN_ABOUT_AUTHOR_NAME.":</label><text>".$versioninfo->getInfo("author")."</text><br /> + <label>"._AM_PASSGEN_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_PASSGEN_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/passgen/releases/1.15/passgen/admin/admin_footer.php =================================================================== --- XoopsModules/passgen/releases/1.15/passgen/admin/admin_footer.php (rev 0) +++ XoopsModules/passgen/releases/1.15/passgen/admin/admin_footer.php 2012-02-15 13:04:41 UTC (rev 8991) @@ -0,0 +1,29 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Pass Gen - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://www.txmodxoops.org) + * + * 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 txmod (http://www.txmodxoops.org) + * @license GNU GPL + * @package Pass Gen + * @author txmod (web...@tx...) + * + * Version : 1.00: + * **************************************************************************** + */ + +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/passgen/releases/1.15/passgen/admin/admin_header.php =================================================================== --- XoopsModules/passgen/releases/1.15/passgen/admin/admin_header.php (rev 0) +++ XoopsModules/passgen/releases/1.15/passgen/admin/admin_header.php 2012-02-15 13:04:41 UTC (rev 8991) @@ -0,0 +1,103 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Pass Gen - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://www.txmodxoops.org) + * + * 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 txmod (http://www.txmodxoops.org) + * @license GNU GPL + * @package Pass Gen + * @author txmod (web...@tx...) + * + * 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(); + +if ( $xoopsUser ) { + $xoopsModule = XoopsModule::getByDirname("passgen"); + 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 passgen_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/passgen/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/passgen/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/passgen/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_PASSGEN_GENERALSET</a> + | <a href=\"".XOOPS_URL."/modules/passgen/index.php\">_AM_PASSGEN_GOINDEX</a> + | <a href=\"".XOOPS_URL."/modules/passgen/admin/upgrade.php\">_AM_PASSGEN_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/passgen/admin/index.php\"><span>_MI_PASSGEN_MANAGER_INDEX</span></a></li> + <li id=\"$tblColors[1]\"><a href=\"".XOOPS_URL."/modules/passgen/admin/about.php\"><span>_MI_PASSGEN_MANAGER_ABOUT</span></a></li> + </ul></div>"; +} + +?> \ No newline at end of file Added: XoopsModules/passgen/releases/1.15/passgen/admin/index.html =================================================================== --- XoopsModules/passgen/releases/1.15/passgen/admin/index.html (rev 0) +++ XoopsModules/passgen/releases/1.15/passgen/admin/index.html 2012-02-15 13:04:41 UTC (rev 8991) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/passgen/releases/1.15/passgen/admin/index.php =================================================================== --- XoopsModules/passgen/releases/1.15/passgen/admin/index.php (rev 0) +++ XoopsModules/passgen/releases/1.15/passgen/admin/index.php 2012-02-15 13:04:41 UTC (rev 8991) @@ -0,0 +1,57 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Pass Gen - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://www.txmodxoops.org) + * + * 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 txmod (http://www.txmodxoops.org) + * @license GNU GPL + * @package Pass Gen + * @author txmod (web...@tx...) + * + * Version : 1.00: + * **************************************************************************** + */ + +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")) { +passgen_adminmenu(0, _AM_PASSGEN_MANAGER_INDEX); +} else { +include_once XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php"; +loadModuleAdminMenu (0, _AM_PASSGEN_MANAGER_INDEX); +} + +include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->dirname()."/class/menu.php"; + + $menu = new passgenMenu(); + $menu->addItem("update", "../../system/admin.php?fct=modulesadmin&op=update&module=passgen", "../images/deco/update.png", _AM_PASSGEN_MANAGER_UPDATE); + $menu->addItem("preference", "../../system/admin.php?fct=preferences&op=showmod&mod=".$xoopsModule->getVar("mid")."&&confcat_id=1", "../images/deco/pref.png", _AM_PASSGEN_MANAGER_PREFERENCES); + $menu->addItem("about", "about.php", "../images/deco/about.png", _AM_PASSGEN_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_PASSGEN_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 "</td> + </tr> + </table>"; +include_once("admin_footer.php"); +xoops_cp_footer(); + +?> \ No newline at end of file Added: XoopsModules/passgen/releases/1.15/passgen/admin/menu.php =================================================================== --- XoopsModules/passgen/releases/1.15/passgen/admin/menu.php (rev 0) +++ XoopsModules/passgen/releases/1.15/passgen/admin/menu.php 2012-02-15 13:04:41 UTC (rev 8991) @@ -0,0 +1,31 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Pass Gen - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://www.txmodxoops.org) + * + * 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 txmod (http://www.txmodxoops.org) + * @license GNU GPL + * @package Pass Gen + * @author txmod (web...@tx...) + * + * Version : 1.00: + * **************************************************************************** + */ + +$adminmenu = array(); +$adminmenu[0]["title"] = _MI_PASSGEN_MANAGER_INDEX; +$adminmenu[0]["link"] = "admin/index.php"; +$adminmenu[1]["title"] = _MI_PASSGEN_MANAGER_ABOUT; +$adminmenu[1]["link"] = "admin/about.php"; + +?> \ No newline at end of file Added: XoopsModules/passgen/releases/1.15/passgen/blocks/blocks_passgen.php =================================================================== --- XoopsModules/passgen/releases/1.15/passgen/blocks/blocks_passgen.php (rev 0) +++ XoopsModules/passgen/releases/1.15/passgen/blocks/blocks_passgen.php 2012-02-15 13:04:41 UTC (rev 8991) @@ -0,0 +1,25 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Pass Gen - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://www.txmodxoops.org) + * + * 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 txmod (http://www.txmodxoops.org) + * @license GNU GPL + * @package Pass Gen + * @author txmod (web...@tx...) + * + * Version : 1.00: + * **************************************************************************** + */ + + ?> \ No newline at end of file Added: XoopsModules/passgen/releases/1.15/passgen/blocks/index.html =================================================================== --- XoopsModules/passgen/releases/1.15/passgen/blocks/index.html (rev 0) +++ XoopsModules/passgen/releases/1.15/passgen/blocks/index.html 2012-02-15 13:04:41 UTC (rev 8991) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/passgen/releases/1.15/passgen/changelog.txt =================================================================== --- XoopsModules/passgen/releases/1.15/passgen/changelog.txt (rev 0) +++ XoopsModules/passgen/releases/1.15/passgen/changelog.txt 2012-02-15 13:04:41 UTC (rev 8991) @@ -0,0 +1,5 @@ +[Password Generator] + +. Final Release 20/07/2010 +. Javascript Functions +. Advertisement Preferences \ No newline at end of file Added: XoopsModules/passgen/releases/1.15/passgen/class/index.html =================================================================== --- XoopsModules/passgen/releases/1.15/passgen/class/index.html (rev 0) +++ XoopsModules/passgen/releases/1.15/passgen/class/index.html 2012-02-15 13:04:41 UTC (rev 8991) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/passgen/releases/1.15/passgen/class/menu.php =================================================================== --- XoopsModules/passgen/releases/1.15/passgen/class/menu.php (rev 0) +++ XoopsModules/passgen/releases/1.15/passgen/class/menu.php 2012-02-15 13:04:41 UTC (rev 8991) @@ -0,0 +1,176 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Pass Gen - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://www.txmodxoops.org) + * + * 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 txmod (http://www.txmodxoops.org) + * @license GNU GPL + * @package Pass Gen + * @author txmod (web...@tx...) + * + * Version : 1.00: + * **************************************************************************** + */ + +class passgenMenu +{ + public $Width = 100; + public $Height = 100; + public $BgColor = "transparent"; + public $OverBgColor = "#FFF6C1"; + public $BorderWidth = 1; + public $BorderColor = "#CCCCCC"; + public $OverBorderColor = "#FF9900"; + public $BorderStyle = "solid"; + public $OverBorderStyle = "solid"; + public $Font = "Tahoma, Arial, Helvetica"; + public $FontColor = "#666666"; + public $OverFontColor = "#1E90FF"; + public $FontDeco = "none"; + public $OverFontDeco = "none"; + public $FontSize = 11; + public $FontWeight = "bold"; + public $FontExtra = "Tahoma, Arial, Helvetica"; + public $FontExtraColor = "#A98952"; + public $OverFontExtraColor = "#0033FF"; + public $FontExtraDeco = "underline"; + public $OverFontExtraDeco = "underline"; + public $FontExtraSize = 9; + public $FontExtraWeight = "normal"; + public $TextAlign = "center"; + private $_items = array(); + + public function addItem($id, $link="", $icon="", $name="", $extra="", $alt=""){ + if (isset($this->_items[$id])) return false; + $rtn["link"] = $link; + $rtn["icon"] = $icon; + $rtn["name"] = $name; + $rtn["extra"] = $extra; + $rtn["alt"] = $alt; + $this->_items[$id] = $rtn; + return true; + } + + public function setLink($id, $link){ + if (isset($this->_items[$id])){ + $this->_items[$id]["link"] = $link; + return true; + } else { + return false; + } + } + + public function setIcon($id, $icon){ + if (isset($this->_items[$id])){ + $this->_items[$id]["icon"] = $icon; + return true; + } else { + return false; + } + } + + public function setName($id, $name){ + if (isset($this->_items[$id])){ + $this->_items[$id]["name"] = $name; + return true; + } else { + return false; + } + } + + public function setExtra($id, $extra){ + if (isset($this->_items[$id])){ + $this->_items[$id]["extra"] = $extra; + return true; + } else { + return false; + } + } + + public function setAlt($id, $alt){ + if (isset($this->_items[$id])){ + $this->_items[$id]["alt"] = $alt; + return true; + } else { + return false; + } + } + + public function getCSS($ws = true){ + if ($ws) $csscode = "<style type=\"text/css\">\n<!--"; + $csscode .= "div.rmmenuicon{ + margin: 3px; + font-family: $this->Font; + text-align: ".$this->TextAlign."; + } + div.rmmenuicon a { + display: block; float: left; + height: ".$this->Height."px !important; + height: ".$this->Height."px; + width: ".$this->Width."px !important; + width: ".$this->Width."px; + vertical-align: middle; + text-decoration : none; + border: ".$this->BorderWidth."px $this->BorderStyle $this->BorderColor; + padding: 2px 5px 1px 5px; + margin: 3px; + color: $this->FontColor; + } + div.rmmenuicon img { margin-top: 8px; margin-bottom: 8px; } + div.rmmenuicon a span { + font-size: ".$this->FontSize."px; + font-weight: $this->FontWeight; + display: block; + } + div.rmmenuicon a span.uno{ + font-size: ".$this->FontExtraSize."px; + font-weight: $this->FontExtraWeight; + text-decoration: $this->FontExtraDeco; + color: $this->FontExtraColor; + } + div.rmmenuicon a:hover{ + background-color: $this->OverBgColor; + border: ".$this->BorderWidth."px $this->BorderStyle $this->OverBorderColor; + color: $this->OverFontColor; + } + div.rmmenuicon a:hover span{ + text-decoration: $this->OverFontDeco; + } + div.rmmenuicon a:hover span.uno{ + text-decoration: $this->OverFontExtraDeco; + color: $this->OverFontExtraColor; + }"; + if ($ws) $csscode .= "\n-->\n</style>"; + return $csscode; + } + + public function render(){ + + $ret = "<div class=\"rmmenuicon\">"; + foreach ($this->_items as $k => $v){ + $ret .= "<a href=\"".$v["link"]."\" title=\"".($v["alt"]!="" ? $v["alt"] : $v["name"])."\">".($v["icon"]!="" ? "<img src=\"".$v["icon"]."\" alt=\"".$v["name"]."\" /> " : ""); + if ($v["name"] != "") $ret .= "<span>".$v["name"]."</span>"; + if ($v["extra"] != "") $ret .= "<span class=\"uno\">".$v["extra"]."</span>"; + if ($v["extra"] != "") $ret .= "<span class=\"uno\">".$v["extra"]."</span>"; + $ret .= "</a>"; + } + $ret .= "</div><div style=\"clear: both;\"></div>"; + return $ret; + } + + public function display(){ + echo $this->render(); + } +} + +?> \ No newline at end of file Added: XoopsModules/passgen/releases/1.15/passgen/class/object.php =================================================================== --- XoopsModules/passgen/releases/1.15/passgen/class/object.php (rev 0) +++ XoopsModules/passgen/releases/1.15/passgen/class/object.php 2012-02-15 13:04:41 UTC (rev 8991) @@ -0,0 +1,412 @@ +<?php +/** + * **************************************************************************** + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * + * Cette licence, contient des limitations!!! + * + * 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. + * + * @license TDM GPL license + * @author TDM TEAM DEV MODULE + * + * **************************************************************************** + */ + +class XoopsPersistableObjectHandler extends XoopsObjectHandler{ + + /** + * Information about the class, the handler is managing + * + * @var string + */ + var $table; + var $keyName; + var $className; + var $identifierName; + + + /** + * Constructor - called from child classes + * @param object $db {@link XoopsDatabase} object + * @param string $tablename Name of database table + * @param string $classname Name of Class, this handler is managing + * @param string $keyname Name of the property, holding the key + * + * @return void + */ + function XoopsPersistableObjectHandler(&$db, $tablename, $classname, $keyname, $idenfierName = false) { + $this->XoopsObjectHandler($db); + $this->table = $db->prefix($tablename); + $this->keyName = $keyname; + $this->className = $classname; + if ($idenfierName != false) { + $this->identifierName = $idenfierName; + } + } + + /** + * create a new user + * + * @param bool $isNew Flag the new objects as "new"? + * + * @return object + */ + function &create($isNew = true) { + $obj =& new $this->className(); + if ($isNew === true) { + $obj->setNew(); + } + return $obj; + } + + /** + * retrieve an object + * + * @param mixed $id ID of the object - or array of ids for joint keys. Joint keys MUST be given in the same order as in the constructor + * @param bool $as_object whether to return an object or an array + * @return mixed reference to the object, FALSE if failed + */ + function &get($id, $as_object=true) { + if (is_array($this->keyName)) { + $criteria = new CriteriaCompo(); + for ($i = 0; $i < count($this->keyName); $i++) { + $criteria->add(new Criteria($this->keyName[$i], intval($id[$i]))); + } + } else { + $criteria = new Criteria($this->keyName, intval($id)); + } + $criteria->setLimit(1); + $obj_array = $this->getObjects($criteria, false, $as_object); + if (count($obj_array) != 1) { + $obj = $this->create(); + return $obj; + } + return $obj_array[0]; + } + + /** + * retrieve objects from the database + * + * @param object $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the ID as key for the array? + * @param bool $as_object return an array of objects? + * + * @return array + */ + function getObjects($criteria=null, $id_as_key=false, $as_object=true){ + $ret = array(); + $limit = $start = 0; + $sql = 'SELECT * FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->getSort() != '') { + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + return $this->convertResultSet($result, $id_as_key, $as_object); + } + + /** + * Convert a database resultset to a returnable array + * + * @param object $result database resultset + * @param bool $id_as_key - should NOT be used with joint keys + * @param bool $as_object + * + * @return array + */ + function convertResultSet($result, $id_as_key = false, $as_object = true) { + $ret = array(); + while ($myrow = $this->db->fetchArray($result)) { + $obj =& $this->create(false); + $obj->assignVars($myrow); + if (!$id_as_key) { + if ($as_object) { + $ret[] =& $obj; + } else { + $row = array(); + $vars = $obj->getVars(); + foreach (array_keys($vars) as $i) { + $row[$i] = $obj->getVar($i); + } + $ret[] = $row; + } + } else { + if ($as_object) { + $ret[$myrow[$this->keyName]] =& $obj; + } else { + $row = array(); + $vars = $obj->getVars(); + foreach (array_keys($vars) as $i) { + $row[$i] = $obj->getVar($i); + } + $ret[$myrow[$this->keyName]] = $row; + } + } + unset($obj); + } + return $ret; + } + + /** + * Retrieve a list of objects as arrays - DON'T USE WITH JOINT KEYS + * + * @param object $criteria {@link CriteriaElement} conditions to be met + * @param int $limit Max number of objects to fetch + * @param int $start Which record to start at + * + * @return array + */ + function getList($criteria = null, $limit = 0, $start = 0) { + $ret = array(); + if ($criteria == null) { + $criteria = new CriteriaCompo(); + } + + if ($criteria->getSort() == '') { + $criteria->setSort($this->identifierName); + } + + $sql = 'SELECT '.$this->keyName; + if(!empty($this->identifierName)){ + $sql .= ', '.$this->identifierName; + } + $sql .= ' FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->getSort() != '') { + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + $myts =& MyTextSanitizer::getInstance(); + while ($myrow = $this->db->fetchArray($result)) { + //identifiers should be textboxes, so sanitize them like that + $ret[$myrow[$this->keyName]] = empty($this->identifierName)?1:$myts->htmlSpecialChars($myrow[$this->identifierName]); + } + return $ret; + } + + /** + * count objects matching a condition + * + * @param object $criteria {@link CriteriaElement} to match + * @return int count of objects + */ + function getCount($criteria=null){ + $field = ""; + $groupby = false; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + if ($criteria->groupby != "") { + $groupby = true; + $field = $criteria->groupby.", "; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used + } + } + $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->groupby != "") { + $sql .= $criteria->getGroupby(); + } + } + $result = $this->db->query($sql); + if (!$result) { + return 0; + } + if ($groupby == false) { + list($count) = $this->db->fetchRow($result); + return $count; + } else { + $ret = array(); + while (list($id, $count) = $this->db->fetchRow($result)) { + $ret[$id] = $count; + } + return $ret; + } + } + + /** + * delete an object from the database + * + * @param object $obj reference to the object to delete + * @param bool $force + * @return bool FALSE if failed. + */ + function delete(&$obj, $force = false){ + if (is_array($this->keyName)) { + $clause = array(); + for ($i = 0; $i < count($this->keyName); $i++) { + $clause[] = $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]); + } + $whereclause = implode(" AND ", $clause); + } else { + $whereclause = $this->keyName." = ".$obj->getVar($this->keyName); + } + $sql = "DELETE FROM ".$this->table." WHERE ".$whereclause; + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } + + /** + * insert a new object in the database + * + * @param object $obj reference to the object + * @param bool $force whether to force the query execution despite security settings + * @param bool $checkObject check if the object is dirty and clean the attributes + * @return bool FALSE if failed, TRUE if already present and unchanged or successful + */ + + function insert(&$obj, $force=false, $checkObject=true){ + if ($checkObject != false) { + if (!is_object($obj)) { + var_dump($obj); + return false; + } + /** + * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5 + */ + if (!is_a($obj, $this->className)) { + $obj->setErrors(get_class($obj)." Differs from ".$this->className); + return false; + } + if (!$obj->isDirty()) { + $obj->setErrors("Not dirty"); //will usually not be outputted as errors are not displayed when the method returns true, but it can be helpful when troubleshooting code - Mith + return true; + } + } + if (!$obj->cleanVars()) { + return false; + } + + foreach ($obj->cleanVars as $k => $v) { + if ($obj->vars[$k]['data_type'] == XOBJ_DTYPE_INT) { + $cleanvars[$k] = intval($v); + } elseif ( is_array( $v ) ) { + $cleanvars[ $k ] = $this->db->quoteString( implode( ',', $v ) ); + } else { + $cleanvars[$k] = $this->db->quoteString($v); + } + } + if ($obj->isNew()) { + if (!is_array($this->keyName)) { + if ($cleanvars[$this->keyName] < 1) { + $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq'); + } + } + $sql = "INSERT INTO ".$this->table." (".implode(',', array_keys($cleanvars)).") VALUES (".implode(',', array_values($cleanvars)) .")"; + } else { + $sql = "UPDATE ".$this->table." SET"; + foreach ($cleanvars as $key => $value) { + if ((!is_array($this->keyName) && $key == $this->keyName) || (is_array($this->keyName) && in_array($key, $this->keyName))) { + continue; + } + if (isset($notfirst) ) { + $sql .= ","; + } + $sql .= " ".$key." = ".$value; + $notfirst = true; + } + if (is_array($this->keyName)) { + $whereclause = ""; + for ($i = 0; $i < count($this->keyName); $i++) { + if ($i > 0) { + $whereclause .= " AND "; + } + $whereclause .= $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]); + } + } else { + $whereclause = $this->keyName." = ".$obj->getVar($this->keyName); + } + $sql .= " WHERE ".$whereclause; + } + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + if ($obj->isNew() && !is_array($this->keyName)) { + $obj->assignVar($this->keyName, $this->db->getInsertId()); + } + return true; + } + + /** + * Change a value for objects with a certain criteria + * + * @param string $fieldname Name of the field + * @param string $fieldvalue Value to write + * @param object $criteria {@link CriteriaElement} + * @return bool + */ + function updateAll($fieldname, $fieldvalue, $criteria = null, $force = false){ + $set_clause = $fieldname . ' = '; + if ( is_numeric( $fieldvalue ) ) { + $set_clause .= $fieldvalue; + } elseif ( is_array( $fieldvalue ) ) { + $set_clause .= $this->db->quoteString( implode( ',', $fieldvalue ) ); + } else { + $set_clause .= $this->db->quoteString( $fieldvalue ); + } + $sql = 'UPDATE '.$this->table.' SET '.$set_clause; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + } + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } + + /** + * delete all objects meeting the conditions + * + * @param object $criteria {@link CriteriaElement} with conditions to meet + * @return bool + */ + function deleteAll($criteria = null){ + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql = 'DELETE FROM '.$this->table; + $sql .= ' '.$criteria->renderWhere(); + if (!$this->db->queryF($sql)) { + return false; + } + $rows = $this->db->getAffectedRows(); + return $rows > 0 ? $rows : true; + } + return false; + } +} +?> \ No newline at end of file Added: XoopsModules/passgen/releases/1.15/passgen/header.php =================================================================== --- XoopsModules/passgen/releases/1.15/passgen/header.php (rev 0) +++ XoopsModules/passgen/releases/1.15/passgen/header.php 2012-02-15 13:04:41 UTC (rev 8991) @@ -0,0 +1,28 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Pass Gen - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://www.txmodxoops.org) + * + * 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 txmod (http://www.txmodxoops.org) + * @license GNU GPL + * @package Pass Gen + * @author txmod (web...@tx...) + * + * Version : 1.00: + * **************************************************************************** + */ + +include "../../mainfile.php"; +include XOOPS_ROOT_PATH."/modules/passgen/include/configs.php"; +include XOOPS_ROOT_PATH."/modules/passgen/include/functions.php"; +?> \ No newline at end of file Added: XoopsModules/passgen/releases/1.15/passgen/images/deco/about.png =================================================================== (Binary files differ) Property changes on: XoopsModules/passgen/releases/1.15/passgen/images/deco/about.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/passgen/releases/1.15/passgen/images/deco/arrow.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/passgen/releases/1.15/passgen/images/deco/arrow.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/passgen/releases/1.15/passgen/images/deco/delete.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/passgen/releases/1.15/passgen/images/deco/delete.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/passgen/releases/1.15/passgen/images/deco/edit.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/passgen/releases/1.15/passgen/images/deco/edit.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/passgen/releases/1.15/passgen/images/deco/index.html =================================================================== --- XoopsModules/passgen/releases/1.15/passgen/images/deco/index.html (rev 0) +++ XoopsModules/passgen/releases/1.15/passgen/images/deco/index.html 2012-02-15 13:04:41 UTC (rev 8991) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/passgen/releases/1.15/passgen/images/deco/index.png =================================================================== (Binary files differ) Property changes on: XoopsModules/passgen/releases/1.15/passgen/images/deco/index.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/passgen/releases/1.15/passgen/images/deco/off.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/passgen/releases/1.15/passgen/images/deco/off.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/passgen/releases/1.15/passgen/images/deco/on.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/passgen/releases/1.15/passgen/images/deco/on.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/passgen/releases/1.15/passgen/images/deco/permissions.png =================================================================== (Binary files differ) Property changes on: XoopsModules/passgen/releases/1.15/passgen/images/deco/permissions.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/passgen/releases/1.15/passgen/images/deco/pref.png =================================================================== (Binary files differ) Property changes on: XoopsModules/passgen/releases/1.15/passgen/images/deco/pref.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/passgen/releases/1.15/passgen/images/deco/update.png =================================================================== (Binary files differ) Property changes on: XoopsModules/passgen/releases/1.15/passgen/images/deco/update.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/passgen/releases/1.15/passgen/images/index.html =================================================================== --- XoopsModules/passgen/releases/1.15/passgen/images/index.html (rev 0) +++ XoopsModules/passgen/releases/1.15/passgen/images/index.html 2012-02-15 13:04:41 UTC (rev 8991) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/passgen/releases/1.15/passgen/images/menu/bg.png =================================================================== (Binary files differ) Property changes on: XoopsModules/passgen/releases/1.15/passgen/images/menu/bg.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/passgen/releases/1.15/passgen/images/menu/index.html =================================================================== --- XoopsModules/passgen/releases/1.15/passgen/images/menu/index.html (rev 0) +++ XoopsModules/passgen/releases/1.15/passgen/images/menu/index.html 2012-02-15 13:04:41 UTC (rev 8991) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/passgen/releases/1.15/passgen/images/menu/left_both.png =================================================================== (Binary files differ) Property changes on: XoopsModules/passgen/releases/1.15/passgen/images/menu/left_both.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/passgen/releases/1.15/passgen/images/menu/right_both.png =================================================================== (Binary files differ) Property changes on: XoopsModules/passgen/releases/1.15/passgen/images/menu/right_both.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/passgen/releases/1.15/passgen/images/passgen_logo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/passgen/releases/1.15/passgen/images/passgen_logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/passgen/releases/1.15/passgen/images/passgen_slogo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/passgen/releases/1.15/passgen/images/passgen_slogo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/passgen/releases/1.15/passgen/images/txmod_logo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/passgen/releases/1.15/passgen/images/txmod_logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/passgen/releases/1.15/passgen/include/Handheld.css =================================================================== --- XoopsModules/passgen/releases/1.15/passgen/include/Handheld.css (rev 0) +++ XoopsModules/passgen/releases/1.15/passgen/include/Handheld.css 2012-02-15 13:04:41 UTC (rev 8991) @@ -0,0 +1,21 @@ +body {} + +fieldset +{ + border: 5px double; + border-color: #369; + padding: 1em 1em 1em 1em ; +} +legend +{ + background-color: #369; + color: #fff; + font-size: 1.2em; + padding: 0.2em 0.5em 0.2em 0.5em; +} + +/* only for printing */ +.onlyForPrinting +{ + display: none; +} Added: XoopsModules/passgen/releases/1.15/passgen/include/Passgen.js =================================================================== --- XoopsModules/passgen/releases/1.15/passgen/include/Passgen.js (rev 0) +++ XoopsModules/passgen/releases/1.15/passgen/include/Passgen.js 2012-02-15 13:04:41 UTC (rev 8991) @@ -0,0 +1,325 @@ +var theSymbols = new Array() +theSymbols = [" ", "!", "\"", "$", "%", "^", "&", "*", "(", ")", + "-", "_", "=", "+", "[", "{", "]", "}", ";", ":", "'", "@", "#", "~", "\\", + "|", ",", "<", ".", ">", "/", "?"] +//Can't use "\xAC", "\xA6", or "\xA3" as it won't display in Firefox + +function hideNeedJavaScript() +{ + // Hide Need JavaScript div + document.getElementById("needJavaScript").style.display = 'none'; + // Show Generator form + document.getElementById("generator").style.display = 'block'; +} + +function GenerateAndValidate(lengthOfPassword, wantSymbols) +{ + // Check what length the user has chosen + // Firefox says form1 is not defined + //var lengthOfPassword = form1.ddlLength.options(form1.ddlLength.selectedIndex).value; - This works, except Firefox! + //Have to pass the chosen length as a parameter because Firefox can't find form1 + + var thePassword = new Array(); + thePassword = GeneratePassword(lengthOfPassword, wantSymbols); + while(!Validate(thePassword, lengthOfPassword, wantSymbols)) + { + thePassword = GeneratePassword(lengthOfPassword, wantSymbols); + } + Display(thePassword); +} + +function GeneratePassword(lengthOfPassword, wantSymbols) +{ + // Strings for letters and numbers, array for symbols + var theLetters = "abcdefghijklmnopqrstuvwxyz"; + var theNumbers = "1234567890"; + + //ARRAYS + // Variable for strong password + var StrongPasswordArray = new Array(); + + //LETTERS + // Generate an array of random letters, up to the user's chosen length + for(var loop=0; loop < lengthOfPassword; loop++) + { + // Get a random number between zero and one for each one to decide if we'll capitalise each letter as we loop through the array + var capitalise = Math.round(Math.random()*1); + if(capitalise == 0) + { + StrongPasswordArray[loop] = theLetters.charAt(Math.round(Math.random()*25)).toUpperCase() + } + else + { + StrongPasswordArray[loop] = theLetters.charAt(Math.round(Math.random()*25)); + } + } +//alert("Strong password's letters are: " + StrongPasswordArray + " and the length is " + StrongPasswordArray.length); + + //NUMBERS + // Get a random number between one and the length; + // insert that many numerical digits at random places in the string + var numberOfDigits; + numberOfDigits = Math.round(Math.random() * (lengthOfPassword - 1)) + 1; +//alert("The number of digits shall be " + numberOfDigits); + // Loop to add that amount of numbers + for(var loop=0; loop < numberOfDigits; loop++) + { + // choose a random position in the string for the number + var positionForNumeric = Math.round(Math.random() * (lengthOfPassword - 1)); // choose a position for this number, less than the length of the password + // Note that the same position may be chosen more than once, + // due to the random function, so we may get less numbers than the number chosen + // choose a number from 0 to 9 + var theNumber = Math.round(Math.random()*9); + // insert that number + StrongPasswordArray[positionForNumeric] = theNumber; + } +//alert("Strong password's letters and numbers are: " + StrongPasswordArray + " and the length is " + StrongPasswordArray.length); + + //SYMBOLS + if(wantSymbols) + { + // Put a symbol in the second, third, fourth, fifth or sixth position + // Get a random number between two and six to decide where to put in a symbol + // and put a random symbol in the second, third, fourth, fifth or sixth position + var positionForSymbol = Math.round(Math.random()*4) + 2; + // Choose a number from 0 to the length of the theSymbols array, to choose a symbol + var locationOfSymbolInArray = Math.round(Math.random()*(theSymbols.length - 1)); + var theSymbol = theSymbols[locationOfSymbolInArray]; + // Insert that symbol + StrongPasswordArray[positionForSymbol] = theSymbol; + + // Now put in random symbols + // Get a random number between one and the length and insert that many numerical digits at random places in the string + // Note that the same position may be chosen more than once, due to the random function, so we may get less numbers than the number chosen + var numberOfSymbols; + numberOfSymbols = Math.round(Math.random() * (lengthOfPassword - 1)) + 1; + // Loop to add that amount of symbols + for(var loop=0; loop < numberOfSymbols; loop++) // 0 to numberOfSymbols + { + // choose a random position in the string for the number + positionForSymbol = Math.round(Math.random()* (lengthOfPassword - 1)); // choose a position for this number, less than the length of the password + // Note that the same position may be chosen more than once, due to the random function, so we may get less symbols than the number chosen + // Choose a number from 0 to the length of the theSymbols array, to choose a symbol + locationOfSymbolInArray = Math.round(Math.random()*(theSymbols.length - 1)); + theSymbol = theSymbols[locationOfSymbolInArray]; + // Insert that symbol + StrongPasswordArray[positionForSymbol] = theSymbol; + } +//alert(StrongPasswordArray); + } + return StrongPasswordArray; + } + + function Validate(StrongPass... [truncated message content] |
From: <txm...@us...> - 2012-02-15 13:10:55
|
Revision: 8992 http://xoops.svn.sourceforge.net/xoops/?rev=8992&view=rev Author: txmodxoops Date: 2012-02-15 13:10:42 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Module Slidernew v1.01 Added Paths: ----------- XoopsModules/slidernews/ XoopsModules/slidernews/branches/ XoopsModules/slidernews/releases/ XoopsModules/slidernews/releases/1.01/ XoopsModules/slidernews/releases/1.01/slidernews/ XoopsModules/slidernews/releases/1.01/slidernews/blocks/ XoopsModules/slidernews/releases/1.01/slidernews/blocks/slidernews_block.php XoopsModules/slidernews/releases/1.01/slidernews/header.php XoopsModules/slidernews/releases/1.01/slidernews/images/ XoopsModules/slidernews/releases/1.01/slidernews/images/screenshot.gif XoopsModules/slidernews/releases/1.01/slidernews/images/slidernews_slogo.png XoopsModules/slidernews/releases/1.01/slidernews/include/ XoopsModules/slidernews/releases/1.01/slidernews/include/coda-slider.1.1.1.js XoopsModules/slidernews/releases/1.01/slidernews/include/coda-slider.1.1.1.pack.js XoopsModules/slidernews/releases/1.01/slidernews/include/images/ XoopsModules/slidernews/releases/1.01/slidernews/include/images/ajax-loader.gif XoopsModules/slidernews/releases/1.01/slidernews/include/images/arrow-left.gif XoopsModules/slidernews/releases/1.01/slidernews/include/images/arrow-right.gif XoopsModules/slidernews/releases/1.01/slidernews/include/images/body-bg.png XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-1.2.1.pack.js XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-easing-compatibility.1.2.js XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-easing-compatibility.1.2.pack.js XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-easing.1.2.js XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-easing.1.2.pack.js XoopsModules/slidernews/releases/1.01/slidernews/index.php XoopsModules/slidernews/releases/1.01/slidernews/style/ XoopsModules/slidernews/releases/1.01/slidernews/style/slidernews.css XoopsModules/slidernews/releases/1.01/slidernews/templates/ XoopsModules/slidernews/releases/1.01/slidernews/templates/base.html XoopsModules/slidernews/releases/1.01/slidernews/templates/blocks/ XoopsModules/slidernews/releases/1.01/slidernews/templates/blocks/index.html XoopsModules/slidernews/releases/1.01/slidernews/templates/blocks/slidernews_block.html XoopsModules/slidernews/releases/1.01/slidernews/templates/slidernews.html XoopsModules/slidernews/releases/1.01/slidernews/xoops_version.php XoopsModules/slidernews/trunk/ Added: XoopsModules/slidernews/releases/1.01/slidernews/blocks/slidernews_block.php =================================================================== --- XoopsModules/slidernews/releases/1.01/slidernews/blocks/slidernews_block.php (rev 0) +++ XoopsModules/slidernews/releases/1.01/slidernews/blocks/slidernews_block.php 2012-02-15 13:10:42 UTC (rev 8992) @@ -0,0 +1,15 @@ +<?php +// +// Author: timgno +// WebSite: http://mcdirectory.netsons.org/txmod/ +// +function b_slidernews_show($options) +{ + $block = array(); + + $block['content'] = "slidernews"; + + return $block; +} + +?> \ No newline at end of file Added: XoopsModules/slidernews/releases/1.01/slidernews/header.php =================================================================== --- XoopsModules/slidernews/releases/1.01/slidernews/header.php (rev 0) +++ XoopsModules/slidernews/releases/1.01/slidernews/header.php 2012-02-15 13:10:42 UTC (rev 8992) @@ -0,0 +1,7 @@ +<?php +// +// Author: timgno +// WebSite: http://mcdirectory.netsons.org/txmod/ +// +include '../../mainfile.php'; +?> \ No newline at end of file Added: XoopsModules/slidernews/releases/1.01/slidernews/images/screenshot.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/slidernews/releases/1.01/slidernews/images/screenshot.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/slidernews/releases/1.01/slidernews/images/slidernews_slogo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/slidernews/releases/1.01/slidernews/images/slidernews_slogo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/slidernews/releases/1.01/slidernews/include/coda-slider.1.1.1.js =================================================================== --- XoopsModules/slidernews/releases/1.01/slidernews/include/coda-slider.1.1.1.js (rev 0) +++ XoopsModules/slidernews/releases/1.01/slidernews/include/coda-slider.1.1.1.js 2012-02-15 13:10:42 UTC (rev 8992) @@ -0,0 +1,133 @@ +/* + jQuery Coda-Slider v1.1 - http://www.ndoherty.com/coda-slider + + Copyright (c) 2007 Niall Doherty + + Inspired by the clever folks at http://www.panic.com/coda + Many thanks to Gian Carlo Mingati. Coda-Slider is a heavily modified version of his slideViewer, which can be found at http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imageslide-plugin.html + + Requirements: + - jQuery 1.2 ... available via http://www.jquery.com + - jQuery easing plugin (1.2) ... available via http://gsgd.co.uk/sandbox/jquery/easing/ + - jQuery easing compatability plugin ... available via http://gsgd.co.uk/sandbox/jquery/easing/ + - CSS included in index.html +*/ + +jQuery(function(){ + jQuery("div.csw").prepend("<p class='loading'>Loading...<br /><img src='images/ajax-loader.gif' alt='loading...'/ ></p>"); +}); +var j = 0; +jQuery.fn.codaSlider = function(settings) { + settings = jQuery.extend({ + easeFunc: "expoinout", + easeTime: 750, + toolTip: false + }, settings); + return this.each(function(){ + var container = jQuery(this); + // Remove the preloader gif... + container.find("p.loading").remove(); + // Self-explanatory... + container.removeClass("csw").addClass("stripViewer"); + // Get the width of a panel, set from CSS... + var panelWidth = container.find("div.panel").width(); + // panelCount gives us a count of the panels in the container... + var panelCount = container.find("div.panel").size(); + // Calculate the width of all the panels when lined up end-to-end... + var stripViewerWidth = panelWidth*panelCount; + // Use the above width to specify the CSS width for the panelContainer element... + container.find("div.panelContainer").css("width" , stripViewerWidth); + // Set the navWidth as a multiple of panelCount to account for margin-right on each li + var navWidth = panelCount*2; + + // Specify the current panel. + // If the loaded URL has a hash (cross-linking), we're going to use that hash to give the slider a specific starting position... + if (location.hash && parseInt(location.hash.slice(1)) <= panelCount) { + var cPanel = parseInt(location.hash.slice(1)); + var cnt = - (panelWidth*(cPanel - 1)); + jQuery(this).find("div.panelContainer").css({ left: cnt }); + // Otherwise, we'll just set the current panel to 1... + } else { + var cPanel = 1; + }; + + // Create appropriate nav + container.each(function(i) { + + // Create the Left and Right arrows + jQuery(this).before("<div class='stripNavL' id='stripNavL" + j + "'><a href='#'>Left</a><\/div>"); + jQuery(this).after("<div class='stripNavR' id='stripNavR" + j + "'><a href='#'>Right</a><\/div>"); + + // Create the Tabs + jQuery(this).before("<div class='stripNav' id='stripNav" + j + "'><ul><\/ul><\/div>"); + jQuery(this).find("div.panel").each(function(n) { + jQuery("div#stripNav" + j + " ul").append("<li class='tab" + (n+1) + "'><a href='#" + (n+1) + "'>" + jQuery(this).attr("title") + "<\/a><\/li>"); + }); + + // Tab nav + jQuery("div#stripNav" + j + " a").each(function(z) { + // Figure out the navWidth by adding up the width of each li + navWidth += jQuery(this).parent().width(); + // What happens when a nav link is clicked + jQuery(this).bind("click", function() { + jQuery(this).addClass("current").parent().parent().find("a").not(jQuery(this)).removeClass("current"); // wow! + var cnt = - (panelWidth*z); + cPanel = z + 1; + jQuery(this).parent().parent().parent().next().find("div.panelContainer").animate({ left: cnt}, settings.easeTime, settings.easeFunc); + }); + }); + + // Left nav + jQuery("div#stripNavL" + j + " a").click(function(){ + if (cPanel == 1) { + var cnt = - (panelWidth*(panelCount - 1)); + cPanel = panelCount; + jQuery(this).parent().parent().find("div.stripNav a.current").removeClass("current").parent().parent().find("li:last a").addClass("current"); + } else { + cPanel -= 1; + var cnt = - (panelWidth*(cPanel - 1)); + jQuery(this).parent().parent().find("div.stripNav a.current").removeClass("current").parent().prev().find("a").addClass("current"); + }; + jQuery(this).parent().parent().find("div.panelContainer").animate({ left: cnt}, settings.easeTime, settings.easeFunc); + // Change the URL hash (cross-linking)... + location.hash = cPanel; + return false; + }); + + // Right nav + jQuery("div#stripNavR" + j + " a").click(function(){ + if (cPanel == panelCount) { + var cnt = 0; + cPanel = 1; + jQuery(this).parent().parent().find("div.stripNav a.current").removeClass("current").parent().parent().find("a:eq(0)").addClass("current"); + } else { + var cnt = - (panelWidth*cPanel); + cPanel += 1; + jQuery(this).parent().parent().find("div.stripNav a.current").removeClass("current").parent().next().find("a").addClass("current"); + }; + jQuery(this).parent().parent().find("div.panelContainer").animate({ left: cnt}, settings.easeTime, settings.easeFunc); + // Change the URL hash (cross-linking)... + location.hash = cPanel; + return false; + }); + + // Same-page cross-linking + jQuery("a.cross-link").click(function(){ + jQuery(this).parents().find(".stripNav ul li a:eq(" + (parseInt(jQuery(this).attr("href").slice(1)) - 1) + ")").trigger('click'); + }); + + // Set the width of the nav using the navWidth figure we calculated earlier. This is so the nav can be centred above the slider + jQuery("div#stripNav" + j).css("width" , navWidth); + + // Specify which tab is initially set to "current". Depends on if the loaded URL had a hash or not (cross-linking). + if (location.hash && parseInt(location.hash.slice(1)) <= panelCount) { + jQuery("div#stripNav" + j + " a:eq(" + (location.hash.slice(1) - 1) + ")").addClass("current"); + } else { + jQuery("div#stripNav" + j + " a:eq(0)").addClass("current"); + } + + }); + + j++; + }); +}; \ No newline at end of file Added: XoopsModules/slidernews/releases/1.01/slidernews/include/coda-slider.1.1.1.pack.js =================================================================== --- XoopsModules/slidernews/releases/1.01/slidernews/include/coda-slider.1.1.1.pack.js (rev 0) +++ XoopsModules/slidernews/releases/1.01/slidernews/include/coda-slider.1.1.1.pack.js 2012-02-15 13:10:42 UTC (rev 8992) @@ -0,0 +1,6 @@ +/* + jQuery Coda-Slider v1.1 - http://www.ndoherty.com/coda-slider + + Copyright (c) 2007 Niall Doherty +*/ +eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('3(d(){3("4.T").1s("<p r=\'O\'>16...<1t /><18 19=\'1a/11-1b.1c\' 1d=\'O...\'/ ></p>")});b j=0;3.1e.1f=d(f){f=3.1g({G:"1h",E:1i,1j:Q},f);P 6.w(d(){b o=3(6);o.7("p.O").1k();o.q("T").l("1l");b m=o.7("4.I").C();b k=o.7("4.I").1m();b U=m*k;o.7("4.t").K("C",U);b N=k*2;F(h.g&&D(h.g.s(1))<=k){b 9=D(h.g.s(1));b e=-(m*(9-1));3(6).7("4.t").K({H:e})}B{b 9=1};o.w(d(i){3(6).W("<4 r=\'J\' M=\'J"+j+"\'><a A=\'#\'>1n</a><\\/4>");3(6).1o("<4 r=\'L\' M=\'L"+j+"\'><a A=\'#\'>1q</a><\\/4>");3(6).W("<4 r=\'c\' M=\'c"+j+"\'><v><\\/v><\\/4>");3(6).7("4.I").w(d(n){3("4#c"+j+" v").X("<x r=\'Z"+(n+1)+"\'><a A=\'#"+(n+1)+"\'>"+3(6).S("10")+"<\\/a><\\/x>")});3("4#c"+j+" a").w(d(z){N+=3(6).5().C();3(6).12("u",d(){3(6).l("8").5().5().7("a").13(3(6)).q("8");b e=-(m*z);9=z+1;3(6).5().5().5().V().7("4.t").R({H:e},f.E,f.G)})});3("4#J"+j+" a").u(d(){F(9==1){b e=-(m*(k-1));9=k;3(6).5().5().7("4.c a.8").q("8").5().5().7("x:14 a").l("8")}B{9-=1;b e=-(m*(9-1));3(6).5().5().7("4.c a.8").q("8").5().15().7("a").l("8")};3(6).5().5().7("4.t").R({H:e},f.E,f.G);h.g=9;P Q});3("4#L"+j+" a").u(d(){F(9==k){b e=0;9=1;3(6).5().5().7("4.c a.8").q("8").5().5().7("a:y(0)").l("8")}B{b e=-(m*9);9+=1;3(6).5().5().7("4.c a.8").q("8").5().V().7("a").l("8")};3(6).5().5().7("4.t").R({H:e},f.E,f.G);h.g=9;P Q});3("a.1p-1r").u(d(){3(6).Y().7(".c v x a:y("+(D(3(6).S("A").s(1))-1)+")").17(\'u\')});3("4#c"+j).K("C",N);F(h.g&&D(h.g.s(1))<=k){3("4#c"+j+" a:y("+(h.g.s(1)-1)+")").l("8")}B{3("4#c"+j+" a:y(0)").l("8")}});j++})};',62,92,'|||jQuery|div|parent|this|find|current|cPanel||var|stripNav|function|cnt|settings|hash|location|||panelCount|addClass|panelWidth||container||removeClass|class|slice|panelContainer|click|ul|each|li|eq||href|else|width|parseInt|easeTime|if|easeFunc|left|panel|stripNavL|css|stripNavR|id|navWidth|loading|return|false|animate|attr|csw|stripViewerWidth|next|before|append|parents|tab|title|ajax|bind|not|last|prev|Loading|trigger|img|src|images|loader|gif|alt|fn|codaSlider|extend|expoinout|750|toolTip|remove|stripViewer|size|Left|after|cross|Right|link|prepend|br'.split('|'),0,{})) \ No newline at end of file Added: XoopsModules/slidernews/releases/1.01/slidernews/include/images/ajax-loader.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/slidernews/releases/1.01/slidernews/include/images/ajax-loader.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/slidernews/releases/1.01/slidernews/include/images/arrow-left.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/slidernews/releases/1.01/slidernews/include/images/arrow-left.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/slidernews/releases/1.01/slidernews/include/images/arrow-right.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/slidernews/releases/1.01/slidernews/include/images/arrow-right.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/slidernews/releases/1.01/slidernews/include/images/body-bg.png =================================================================== (Binary files differ) Property changes on: XoopsModules/slidernews/releases/1.01/slidernews/include/images/body-bg.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-1.2.1.pack.js =================================================================== --- XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-1.2.1.pack.js (rev 0) +++ XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-1.2.1.pack.js 2012-02-15 13:10:42 UTC (rev 8992) @@ -0,0 +1,11 @@ +/* + * jQuery 1.2.1 - New Wave Javascript + * + * Copyright (c) 2007 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $ + * $Rev: 3353 $ + */ +eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(G(){9(1m E!="W")H w=E;H E=18.15=G(a,b){I 6 7u E?6.5N(a,b):1u E(a,b)};9(1m $!="W")H D=$;18.$=E;H u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;E.1b=E.3A={5N:G(c,a){c=c||U;9(1m c=="1M"){H m=u.2S(c);9(m&&(m[1]||!a)){9(m[1])c=E.4D([m[1]],a);J{H b=U.3S(m[3]);9(b)9(b.22!=m[3])I E().1Y(c);J{6[0]=b;6.K=1;I 6}J c=[]}}J I 1u E(a).1Y(c)}J 9(E.1n(c))I 1u E(U)[E.1b.2d?"2d":"39"](c);I 6.6v(c.1c==1B&&c||(c.4c||c.K&&c!=18&&!c.1y&&c[0]!=W&&c[0].1y)&&E.2h(c)||[c])},4c:"1.2.1",7Y:G(){I 6.K},K:0,21:G(a){I a==W?E.2h(6):6[a]},2o:G(a){H b=E(a);b.4Y=6;I b},6v:G(a){6.K=0;1B.3A.1a.16(6,a);I 6},N:G(a,b){I E.N(6,a,b)},4I:G(a){H b=-1;6.N(G(i){9(6==a)b=i});I b},1x:G(f,d,e){H c=f;9(f.1c==3X)9(d==W)I 6.K&&E[e||"1x"](6[0],f)||W;J{c={};c[f]=d}I 6.N(G(a){L(H b 1i c)E.1x(e?6.R:6,b,E.1e(6,c[b],e,a,b))})},17:G(b,a){I 6.1x(b,a,"3C")},2g:G(e){9(1m e!="5i"&&e!=S)I 6.4n().3g(U.6F(e));H t="";E.N(e||6,G(){E.N(6.3j,G(){9(6.1y!=8)t+=6.1y!=1?6.6x:E.1b.2g([6])})});I t},5m:G(b){9(6[0])E(b,6[0].3H).6u().3d(6[0]).1X(G(){H a=6;1W(a.1w)a=a.1w;I a}).3g(6);I 6},8m:G(a){I 6.N(G(){E(6).6q().5m(a)})},8d:G(a){I 6.N(G(){E(6).5m(a)})},3g:G(){I 6.3z(1q,Q,1,G(a){6.58(a)})},6j:G(){I 6.3z(1q,Q,-1,G(a){6.3d(a,6.1w)})},6g:G(){I 6.3z(1q,P,1,G(a){6.12.3d(a,6)})},50:G(){I 6.3z(1q,P,-1,G(a){6.12.3d(a,6.2q)})},2D:G(){I 6.4Y||E([])},1Y:G(t){H b=E.1X(6,G(a){I E.1Y(t,a)});I 6.2o(/[^+>] [^+>]/.14(t)||t.1g("..")>-1?E.4V(b):b)},6u:G(e){H f=6.1X(G(){I 6.67?E(6.67)[0]:6.4R(Q)});H d=f.1Y("*").4O().N(G(){9(6[F]!=W)6[F]=S});9(e===Q)6.1Y("*").4O().N(G(i){H c=E.M(6,"2P");L(H a 1i c)L(H b 1i c[a])E.1j.1f(d[i],a,c[a][b],c[a][b].M)});I f},1E:G(t){I 6.2o(E.1n(t)&&E.2W(6,G(b,a){I t.16(b,[a])})||E.3m(t,6))},5V:G(t){I 6.2o(t.1c==3X&&E.3m(t,6,Q)||E.2W(6,G(a){I(t.1c==1B||t.4c)?E.2A(a,t)<0:a!=t}))},1f:G(t){I 6.2o(E.1R(6.21(),t.1c==3X?E(t).21():t.K!=W&&(!t.11||E.11(t,"2Y"))?t:[t]))},3t:G(a){I a?E.3m(a,6).K>0:P},7c:G(a){I 6.3t("."+a)},3i:G(b){9(b==W){9(6.K){H c=6[0];9(E.11(c,"24")){H e=c.4Z,a=[],Y=c.Y,2G=c.O=="24-2G";9(e<0)I S;L(H i=2G?e:0,33=2G?e+1:Y.K;i<33;i++){H d=Y[i];9(d.26){H b=E.V.1h&&!d.9V["1Q"].9L?d.2g:d.1Q;9(2G)I b;a.1a(b)}}I a}J I 6[0].1Q.1p(/\\r/g,"")}}J I 6.N(G(){9(b.1c==1B&&/4k|5j/.14(6.O))6.2Q=(E.2A(6.1Q,b)>=0||E.2A(6.2H,b)>=0);J 9(E.11(6,"24")){H a=b.1c==1B?b:[b];E("9h",6).N(G(){6.26=(E.2A(6.1Q,a)>=0||E.2A(6.2g,a)>=0)});9(!a.K)6.4Z=-1}J 6.1Q=b})},4o:G(a){I a==W?(6.K?6[0].3O:S):6.4n().3g(a)},6H:G(a){I 6.50(a).28()},6E:G(i){I 6.2J(i,i+1)},2J:G(){I 6.2o(1B.3A.2J.16(6,1q))},1X:G(b){I 6.2o(E.1X(6,G(a,i){I b.2O(a,i,a)}))},4O:G(){I 6.1f(6.4Y)},3z:G(f,d,g,e){H c=6.K>1,a;I 6.N(G(){9(!a){a=E.4D(f,6.3H);9(g<0)a.8U()}H b=6;9(d&&E.11(6,"1I")&&E.11(a[0],"4m"))b=6.4l("1K")[0]||6.58(U.5B("1K"));E.N(a,G(){H a=c?6.4R(Q):6;9(!5A(0,a))e.2O(b,a)})})}};G 5A(i,b){H a=E.11(b,"1J");9(a){9(b.3k)E.3G({1d:b.3k,3e:P,1V:"1J"});J E.5f(b.2g||b.6s||b.3O||"");9(b.12)b.12.3b(b)}J 9(b.1y==1)E("1J",b).N(5A);I a}E.1k=E.1b.1k=G(){H c=1q[0]||{},a=1,2c=1q.K,5e=P;9(c.1c==8o){5e=c;c=1q[1]||{}}9(2c==1){c=6;a=0}H b;L(;a<2c;a++)9((b=1q[a])!=S)L(H i 1i b){9(c==b[i])6r;9(5e&&1m b[i]==\'5i\'&&c[i])E.1k(c[i],b[i]);J 9(b[i]!=W)c[i]=b[i]}I c};H F="15"+(1u 3D()).3B(),6p=0,5c={};E.1k({8a:G(a){18.$=D;9(a)18.15=w;I E},1n:G(a){I!!a&&1m a!="1M"&&!a.11&&a.1c!=1B&&/G/i.14(a+"")},4a:G(a){I a.2V&&!a.1G||a.37&&a.3H&&!a.3H.1G},5f:G(a){a=E.36(a);9(a){9(18.6l)18.6l(a);J 9(E.V.1N)18.56(a,0);J 3w.2O(18,a)}},11:G(b,a){I b.11&&b.11.27()==a.27()},1L:{},M:G(c,d,b){c=c==18?5c:c;H a=c[F];9(!a)a=c[F]=++6p;9(d&&!E.1L[a])E.1L[a]={};9(b!=W)E.1L[a][d]=b;I d?E.1L[a][d]:a},30:G(c,b){c=c==18?5c:c;H a=c[F];9(b){9(E.1L[a]){2E E.1L[a][b];b="";L(b 1i E.1L[a])1T;9(!b)E.30(c)}}J{2a{2E c[F]}29(e){9(c.53)c.53(F)}2E E.1L[a]}},N:G(a,b,c){9(c){9(a.K==W)L(H i 1i a)b.16(a[i],c);J L(H i=0,48=a.K;i<48;i++)9(b.16(a[i],c)===P)1T}J{9(a.K==W)L(H i 1i a)b.2O(a[i],i,a[i]);J L(H i=0,48=a.K,3i=a[0];i<48&&b.2O(3i,i,3i)!==P;3i=a[++i]){}}I a},1e:G(c,b,d,e,a){9(E.1n(b))b=b.2O(c,[e]);H f=/z-?4I|7T-?7Q|1r|69|7P-?1H/i;I b&&b.1c==4W&&d=="3C"&&!f.14(a)?b+"2T":b},1o:{1f:G(b,c){E.N((c||"").2l(/\\s+/),G(i,a){9(!E.1o.3K(b.1o,a))b.1o+=(b.1o?" ":"")+a})},28:G(b,c){b.1o=c!=W?E.2W(b.1o.2l(/\\s+/),G(a){I!E.1o.3K(c,a)}).66(" "):""},3K:G(t,c){I E.2A(c,(t.1o||t).3s().2l(/\\s+/))>-1}},2k:G(e,o,f){L(H i 1i o){e.R["3r"+i]=e.R[i];e.R[i]=o[i]}f.16(e,[]);L(H i 1i o)e.R[i]=e.R["3r"+i]},17:G(e,p){9(p=="1H"||p=="2N"){H b={},42,41,d=["7J","7I","7G","7F"];E.N(d,G(){b["7C"+6]=0;b["7B"+6+"5Z"]=0});E.2k(e,b,G(){9(E(e).3t(\':3R\')){42=e.7A;41=e.7w}J{e=E(e.4R(Q)).1Y(":4k").5W("2Q").2D().17({4C:"1P",2X:"4F",19:"2Z",7o:"0",1S:"0"}).5R(e.12)[0];H a=E.17(e.12,"2X")||"3V";9(a=="3V")e.12.R.2X="7g";42=e.7e;41=e.7b;9(a=="3V")e.12.R.2X="3V";e.12.3b(e)}});I p=="1H"?42:41}I E.3C(e,p)},3C:G(h,j,i){H g,2w=[],2k=[];G 3n(a){9(!E.V.1N)I P;H b=U.3o.3Z(a,S);I!b||b.4y("3n")==""}9(j=="1r"&&E.V.1h){g=E.1x(h.R,"1r");I g==""?"1":g}9(j.1t(/4u/i))j=y;9(!i&&h.R[j])g=h.R[j];J 9(U.3o&&U.3o.3Z){9(j.1t(/4u/i))j="4u";j=j.1p(/([A-Z])/g,"-$1").2p();H d=U.3o.3Z(h,S);9(d&&!3n(h))g=d.4y(j);J{L(H a=h;a&&3n(a);a=a.12)2w.4w(a);L(a=0;a<2w.K;a++)9(3n(2w[a])){2k[a]=2w[a].R.19;2w[a].R.19="2Z"}g=j=="19"&&2k[2w.K-1]!=S?"2s":U.3o.3Z(h,S).4y(j)||"";L(a=0;a<2k.K;a++)9(2k[a]!=S)2w[a].R.19=2k[a]}9(j=="1r"&&g=="")g="1"}J 9(h.3Q){H f=j.1p(/\\-(\\w)/g,G(m,c){I c.27()});g=h.3Q[j]||h.3Q[f];9(!/^\\d+(2T)?$/i.14(g)&&/^\\d/.14(g)){H k=h.R.1S;H e=h.4v.1S;h.4v.1S=h.3Q.1S;h.R.1S=g||0;g=h.R.71+"2T";h.R.1S=k;h.4v.1S=e}}I g},4D:G(a,e){H r=[];e=e||U;E.N(a,G(i,d){9(!d)I;9(d.1c==4W)d=d.3s();9(1m d=="1M"){d=d.1p(/(<(\\w+)[^>]*?)\\/>/g,G(m,a,b){I b.1t(/^(70|6Z|6Y|9Q|4t|9N|9K|3a|9G|9E)$/i)?m:a+"></"+b+">"});H s=E.36(d).2p(),1s=e.5B("1s"),2x=[];H c=!s.1g("<9y")&&[1,"<24>","</24>"]||!s.1g("<9w")&&[1,"<6T>","</6T>"]||s.1t(/^<(9u|1K|9t|9r|9p)/)&&[1,"<1I>","</1I>"]||!s.1g("<4m")&&[2,"<1I><1K>","</1K></1I>"]||(!s.1g("<9m")||!s.1g("<9k"))&&[3,"<1I><1K><4m>","</4m></1K></1I>"]||!s.1g("<6Y")&&[2,"<1I><1K></1K><6L>","</6L></1I>"]||E.V.1h&&[1,"1s<1s>","</1s>"]||[0,"",""];1s.3O=c[1]+d+c[2];1W(c[0]--)1s=1s.5p;9(E.V.1h){9(!s.1g("<1I")&&s.1g("<1K")<0)2x=1s.1w&&1s.1w.3j;J 9(c[1]=="<1I>"&&s.1g("<1K")<0)2x=1s.3j;L(H n=2x.K-1;n>=0;--n)9(E.11(2x[n],"1K")&&!2x[n].3j.K)2x[n].12.3b(2x[n]);9(/^\\s/.14(d))1s.3d(e.6F(d.1t(/^\\s*/)[0]),1s.1w)}d=E.2h(1s.3j)}9(0===d.K&&(!E.11(d,"2Y")&&!E.11(d,"24")))I;9(d[0]==W||E.11(d,"2Y")||d.Y)r.1a(d);J r=E.1R(r,d)});I r},1x:G(c,d,a){H e=E.4a(c)?{}:E.5o;9(d=="26"&&E.V.1N)c.12.4Z;9(e[d]){9(a!=W)c[e[d]]=a;I c[e[d]]}J 9(E.V.1h&&d=="R")I E.1x(c.R,"9e",a);J 9(a==W&&E.V.1h&&E.11(c,"2Y")&&(d=="9d"||d=="9a"))I c.97(d).6x;J 9(c.37){9(a!=W){9(d=="O"&&E.11(c,"4t")&&c.12)6G"O 94 93\'t 92 91";c.90(d,a)}9(E.V.1h&&/6C|3k/.14(d)&&!E.4a(c))I c.4p(d,2);I c.4p(d)}J{9(d=="1r"&&E.V.1h){9(a!=W){c.69=1;c.1E=(c.1E||"").1p(/6O\\([^)]*\\)/,"")+(3I(a).3s()=="8S"?"":"6O(1r="+a*6A+")")}I c.1E?(3I(c.1E.1t(/1r=([^)]*)/)[1])/6A).3s():""}d=d.1p(/-([a-z])/8Q,G(z,b){I b.27()});9(a!=W)c[d]=a;I c[d]}},36:G(t){I(t||"").1p(/^\\s+|\\s+$/g,"")},2h:G(a){H r=[];9(1m a!="8P")L(H i=0,2c=a.K;i<2c;i++)r.1a(a[i]);J r=a.2J(0);I r},2A:G(b,a){L(H i=0,2c=a.K;i<2c;i++)9(a[i]==b)I i;I-1},1R:G(a,b){9(E.V.1h){L(H i=0;b[i];i++)9(b[i].1y!=8)a.1a(b[i])}J L(H i=0;b[i];i++)a.1a(b[i]);I a},4V:G(b){H r=[],2f={};2a{L(H i=0,6y=b.K;i<6y;i++){H a=E.M(b[i]);9(!2f[a]){2f[a]=Q;r.1a(b[i])}}}29(e){r=b}I r},2W:G(b,a,c){9(1m a=="1M")a=3w("P||G(a,i){I "+a+"}");H d=[];L(H i=0,4g=b.K;i<4g;i++)9(!c&&a(b[i],i)||c&&!a(b[i],i))d.1a(b[i]);I d},1X:G(c,b){9(1m b=="1M")b=3w("P||G(a){I "+b+"}");H d=[];L(H i=0,4g=c.K;i<4g;i++){H a=b(c[i],i);9(a!==S&&a!=W){9(a.1c!=1B)a=[a];d=d.8M(a)}}I d}});H v=8K.8I.2p();E.V={4s:(v.1t(/.+(?:8F|8E|8C|8B)[\\/: ]([\\d.]+)/)||[])[1],1N:/6w/.14(v),34:/34/.14(v),1h:/1h/.14(v)&&!/34/.14(v),35:/35/.14(v)&&!/(8z|6w)/.14(v)};H y=E.V.1h?"4h":"5h";E.1k({5g:!E.V.1h||U.8y=="8x",4h:E.V.1h?"4h":"5h",5o:{"L":"8w","8v":"1o","4u":y,5h:y,4h:y,3O:"3O",1o:"1o",1Q:"1Q",3c:"3c",2Q:"2Q",8u:"8t",26:"26",8s:"8r"}});E.N({1D:"a.12",8q:"15.4e(a,\'12\')",8p:"15.2I(a,2,\'2q\')",8n:"15.2I(a,2,\'4d\')",8l:"15.4e(a,\'2q\')",8k:"15.4e(a,\'4d\')",8j:"15.5d(a.12.1w,a)",8i:"15.5d(a.1w)",6q:"15.11(a,\'8h\')?a.8f||a.8e.U:15.2h(a.3j)"},G(i,n){E.1b[i]=G(a){H b=E.1X(6,n);9(a&&1m a=="1M")b=E.3m(a,b);I 6.2o(E.4V(b))}});E.N({5R:"3g",8c:"6j",3d:"6g",8b:"50",89:"6H"},G(i,n){E.1b[i]=G(){H a=1q;I 6.N(G(){L(H j=0,2c=a.K;j<2c;j++)E(a[j])[n](6)})}});E.N({5W:G(a){E.1x(6,a,"");6.53(a)},88:G(c){E.1o.1f(6,c)},87:G(c){E.1o.28(6,c)},86:G(c){E.1o[E.1o.3K(6,c)?"28":"1f"](6,c)},28:G(a){9(!a||E.1E(a,[6]).r.K){E.30(6);6.12.3b(6)}},4n:G(){E("*",6).N(G(){E.30(6)});1W(6.1w)6.3b(6.1w)}},G(i,n){E.1b[i]=G(){I 6.N(n,1q)}});E.N(["85","5Z"],G(i,a){H n=a.2p();E.1b[n]=G(h){I 6[0]==18?E.V.1N&&3y["84"+a]||E.5g&&38.33(U.2V["5a"+a],U.1G["5a"+a])||U.1G["5a"+a]:6[0]==U?38.33(U.1G["6n"+a],U.1G["6m"+a]):h==W?(6.K?E.17(6[0],n):S):6.17(n,h.1c==3X?h:h+"2T")}});H C=E.V.1N&&3x(E.V.4s)<83?"(?:[\\\\w*57-]|\\\\\\\\.)":"(?:[\\\\w\\82-\\81*57-]|\\\\\\\\.)",6k=1u 47("^>\\\\s*("+C+"+)"),6i=1u 47("^("+C+"+)(#)("+C+"+)"),6h=1u 47("^([#.]?)("+C+"*)");E.1k({55:{"":"m[2]==\'*\'||15.11(a,m[2])","#":"a.4p(\'22\')==m[2]",":":{80:"i<m[3]-0",7Z:"i>m[3]-0",2I:"m[3]-0==i",6E:"m[3]-0==i",3v:"i==0",3u:"i==r.K-1",6f:"i%2==0",6e:"i%2","3v-46":"a.12.4l(\'*\')[0]==a","3u-46":"15.2I(a.12.5p,1,\'4d\')==a","7X-46":"!15.2I(a.12.5p,2,\'4d\')",1D:"a.1w",4n:"!a.1w",7W:"(a.6s||a.7V||15(a).2g()||\'\').1g(m[3])>=0",3R:\'"1P"!=a.O&&15.17(a,"19")!="2s"&&15.17(a,"4C")!="1P"\',1P:\'"1P"==a.O||15.17(a,"19")=="2s"||15.17(a,"4C")=="1P"\',7U:"!a.3c",3c:"a.3c",2Q:"a.2Q",26:"a.26||15.1x(a,\'26\')",2g:"\'2g\'==a.O",4k:"\'4k\'==a.O",5j:"\'5j\'==a.O",54:"\'54\'==a.O",52:"\'52\'==a.O",51:"\'51\'==a.O",6d:"\'6d\'==a.O",6c:"\'6c\'==a.O",2r:\'"2r"==a.O||15.11(a,"2r")\',4t:"/4t|24|6b|2r/i.14(a.11)",3K:"15.1Y(m[3],a).K",7S:"/h\\\\d/i.14(a.11)",7R:"15.2W(15.32,G(1b){I a==1b.T;}).K"}},6a:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1u 47("^([:.#]*)("+C+"+)")],3m:G(a,c,b){H d,2b=[];1W(a&&a!=d){d=a;H f=E.1E(a,c,b);a=f.t.1p(/^\\s*,\\s*/,"");2b=b?c=f.r:E.1R(2b,f.r)}I 2b},1Y:G(t,o){9(1m t!="1M")I[t];9(o&&!o.1y)o=S;o=o||U;H d=[o],2f=[],3u;1W(t&&3u!=t){H r=[];3u=t;t=E.36(t);H l=P;H g=6k;H m=g.2S(t);9(m){H p=m[1].27();L(H i=0;d[i];i++)L(H c=d[i].1w;c;c=c.2q)9(c.1y==1&&(p=="*"||c.11.27()==p.27()))r.1a(c);d=r;t=t.1p(g,"");9(t.1g(" ")==0)6r;l=Q}J{g=/^([>+~])\\s*(\\w*)/i;9((m=g.2S(t))!=S){r=[];H p=m[2],1R={};m=m[1];L(H j=0,31=d.K;j<31;j++){H n=m=="~"||m=="+"?d[j].2q:d[j].1w;L(;n;n=n.2q)9(n.1y==1){H h=E.M(n);9(m=="~"&&1R[h])1T;9(!p||n.11.27()==p.27()){9(m=="~")1R[h]=Q;r.1a(n)}9(m=="+")1T}}d=r;t=E.36(t.1p(g,""));l=Q}}9(t&&!l){9(!t.1g(",")){9(o==d[0])d.44();2f=E.1R(2f,d);r=d=[o];t=" "+t.68(1,t.K)}J{H k=6i;H m=k.2S(t);9(m){m=[0,m[2],m[3],m[1]]}J{k=6h;m=k.2S(t)}m[2]=m[2].1p(/\\\\/g,"");H f=d[d.K-1];9(m[1]=="#"&&f&&f.3S&&!E.4a(f)){H q=f.3S(m[2]);9((E.V.1h||E.V.34)&&q&&1m q.22=="1M"&&q.22!=m[2])q=E(\'[@22="\'+m[2]+\'"]\',f)[0];d=r=q&&(!m[3]||E.11(q,m[3]))?[q]:[]}J{L(H i=0;d[i];i++){H a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];9(a=="*"&&d[i].11.2p()=="5i")a="3a";r=E.1R(r,d[i].4l(a))}9(m[1]==".")r=E.4X(r,m[2]);9(m[1]=="#"){H e=[];L(H i=0;r[i];i++)9(r[i].4p("22")==m[2]){e=[r[i]];1T}r=e}d=r}t=t.1p(k,"")}}9(t){H b=E.1E(t,r);d=r=b.r;t=E.36(b.t)}}9(t)d=[];9(d&&o==d[0])d.44();2f=E.1R(2f,d);I 2f},4X:G(r,m,a){m=" "+m+" ";H c=[];L(H i=0;r[i];i++){H b=(" "+r[i].1o+" ").1g(m)>=0;9(!a&&b||a&&!b)c.1a(r[i])}I c},1E:G(t,r,h){H d;1W(t&&t!=d){d=t;H p=E.6a,m;L(H i=0;p[i];i++){m=p[i].2S(t);9(m){t=t.7O(m[0].K);m[2]=m[2].1p(/\\\\/g,"");1T}}9(!m)1T;9(m[1]==":"&&m[2]=="5V")r=E.1E(m[3],r,Q).r;J 9(m[1]==".")r=E.4X(r,m[2],h);J 9(m[1]=="["){H g=[],O=m[3];L(H i=0,31=r.K;i<31;i++){H a=r[i],z=a[E.5o[m[2]]||m[2]];9(z==S||/6C|3k|26/.14(m[2]))z=E.1x(a,m[2])||\'\';9((O==""&&!!z||O=="="&&z==m[5]||O=="!="&&z!=m[5]||O=="^="&&z&&!z.1g(m[5])||O=="$="&&z.68(z.K-m[5].K)==m[5]||(O=="*="||O=="~=")&&z.1g(m[5])>=0)^h)g.1a(a)}r=g}J 9(m[1]==":"&&m[2]=="2I-46"){H e={},g=[],14=/(\\d*)n\\+?(\\d*)/.2S(m[3]=="6f"&&"2n"||m[3]=="6e"&&"2n+1"||!/\\D/.14(m[3])&&"n+"+m[3]||m[3]),3v=(14[1]||1)-0,d=14[2]-0;L(H i=0,31=r.K;i<31;i++){H j=r[i],12=j.12,22=E.M(12);9(!e[22]){H c=1;L(H n=12.1w;n;n=n.2q)9(n.1y==1)n.4U=c++;e[22]=Q}H b=P;9(3v==1){9(d==0||j.4U==d)b=Q}J 9((j.4U+d)%3v==0)b=Q;9(b^h)g.1a(j)}r=g}J{H f=E.55[m[1]];9(1m f!="1M")f=E.55[m[1]][m[2]];f=3w("P||G(a,i){I "+f+"}");r=E.2W(r,f,h)}}I{r:r,t:t}},4e:G(b,c){H d=[];H a=b[c];1W(a&&a!=U){9(a.1y==1)d.1a(a);a=a[c]}I d},2I:G(a,e,c,b){e=e||1;H d=0;L(;a;a=a[c])9(a.1y==1&&++d==e)1T;I a},5d:G(n,a){H r=[];L(;n;n=n.2q){9(n.1y==1&&(!a||n!=a))r.1a(n)}I r}});E.1j={1f:G(g,e,c,h){9(E.V.1h&&g.4j!=W)g=18;9(!c.2u)c.2u=6.2u++;9(h!=W){H d=c;c=G(){I d.16(6,1q)};c.M=h;c.2u=d.2u}H i=e.2l(".");e=i[0];c.O=i[1];H b=E.M(g,"2P")||E.M(g,"2P",{});H f=E.M(g,"2t",G(){H a;9(1m E=="W"||E.1j.4T)I a;a=E.1j.2t.16(g,1q);I a});H j=b[e];9(!j){j=b[e]={};9(g.4S)g.4S(e,f,P);J g.7N("43"+e,f)}j[c.2u]=c;6.1Z[e]=Q},2u:1,1Z:{},28:G(d,c,b){H e=E.M(d,"2P"),2L,4I;9(1m c=="1M"){H a=c.2l(".");c=a[0]}9(e){9(c&&c.O){b=c.4Q;c=c.O}9(!c){L(c 1i e)6.28(d,c)}J 9(e[c]){9(b)2E e[c][b.2u];J L(b 1i e[c])9(!a[1]||e[c][b].O==a[1])2E e[c][b];L(2L 1i e[c])1T;9(!2L){9(d.4P)d.4P(c,E.M(d,"2t"),P);J d.7M("43"+c,E.M(d,"2t"));2L=S;2E e[c]}}L(2L 1i e)1T;9(!2L){E.30(d,"2P");E.30(d,"2t")}}},1F:G(d,b,e,c,f){b=E.2h(b||[]);9(!e){9(6.1Z[d])E("*").1f([18,U]).1F(d,b)}J{H a,2L,1b=E.1n(e[d]||S),4N=!b[0]||!b[0].2M;9(4N)b.4w(6.4M({O:d,2m:e}));b[0].O=d;9(E.1n(E.M(e,"2t")))a=E.M(e,"2t").16(e,b);9(!1b&&e["43"+d]&&e["43"+d].16(e,b)===P)a=P;9(4N)b.44();9(f&&f.16(e,b)===P)a=P;9(1b&&c!==P&&a!==P&&!(E.11(e,\'a\')&&d=="4L")){6.4T=Q;e[d]()}6.4T=P}I a},2t:G(d){H a;d=E.1j.4M(d||18.1j||{});H b=d.O.2l(".");d.O=b[0];H c=E.M(6,"2P")&&E.M(6,"2P")[d.O],3q=1B.3A.2J.2O(1q,1);3q.4w(d);L(H j 1i c){3q[0].4Q=c[j];3q[0].M=c[j].M;9(!b[1]||c[j].O==b[1]){H e=c[j].16(6,3q);9(a!==P)a=e;9(e===P){d.2M();d.3p()}}}9(E.V.1h)d.2m=d.2M=d.3p=d.4Q=d.M=S;I a},4M:G(c){H a=c;c=E.1k({},a);c.2M=G(){9(a.2M)a.2M();a.7L=P};c.3p=G(){9(a.3p)a.3p();a.7K=Q};9(!c.2m&&c.65)c.2m=c.65;9(E.V.1N&&c.2m.1y==3)c.2m=a.2m.12;9(!c.4K&&c.4J)c.4K=c.4J==c.2m?c.7H:c.4J;9(c.64==S&&c.63!=S){H e=U.2V,b=U.1G;c.64=c.63+(e&&e.2R||b.2R||0);c.7E=c.7D+(e&&e.2B||b.2B||0)}9(!c.3Y&&(c.61||c.60))c.3Y=c.61||c.60;9(!c.5F&&c.5D)c.5F=c.5D;9(!c.3Y&&c.2r)c.3Y=(c.2r&1?1:(c.2r&2?3:(c.2r&4?2:0)));I c}};E.1b.1k({3W:G(c,a,b){I c=="5Y"?6.2G(c,a,b):6.N(G(){E.1j.1f(6,c,b||a,b&&a)})},2G:G(d,b,c){I 6.N(G(){E.1j.1f(6,d,G(a){E(6).5X(a);I(c||b).16(6,1q)},c&&b)})},5X:G(a,b){I 6.N(G(){E.1j.28(6,a,b)})},1F:G(c,a,b){I 6.N(G(){E.1j.1F(c,a,6,Q,b)})},7x:G(c,a,b){9(6[0])I E.1j.1F(c,a,6[0],P,b)},25:G(){H a=1q;I 6.4L(G(e){6.4H=0==6.4H?1:0;e.2M();I a[6.4H].16(6,[e])||P})},7v:G(f,g){G 4G(e){H p=e.4K;1W(p&&p!=6)2a{p=p.12}29(e){p=6};9(p==6)I P;I(e.O=="4x"?f:g).16(6,[e])}I 6.4x(4G).5U(4G)},2d:G(f){5T();9(E.3T)f.16(U,[E]);J E.3l.1a(G(){I f.16(6,[E])});I 6}});E.1k({3T:P,3l:[],2d:G(){9(!E.3T){E.3T=Q;9(E.3l){E.N(E.3l,G(){6.16(U)});E.3l=S}9(E.V.35||E.V.34)U.4P("5S",E.2d,P);9(!18.7t.K)E(18).39(G(){E("#4E").28()})}}});E.N(("7s,7r,39,7q,6n,5Y,4L,7p,"+"7n,7m,7l,4x,5U,7k,24,"+"51,7j,7i,7h,3U").2l(","),G(i,o){E.1b[o]=G(f){I f?6.3W(o,f):6.1F(o)}});H x=P;G 5T(){9(x)I;x=Q;9(E.V.35||E.V.34)U.4S("5S",E.2d,P);J 9(E.V.1h){U.7f("<7d"+"7y 22=4E 7z=Q "+"3k=//:><\\/1J>");H a=U.3S("4E");9(a)a.62=G(){9(6.2C!="1l")I;E.2d()};a=S}J 9(E.V.1N)E.4B=4j(G(){9(U.2C=="5Q"||U.2C=="1l"){4A(E.4B);E.4B=S;E.2d()}},10);E.1j.1f(18,"39",E.2d)}E.1b.1k({39:G(g,d,c){9(E.1n(g))I 6.3W("39",g);H e=g.1g(" ");9(e>=0){H i=g.2J(e,g.K);g=g.2J(0,e)}c=c||G(){};H f="4z";9(d)9(E.1n(d)){c=d;d=S}J{d=E.3a(d);f="5P"}H h=6;E.3G({1d:g,O:f,M:d,1l:G(a,b){9(b=="1C"||b=="5O")h.4o(i?E("<1s/>").3g(a.40.1p(/<1J(.|\\s)*?\\/1J>/g,"")).1Y(i):a.40);56(G(){h.N(c,[a.40,b,a])},13)}});I 6},7a:G(){I E.3a(6.5M())},5M:G(){I 6.1X(G(){I E.11(6,"2Y")?E.2h(6.79):6}).1E(G(){I 6.2H&&!6.3c&&(6.2Q||/24|6b/i.14(6.11)||/2g|1P|52/i.14(6.O))}).1X(G(i,c){H b=E(6).3i();I b==S?S:b.1c==1B?E.1X(b,G(a,i){I{2H:c.2H,1Q:a}}):{2H:c.2H,1Q:b}}).21()}});E.N("5L,5K,6t,5J,5I,5H".2l(","),G(i,o){E.1b[o]=G(f){I 6.3W(o,f)}});H B=(1u 3D).3B();E.1k({21:G(d,b,a,c){9(E.1n(b)){a=b;b=S}I E.3G({O:"4z",1d:d,M:b,1C:a,1V:c})},78:G(b,a){I E.21(b,S,a,"1J")},77:G(c,b,a){I E.21(c,b,a,"45")},76:G(d,b,a,c){9(E.1n(b)){a=b;b={}}I E.3G({O:"5P",1d:d,M:b,1C:a,1V:c})},75:G(a){E.1k(E.59,a)},59:{1Z:Q,O:"4z",2z:0,5G:"74/x-73-2Y-72",6o:Q,3e:Q,M:S},49:{},3G:G(s){H f,2y=/=(\\?|%3F)/g,1v,M;s=E.1k(Q,s,E.1k(Q,{},E.59,s));9(s.M&&s.6o&&1m s.M!="1M")s.M=E.3a(s.M);9(s.1V=="4b"){9(s.O.2p()=="21"){9(!s.1d.1t(2y))s.1d+=(s.1d.1t(/\\?/)?"&":"?")+(s.4b||"5E")+"=?"}J 9(!s.M||!s.M.1t(2y))s.M=(s.M?s.M+"&":"")+(s.4b||"5E")+"=?";s.1V="45"}9(s.1V=="45"&&(s.M&&s.M.1t(2y)||s.1d.1t(2y))){f="4b"+B++;9(s.M)s.M=s.M.1p(2y,"="+f);s.1d=s.1d.1p(2y,"="+f);s.1V="1J";18[f]=G(a){M=a;1C();1l();18[f]=W;2a{2E 18[f]}29(e){}}}9(s.1V=="1J"&&s.1L==S)s.1L=P;9(s.1L===P&&s.O.2p()=="21")s.1d+=(s.1d.1t(/\\?/)?"&":"?")+"57="+(1u 3D()).3B();9(s.M&&s.O.2p()=="21"){s.1d+=(s.1d.1t(/\\?/)?"&":"?")+s.M;s.M=S}9(s.1Z&&!E.5b++)E.1j.1F("5L");9(!s.1d.1g("8g")&&s.1V=="1J"){H h=U.4l("9U")[0];H g=U.5B("1J");g.3k=s.1d;9(!f&&(s.1C||s.1l)){H j=P;g.9R=g.62=G(){9(!j&&(!6.2C||6.2C=="5Q"||6.2C=="1l")){j=Q;1C();1l();h.3b(g)}}}h.58(g);I}H k=P;H i=18.6X?1u 6X("9P.9O"):1u 6W();i.9M(s.O,s.1d,s.3e);9(s.M)i.5C("9J-9I",s.5G);9(s.5y)i.5C("9H-5x-9F",E.49[s.1d]||"9D, 9C 9B 9A 5v:5v:5v 9z");i.5C("X-9x-9v","6W");9(s.6U)s.6U(i);9(s.1Z)E.1j.1F("5H",[i,s]);H c=G(a){9(!k&&i&&(i.2C==4||a=="2z")){k=Q;9(d){4A(d);d=S}1v=a=="2z"&&"2z"||!E.6S(i)&&"3U"||s.5y&&E.6R(i,s.1d)&&"5O"||"1C";9(1v=="1C"){2a{M=E.6Q(i,s.1V)}29(e){1v="5k"}}9(1v=="1C"){H b;2a{b=i.5s("6P-5x")}29(e){}9(s.5y&&b)E.49[s.1d]=b;9(!f)1C()}J E.5r(s,i,1v);1l();9(s.3e)i=S}};9(s.3e){H d=4j(c,13);9(s.2z>0)56(G(){9(i){i.9q();9(!k)c("2z")}},s.2z)}2a{i.9o(s.M)}29(e){E.5r(s,i,S,e)}9(!s.3e)c();I i;G 1C(){9(s.1C)s.1C(M,1v);9(s.1Z)E.1j.1F("5I",[i,s])}G 1l(){9(s.1l)s.1l(i,1v);9(s.1Z)E.1j.1F("6t",[i,s]);9(s.1Z&&!--E.5b)E.1j.1F("5K")}},5r:G(s,a,b,e){9(s.3U)s.3U(a,b,e);9(s.1Z)E.1j.1F("5J",[a,s,e])},5b:0,6S:G(r){2a{I!r.1v&&9n.9l=="54:"||(r.1v>=6N&&r.1v<9j)||r.1v==6M||E.V.1N&&r.1v==W}29(e){}I P},6R:G(a,c){2a{H b=a.5s("6P-5x");I a.1v==6M||b==E.49[c]||E.V.1N&&a.1v==W}29(e){}I P},6Q:G(r,b){H c=r.5s("9i-O");H d=b=="6K"||!b&&c&&c.1g("6K")>=0;H a=d?r.9g:r.40;9(d&&a.2V.37=="5k")6G"5k";9(b=="1J")E.5f(a);9(b=="45")a=3w("("+a+")");I a},3a:G(a){H s=[];9(a.1c==1B||a.4c)E.N(a,G(){s.1a(3f(6.2H)+"="+3f(6.1Q))});J L(H j 1i a)9(a[j]&&a[j].1c==1B)E.N(a[j],G(){s.1a(3f(j)+"="+3f(6))});J s.1a(3f(j)+"="+3f(a[j]));I s.66("&").1p(/%20/g,"+")}});E.1b.1k({1A:G(b,a){I b?6.1U({1H:"1A",2N:"1A",1r:"1A"},b,a):6.1E(":1P").N(G(){6.R.19=6.3h?6.3h:"";9(E.17(6,"19")=="2s")6.R.19="2Z"}).2D()},1z:G(b,a){I b?6.1U({1H:"1z",2N:"1z",1r:"1z"},b,a):6.1E(":3R").N(G(){6.3h=6.3h||E.17(6,"19");9(6.3h=="2s")6.3h="2Z";6.R.19="2s"}).2D()},6J:E.1b.25,25:G(a,b){I E.1n(a)&&E.1n(b)?6.6J(a,b):a?6.1U({1H:"25",2N:"25",1r:"25"},a,b):6.N(G(){E(6)[E(6).3t(":1P")?"1A":"1z"]()})},9c:G(b,a){I 6.1U({1H:"1A"},b,a)},9b:G(b,a){I 6.1U({1H:"1z"},b,a)},99:G(b,a){I 6.1U({1H:"25"},b,a)},98:G(b,a){I 6.1U({1r:"1A"},b,a)},96:G(b,a){I 6.1U({1r:"1z"},b,a)},95:G(c,a,b){I 6.1U({1r:a},c,b)},1U:G(k,i,h,g){H j=E.6D(i,h,g);I 6[j.3L===P?"N":"3L"](G(){j=E.1k({},j);H f=E(6).3t(":1P"),3y=6;L(H p 1i k){9(k[p]=="1z"&&f||k[p]=="1A"&&!f)I E.1n(j.1l)&&j.1l.16(6);9(p=="1H"||p=="2N"){j.19=E.17(6,"19");j.2U=6.R.2U}}9(j.2U!=S)6.R.2U="1P";j.3M=E.1k({},k);E.N(k,G(c,a){H e=1u E.2j(3y,j,c);9(/25|1A|1z/.14(a))e[a=="25"?f?"1A":"1z":a](k);J{H b=a.3s().1t(/^([+-]=)?([\\d+-.]+)(.*)$/),1O=e.2b(Q)||0;9(b){H d=3I(b[2]),2i=b[3]||"2T";9(2i!="2T"){3y.R[c]=(d||1)+2i;1O=((d||1)/e.2b(Q))*1O;3y.R[c]=1O+2i}9(b[1])d=((b[1]=="-="?-1:1)*d)+1O;e.3N(1O,d,2i)}J e.3N(1O,a,"")}});I Q})},3L:G(a,b){9(E.1n(a)){b=a;a="2j"}9(!a||(1m a=="1M"&&!b))I A(6[0],a);I 6.N(G(){9(b.1c==1B)A(6,a,b);J{A(6,a).1a(b);9(A(6,a).K==1)b.16(6)}})},9f:G(){H a=E.32;I 6.N(G(){L(H i=0;i<a.K;i++)9(a[i].T==6)a.6I(i--,1)}).5n()}});H A=G(b,c,a){9(!b)I;H q=E.M(b,c+"3L");9(!q||a)q=E.M(b,c+"3L",a?E.2h(a):[]);I q};E.1b.5n=G(a){a=a||"2j";I 6.N(G(){H q=A(6,a);q.44();9(q.K)q[0].16(6)})};E.1k({6D:G(b,a,c){H d=b&&b.1c==8Z?b:{1l:c||!c&&a||E.1n(b)&&b,2e:b,3J:c&&a||a&&a.1c!=8Y&&a};d.2e=(d.2e&&d.2e.1c==4W?d.2e:{8X:8W,8V:6N}[d.2e])||8T;d.3r=d.1l;d.1l=G(){E(6).5n();9(E.1n(d.3r))d.3r.16(6)};I d},3J:{6B:G(p,n,b,a){I b+a*p},5q:G(p,n,b,a){I((-38.9s(p*38.8R)/2)+0.5)*a+b}},32:[],2j:G(b,c,a){6.Y=c;6.T=b;6.1e=a;9(!c.3P)c.3P={}}});E.2j.3A={4r:G(){9(6.Y.2F)6.Y.2F.16(6.T,[6.2v,6]);(E.2j.2F[6.1e]||E.2j.2F.6z)(6);9(6.1e=="1H"||6.1e=="2N")6.T.R.19="2Z"},2b:G(a){9(6.T[6.1e]!=S&&6.T.R[6.1e]==S)I 6.T[6.1e];H r=3I(E.3C(6.T,6.1e,a));I r&&r>-8O?r:3I(E.17(6.T,6.1e))||0},3N:G(c,b,e){6.5u=(1u 3D()).3B();6.1O=c;6.2D=b;6.2i=e||6.2i||"2T";6.2v=6.1O;6.4q=6.4i=0;6.4r();H f=6;G t(){I f.2F()}t.T=6.T;E.32.1a(t);9(E.32.K==1){H d=4j(G(){H a=E.32;L(H i=0;i<a.K;i++)9(!a[i]())a.6I(i--,1);9(!a.K)4A(d)},13)}},1A:G(){6.Y.3P[6.1e]=E.1x(6.T.R,6.1e);6.Y.1A=Q;6.3N(0,6.2b());9(6.1e=="2N"||6.1e=="1H")6.T.R[6.1e]="8N";E(6.T).1A()},1z:G(){6.Y.3P[6.1e]=E.1x(6.T.R,6.1e);6.Y.1z=Q;6.3N(6.2b(),0)},2F:G(){H t=(1u 3D()).3B();9(t>6.Y.2e+6.5u){6.2v=6.2D;6.4q=6.4i=1;6.4r();6.Y.3M[6.1e]=Q;H a=Q;L(H i 1i 6.Y.3M)9(6.Y.3M[i]!==Q)a=P;9(a){9(6.Y.19!=S){6.T.R.2U=6.Y.2U;6.T.R.19=6.Y.19;9(E.17(6.T,"19")=="2s")6.T.R.19="2Z"}9(6.Y.1z)6.T.R.19="2s";9(6.Y.1z||6.Y.1A)L(H p 1i 6.Y.3M)E.1x(6.T.R,p,6.Y.3P[p])}9(a&&E.1n(6.Y.1l))6.Y.1l.16(6.T);I P}J{H n=t-6.5u;6.4i=n/6.Y.2e;6.4q=E.3J[6.Y.3J||(E.3J.5q?"5q":"6B")](6.4i,n,0,1,6.Y.2e);6.2v=6.1O+((6.2D-6.1O)*6.4q);6.4r()}I Q}};E.2j.2F={2R:G(a){a.T.2R=a.2v},2B:G(a){a.T.2B=a.2v},1r:G(a){E.1x(a.T.R,"1r",a.2v)},6z:G(a){a.T.R[a.1e]=a.2v+a.2i}};E.1b.6m=G(){H c=0,3E=0,T=6[0],5t;9(T)8L(E.V){H b=E.17(T,"2X")=="4F",1D=T.12,23=T.23,2K=T.3H,4f=1N&&3x(4s)<8J;9(T.6V){5w=T.6V();1f(5w.1S+38.33(2K.2V.2R,2K.1G.2R),5w.3E+38.33(2K.2V.2B,2K.1G.2B));9(1h){H d=E("4o").17("8H");d=(d=="8G"||E.5g&&3x(4s)>=7)&&2||d;1f(-d,-d)}}J{1f(T.5l,T.5z);1W(23){1f(23.5l,23.5z);9(35&&/^t[d|h]$/i.14(1D.37)||!4f)d(23);9(4f&&!b&&E.17(23,"2X")=="4F")b=Q;23=23.23}1W(1D.37&&!/^1G|4o$/i.14(1D.37)){9(!/^8D|1I-9S.*$/i.14(E.17(1D,"19")))1f(-1D.2R,-1D.2B);9(35&&E.17(1D,"2U")!="3R")d(1D);1D=1D.12}9(4f&&b)1f(-2K.1G.5l,-2K.1G.5z)}5t={3E:3E,1S:c}}I 5t;G d(a){1f(E.17(a,"9T"),E.17(a,"8A"))}G 1f(l,t){c+=3x(l)||0;3E+=3x(t)||0}}})();',62,616,'||||||this|||if|||||||||||||||||||||||||||||||||function|var|return|else|length|for|data|each|type|false|true|style|null|elem|document|browser|undefined||options|||nodeName|parentNode||test|jQuery|apply|css|window|display|push|fn|constructor|url|prop|add|indexOf|msie|in|event|extend|complete|typeof|isFunction|className|replace|arguments|opacity|div|match|new|status|firstChild|attr|nodeType|hide|show|Array|success|parent|filter|trigger|body|height|table|script|tbody|cache|string|safari|start|hidden|value|merge|left|break|animate|dataType|while|map|find|global||get|id|offsetParent|select|toggle|selected|toUpperCase|remove|catch|try|cur|al|ready|duration|done|text|makeArray|unit|fx|swap|split|target||pushStack|toLowerCase|nextSibling|button|none|handle|guid|now|stack|tb|jsre|timeout|inArray|scrollTop|readyState|end|delete|step|one|name|nth|slice|doc|ret|preventDefault|width|call|events|checked|scrollLeft|exec|px|overflow|documentElement|grep|position|form|block|removeData|rl|timers|max|opera|mozilla|trim|tagName|Math|load|param|removeChild|disabled|insertBefore|async|encodeURIComponent|append|oldblock|val|childNodes|src|readyList|multiFilter|color|defaultView|stopPropagation|args|old|toString|is|last|first|eval|parseInt|self|domManip|prototype|getTime|curCSS|Date|top||ajax|ownerDocument|parseFloat|easing|has|queue|curAnim|custom|innerHTML|orig|currentStyle|visible|getElementById|isReady|error|static|bind|String|which|getComputedStyle|responseText|oWidth|oHeight|on|shift|json|child|RegExp|ol|lastModified|isXMLDoc|jsonp|jquery|previousSibling|dir|safari2|el|styleFloat|state|setInterval|radio|getElementsByTagName|tr|empty|html|getAttribute|pos|update|version|input|float|runtimeStyle|unshift|mouseover|getPropertyValue|GET|clearInterval|safariTimer|visibility|clean|__ie_init|absolute|handleHover|lastToggle|index|fromElement|relatedTarget|click|fix|evt|andSelf|removeEventListener|handler|cloneNode|addEventListener|triggered|nodeIndex|unique|Number|classFilter|prevObject|selectedIndex|after|submit|password|removeAttribute|file|expr|setTimeout|_|appendChild|ajaxSettings|client|active|win|sibling|deep|globalEval|boxModel|cssFloat|object|checkbox|parsererror|offsetLeft|wrapAll|dequeue|props|lastChild|swing|handleError|getResponseHeader|results|startTime|00|box|Modified|ifModified|offsetTop|evalScript|createElement|setRequestHeader|ctrlKey|callback|metaKey|contentType|ajaxSend|ajaxSuccess|ajaxError|ajaxStop|ajaxStart|serializeArray|init|notmodified|POST|loaded|appendTo|DOMContentLoaded|bindReady|mouseout|not|removeAttr|unbind|unload|Width|keyCode|charCode|onreadystatechange|clientX|pageX|srcElement|join|outerHTML|substr|zoom|parse|textarea|reset|image|odd|even|before|quickClass|quickID|prepend|quickChild|execScript|offset|scroll|processData|uuid|contents|continue|textContent|ajaxComplete|clone|setArray|webkit|nodeValue|fl|_default|100|linear|href|speed|eq|createTextNode|throw|replaceWith|splice|_toggle|xml|colgroup|304|200|alpha|Last|httpData|httpNotModified|httpSuccess|fieldset|beforeSend|getBoundingClientRect|XMLHttpRequest|ActiveXObject|col|br|abbr|pixelLeft|urlencoded|www|application|ajaxSetup|post|getJSON|getScript|elements|serialize|clientWidth|hasClass|scr|clientHeight|write|relative|keyup|keypress|keydown|change|mousemove|mouseup|mousedown|right|dblclick|resize|focus|blur|frames|instanceof|hover|offsetWidth|triggerHandler|ipt|defer|offsetHeight|border|padding|clientY|pageY|Left|Right|toElement|Bottom|Top|cancelBubble|returnValue|detachEvent|attachEvent|substring|line|weight|animated|header|font|enabled|innerText|contains|only|size|gt|lt|uFFFF|u0128|417|inner|Height|toggleClass|removeClass|addClass|replaceAll|noConflict|insertAfter|prependTo|wrap|contentWindow|contentDocument|http|iframe|children|siblings|prevAll|nextAll|wrapInner|prev|Boolean|next|parents|maxLength|maxlength|readOnly|readonly|class|htmlFor|CSS1Compat|compatMode|compatible|borderTopWidth|ie|ra|inline|it|rv|medium|borderWidth|userAgent|522|navigator|with|concat|1px|10000|array|ig|PI|NaN|400|reverse|fast|600|slow|Function|Object|setAttribute|changed|be|can|property|fadeTo|fadeOut|getAttributeNode|fadeIn|slideToggle|method|slideUp|slideDown|action|cssText|stop|responseXML|option|content|300|th|protocol|td|location|send|cap|abort|colg|cos|tfoot|thead|With|leg|Requested|opt|GMT|1970|Jan|01|Thu|area|Since|hr|If|Type|Content|meta|specified|open|link|XMLHTTP|Microsoft|img|onload|row|borderLeftWidth|head|attributes'.split('|'),0,{})) \ No newline at end of file Added: XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-easing-compatibility.1.2.js =================================================================== --- XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-easing-compatibility.1.2.js (rev 0) +++ XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-easing-compatibility.1.2.js 2012-02-15 13:10:42 UTC (rev 8992) @@ -0,0 +1,58 @@ +/* + * jQuery Easing Compatibility v1 - http://gsgd.co.uk/sandbox/jquery.easing.php + * + * Adds compatibility for applications that use the pre 1.2 easing names + * + * Copyright (c) 2007 George Smith + * Licensed under the MIT License: + * http://www.opensource.org/licenses/mit-license.php + */ + +jQuery.extend( jQuery.easing, +{ + easeIn: function (x, t, b, c, d) { + return jQuery.easing.easeInQuad(x, t, b, c, d); + }, + easeOut: function (x, t, b, c, d) { + return jQuery.easing.easeOutQuad(x, t, b, c, d); + }, + easeInOut: function (x, t, b, c, d) { + return jQuery.easing.easeInOutQuad(x, t, b, c, d); + }, + expoin: function(x, t, b, c, d) { + return jQuery.easing.easeInExpo(x, t, b, c, d); + }, + expoout: function(x, t, b, c, d) { + return jQuery.easing.easeOutExpo(x, t, b, c, d); + }, + expoinout: function(x, t, b, c, d) { + return jQuery.easing.easeInOutExpo(x, t, b, c, d); + }, + bouncein: function(x, t, b, c, d) { + return jQuery.easing.easeInBounce(x, t, b, c, d); + }, + bounceout: function(x, t, b, c, d) { + return jQuery.easing.easeOutBounce(x, t, b, c, d); + }, + bounceinout: function(x, t, b, c, d) { + return jQuery.easing.easeInOutBounce(x, t, b, c, d); + }, + elasin: function(x, t, b, c, d) { + return jQuery.easing.easeInElastic(x, t, b, c, d); + }, + elasout: function(x, t, b, c, d) { + return jQuery.easing.easeOutElastic(x, t, b, c, d); + }, + elasinout: function(x, t, b, c, d) { + return jQuery.easing.easeInOutElastic(x, t, b, c, d); + }, + backin: function(x, t, b, c, d) { + return jQuery.easing.easeInBack(x, t, b, c, d); + }, + backout: function(x, t, b, c, d) { + return jQuery.easing.easeOutBack(x, t, b, c, d); + }, + backinout: function(x, t, b, c, d) { + return jQuery.easing.easeInOutBack(x, t, b, c, d); + } +}); \ No newline at end of file Added: XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-easing-compatibility.1.2.pack.js =================================================================== --- XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-easing-compatibility.1.2.pack.js (rev 0) +++ XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-easing-compatibility.1.2.pack.js 2012-02-15 13:10:42 UTC (rev 8992) @@ -0,0 +1,10 @@ +/* + * jQuery Easing Compatibility v1 - http://gsgd.co.uk/sandbox/jquery.easing.php + * + * Adds compatibility for applications that use the pre 1.2 easing names + * + * Copyright (c) 2007 George Smith + * Licensed under the MIT License: + * http://www.opensource.org/licenses/mit-license.php + */ +eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('0.C(0.1,{7:2(x,t,b,c,d){3 0.1.D(x,t,b,c,d)},5:2(x,t,b,c,d){3 0.1.6(x,t,b,c,d)},h:2(x,t,b,c,d){3 0.1.B(x,t,b,c,d)},A:2(x,t,b,c,d){3 0.1.m(x,t,b,c,d)},y:2(x,t,b,c,d){3 0.1.w(x,t,b,c,d)},v:2(x,t,b,c,d){3 0.1.u(x,t,b,c,d)},s:2(x,t,b,c,d){3 0.1.r(x,t,b,c,d)},q:2(x,t,b,c,d){3 0.1.p(x,t,b,c,d)},o:2(x,t,b,c,d){3 0.1.n(x,t,b,c,d)},8:2(x,t,b,c,d){3 0.1.l(x,t,b,c,d)},g:2(x,t,b,c,d){3 0.1.j(x,t,b,c,d)},i:2(x,t,b,c,d){3 0.1.k(x,t,b,c,d)},z:2(x,t,b,c,d){3 0.1.f(x,t,b,c,d)},e:2(x,t,b,c,d){3 0.1.a(x,t,b,c,d)},9:2(x,t,b,c,d){3 0.1.4(x,t,b,c,d)}});',40,40,'jQuery|easing|function|return|easeInOutBack|easeOut|easeOutQuad|easeIn|elasin|backinout|easeOutBack||||backout|easeInBack|elasout|easeInOut|elasinout|easeOutElastic|easeInOutElastic|easeInElastic|easeInExpo|easeInOutBounce|bounceinout|easeOutBounce|bounceout|easeInBounce|bouncein||easeInOutExpo|expoinout|easeOutExpo||expoout|backin|expoin|easeInOutQuad|extend|easeInQuad'.split('|'),0,{})) \ No newline at end of file Added: XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-easing.1.2.js =================================================================== --- XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-easing.1.2.js (rev 0) +++ XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-easing.1.2.js 2012-02-15 13:10:42 UTC (rev 8992) @@ -0,0 +1,140 @@ +/* + * jQuery EasIng v1.1.2 - http://gsgd.co.uk/sandbox/jquery.easIng.php + * + * Uses the built In easIng capabilities added In jQuery 1.1 + * to offer multiple easIng options + * + * Copyright (c) 2007 George Smith + * Licensed under the MIT License: + * http://www.opensource.org/licenses/mit-license.php + */ + +// t: current time, b: begInnIng value, c: change In value, d: duration + +jQuery.extend( jQuery.easing, +{ + easeInQuad: function (x, t, b, c, d) { + return c*(t/=d)*t + b; + }, + easeOutQuad: function (x, t, b, c, d) { + return -c *(t/=d)*(t-2) + b; + }, + easeInOutQuad: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t + b; + return -c/2 * ((--t)*(t-2) - 1) + b; + }, + easeInCubic: function (x, t, b, c, d) { + return c*(t/=d)*t*t + b; + }, + easeOutCubic: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t + 1) + b; + }, + easeInOutCubic: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t + b; + return c/2*((t-=2)*t*t + 2) + b; + }, + easeInQuart: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t + b; + }, + easeOutQuart: function (x, t, b, c, d) { + return -c * ((t=t/d-1)*t*t*t - 1) + b; + }, + easeInOutQuart: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t + b; + return -c/2 * ((t-=2)*t*t*t - 2) + b; + }, + easeInQuint: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t*t + b; + }, + easeOutQuint: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t*t*t + 1) + b; + }, + easeInOutQuint: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; + return c/2*((t-=2)*t*t*t*t + 2) + b; + }, + easeInSine: function (x, t, b, c, d) { + return -c * Math.cos(t/d * (Math.PI/2)) + c + b; + }, + easeOutSine: function (x, t, b, c, d) { + return c * Math.sin(t/d * (Math.PI/2)) + b; + }, + easeInOutSine: function (x, t, b, c, d) { + return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; + }, + easeInExpo: function (x, t, b, c, d) { + return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; + }, + easeOutExpo: function (x, t, b, c, d) { + return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; + }, + easeInOutExpo: function (x, t, b, c, d) { + if (t==0) return b; + if (t==d) return b+c; + if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; + return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; + }, + easeInCirc: function (x, t, b, c, d) { + return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; + }, + easeOutCirc: function (x, t, b, c, d) { + return c * Math.sqrt(1 - (t=t/d-1)*t) + b; + }, + easeInOutCirc: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; + return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; + }, + easeInElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + }, + easeOutElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; + }, + easeInOutElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; + }, + easeInBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*(t/=d)*t*((s+1)*t - s) + b; + }, + easeOutBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; + }, + easeInOutBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; + return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; + }, + easeInBounce: function (x, t, b, c, d) { + return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; + }, + easeOutBounce: function (x, t, b, c, d) { + if ((t/=d) < (1/2.75)) { + return c*(7.5625*t*t) + b; + } else if (t < (2/2.75)) { + return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; + } else if (t < (2.5/2.75)) { + return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; + } else { + return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; + } + }, + easeInOutBounce: function (x, t, b, c, d) { + if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; + return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; + } +}); \ No newline at end of file Added: XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-easing.1.2.pack.js =================================================================== --- XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-easing.1.2.pack.js (rev 0) +++ XoopsModules/slidernews/releases/1.01/slidernews/include/jquery-easing.1.2.pack.js 2012-02-15 13:10:42 UTC (rev 8992) @@ -0,0 +1,11 @@ +/* + * jQuery EasIng v1.1.2 - http://gsgd.co.uk/sandbox/jquery.easIng.php + * + * Uses the built In easIng capabilities added In jQuery 1.1 + * to offer multiple easIng options + * + * Copyright (c) 2007 George Smith + * Licensed under the MIT License: + * http://www.opensource.org/licenses/mit-license.php + */ +eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('l.Y(l.n,{15:9(x,t,b,c,d){6 c*(t/=d)*t+b},V:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},U:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},17:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},P:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},O:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},13:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},S:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},18:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},G:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},B:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},M:9(x,t,b,c,d){6-c*8.A(t/d*(8.g/2))+c+b},C:9(x,t,b,c,d){6 c*8.m(t/d*(8.g/2))+b},D:9(x,t,b,c,d){6-c/2*(8.A(8.g*t/d)-1)+b},16:9(x,t,b,c,d){6(t==0)?b:c*8.h(2,10*(t/d-1))+b},E:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.h(2,-10*t/d)+1)+b},F:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.h(2,10*(t-1))+b;6 c/2*(-8.h(2,-10*--t)+2)+b},I:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},12:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},11:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},K:9(x,t,b,c,d){f s=1.j;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.r(c)){a=c;f s=p/4}k f s=p/(2*8.g)*8.u(c/a);6-(a*8.h(2,10*(t-=1))*8.m((t*d-s)*(2*8.g)/p))+b},X:9(x,t,b,c,d){f s=1.j;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.r(c)){a=c;f s=p/4}k f s=p/(2*8.g)*8.u(c/a);6 a*8.h(2,-10*t)*8.m((t*d-s)*(2*8.g)/p)+c+b},N:9(x,t,b,c,d){f s=1.j;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.r(c)){a=c;f s=p/4}k f s=p/(2*8.g)*8.u(c/a);e(t<1)6-.5*(a*8.h(2,10*(t-=1))*8.m((t*d-s)*(2*8.g)/p))+b;6 a*8.h(2,-10*(t-=1))*8.m((t*d-s)*(2*8.g)/p)*.5+c+b},Z:9(x,t,b,c,d,s){e(s==w)s=1.j;6 c*(t/=d)*t*((s+1)*t-s)+b},14:9(x,t,b,c,d,s){e(s==w)s=1.j;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},H:9(x,t,b,c,d,s){e(s==w)s=1.j;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.y))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.y))+1)*t+s)+2)+b},z:9(x,t,b,c,d){6 c-l.n.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.i)){6 c*(7.q*t*t)+b}k e(t<(2/2.i)){6 c*(7.q*(t-=(1.5/2.i))*t+.i)+b}k e(t<(2.5/2.i)){6 c*(7.q*(t-=(2.J/2.i))*t+.L)+b}k{6 c*(7.q*(t-=(2.Q/2.i))*t+.T)+b}},W:9(x,t,b,c,d){e(t<d/2)6 l.n.z(x,t*2,0,c,d)*.5+b;6 l.n.v(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,71,'||||||return||Math|function|||||if|var|PI|pow|75|70158|else|jQuery|sin|easing|sqrt||5625|abs|||asin|easeOutBounce|undefined||525|easeInBounce|cos|easeInOutQuint|easeOutSine|easeInOutSine|easeOutExpo|easeInOutExpo|easeOutQuint|easeInOutBack|easeInCirc|25|easeInElastic|9375|easeInSine|easeInOutElastic|easeInQuart|easeOutCubic|625|easeInOutCubic|easeInOutQuart|984375|easeInOutQuad|easeOutQuad|easeInOutBounce|easeOutElastic|extend|easeInBack||easeInOutCirc|easeOutCirc|easeOutQuart|easeOutBack|easeInQuad|easeInExpo|easeInCubic|easeInQuint'.split('|'),0,{})) \ No newline at end of file Added: XoopsModules/slidernews/releases/1.01/slidernews/index.php =================================================================== --- XoopsModules/slidernews/releases/1.01/slidernews/index.php (rev 0) +++ XoopsModules/slidernews/releases/1.01/slidernews/index.php 2012-02-15 13:10:42 UTC (rev 8992) @@ -0,0 +1,52 @@ +<?php +// +// Author: timgno +// WebSite: http://mcdirectory.netsons.org/txmod/ +// +// inclusione intestazione +include('header.php'); +global $xoopsTpl, $xoTheme, $xoopsDB; +// dichiarazione template principale (prima di includere path con il file header.php) +$xoopsOption['template_main'] = 'slidernews.html'; + +// inclusione dell'intestazione della pagina (header file) +include(XOOPS_ROOT_PATH.'/header.php'); + +include_once XOOPS_ROOT_PATH . '/class/xoopstopic.php'; + +/* MODULES NEWS SEARCH - START MOD */ +/* +$i = 0; +$newsmodule = array("news"); + +if (SearchModule($newsmodule[$i])) +{ + $sql = "SELECT * FROM ".$xoopsDB->prefix('stories')." WHERE storyid > 0 ORDER BY ASC"; + $result = $xoopsDB->query($sql); + $rownews = array(); + while($myrow = $xoopsDB->fetchArray($result)) + { + $rownews['nid'] = $myrow['storyid']; + $rownews['title'] = $myrow['title']; + $rownews['description'] = $myrow['description']; + $xoopsTpl->append('rownews', $rownews); + } +} +else +{ + $xoopsTpl->assign('empty_news', _MD_SLIDERNEWS_NONEWS); +} +unset ($newsmodule, $i); */ + +//$xoTheme->addStylesheet('modules/slidernews/include/slidernews.css'); +//$xoTheme->addScript('include/jquery-1.2.1.pack.js'); +//$xoTheme->addScript('include/jquery-easing.1.2.pack.js'); +//$xoTheme->addScript('include/jquery-easing-compatibility.1.2.pack.js'); +//$xoTheme->addScript('include/coda-slider.1.1.1.pack.js'); + +//$xoopsTpl->assign('base', array('slogan' => 'My first module<br />Il mio primo modulo')); + +// inclusione del footer +include(XOOPS_ROOT_PATH.'/footer.php'); + +?> \ No newline at end of file Added: XoopsModules/slidernews/releases/1.01/slidernews/style/slidernews.css =================================================================== --- XoopsModules/slidernews/releases/1.01/slidernews/style/slidernews.css (rev 0) +++ XoopsModules/slidernews/releases/1.01/slidernews/style/slidernews.css 2012-02-15 13:10:42 UTC (rev 8992) @@ -0,0 +1,151 @@ +/* base modules by timgno + http://mcdirectory.netsons.org/txmod/ + */ +* { margin: 0; padding: 0 } + /* I've used a hard CSS reset above, but you should consider a more sophisticated reset, such as this one: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ */ + + p { text-align: left; margin: 15px 0 } + + p, ul { font-size: 13px; line-height: 1.4em } + + p a, li a { color: #39c; text-decoration: none } + + p.intro { border-bottom: 1px solid #ccc; margin-bottom: 20px; padding: 20px 0 30px 0; text-align: center; width: 100% } + + p#cross-links { text-align: center } + + p#cross-links { border-bottom: 1px solid #ccc; margin-bottom: 30px; padding-bottom: 30px } + + noscript p, noscript ol { color: #a00; font-size: 13px; line-height: 1.4em; text-align: left } + noscript a { color: #a00; text-decoration: underline } + noscript ol { margin-left: 25px; } + + a:focus { outline:none } + + img { border: 0 } + + h3 { border-bottom: 1px solid silver; margin-bottom: 5px; padding-bottom: 3px; text-align: left } + + body { + font-family: Verdana, Arial; + background: #ebebeb url("images/body-bg.png") repeat-y center; + color: #000; + width: 800px; + margin: auto; + text-align: center; + padding-bottom: 20px; + } + + .stripViewer .panelContainer .panel ul { + text-align: left; + margin: 0 15px 0 30px; + } + + .slider-wrap { /* This div isn't entirely necessary but good for getting the side arrows vertically centered */ + margin: 20px 0; + position: relative; + width: 100%; + } + + /* These 2 lines specify style applied while slider is loa... [truncated message content] |
From: <txm...@us...> - 2012-02-15 13:17:15
|
Revision: 8993 http://xoops.svn.sourceforge.net/xoops/?rev=8993&view=rev Author: txmodxoops Date: 2012-02-15 13:17:00 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Module testadsl v1.00, v1.01 Added Paths: ----------- XoopsModules/testadsl/ XoopsModules/testadsl/branches/ XoopsModules/testadsl/releases/ XoopsModules/testadsl/releases/1.00/ XoopsModules/testadsl/releases/1.00/testadsl/ XoopsModules/testadsl/releases/1.00/testadsl/admin/ XoopsModules/testadsl/releases/1.00/testadsl/admin/about.php XoopsModules/testadsl/releases/1.00/testadsl/admin/admin_footer.php XoopsModules/testadsl/releases/1.00/testadsl/admin/admin_header.php XoopsModules/testadsl/releases/1.00/testadsl/admin/index.html XoopsModules/testadsl/releases/1.00/testadsl/admin/index.php XoopsModules/testadsl/releases/1.00/testadsl/admin/menu.php XoopsModules/testadsl/releases/1.00/testadsl/blocks/ XoopsModules/testadsl/releases/1.00/testadsl/blocks/index.html XoopsModules/testadsl/releases/1.00/testadsl/class/ XoopsModules/testadsl/releases/1.00/testadsl/class/index.html XoopsModules/testadsl/releases/1.00/testadsl/class/menu.php XoopsModules/testadsl/releases/1.00/testadsl/class/object.php XoopsModules/testadsl/releases/1.00/testadsl/images/ XoopsModules/testadsl/releases/1.00/testadsl/images/deco/ XoopsModules/testadsl/releases/1.00/testadsl/images/deco/about.png XoopsModules/testadsl/releases/1.00/testadsl/images/deco/arrow.gif XoopsModules/testadsl/releases/1.00/testadsl/images/deco/delete.gif XoopsModules/testadsl/releases/1.00/testadsl/images/deco/edit.gif XoopsModules/testadsl/releases/1.00/testadsl/images/deco/index.html XoopsModules/testadsl/releases/1.00/testadsl/images/deco/index.png XoopsModules/testadsl/releases/1.00/testadsl/images/deco/off.gif XoopsModules/testadsl/releases/1.00/testadsl/images/deco/on.gif XoopsModules/testadsl/releases/1.00/testadsl/images/deco/permissions.png XoopsModules/testadsl/releases/1.00/testadsl/images/deco/pref.png XoopsModules/testadsl/releases/1.00/testadsl/images/deco/update.png XoopsModules/testadsl/releases/1.00/testadsl/images/index.html XoopsModules/testadsl/releases/1.00/testadsl/images/menu/ XoopsModules/testadsl/releases/1.00/testadsl/images/menu/bg.png XoopsModules/testadsl/releases/1.00/testadsl/images/menu/index.html XoopsModules/testadsl/releases/1.00/testadsl/images/menu/left_both.png XoopsModules/testadsl/releases/1.00/testadsl/images/menu/right_both.png XoopsModules/testadsl/releases/1.00/testadsl/images/testadsl_slogo.png XoopsModules/testadsl/releases/1.00/testadsl/images/txmod_logo.png XoopsModules/testadsl/releases/1.00/testadsl/include/ XoopsModules/testadsl/releases/1.00/testadsl/include/functions.php XoopsModules/testadsl/releases/1.00/testadsl/include/index.html XoopsModules/testadsl/releases/1.00/testadsl/include/install.php XoopsModules/testadsl/releases/1.00/testadsl/index.php XoopsModules/testadsl/releases/1.00/testadsl/language/ XoopsModules/testadsl/releases/1.00/testadsl/language/english/ XoopsModules/testadsl/releases/1.00/testadsl/language/english/admin.php XoopsModules/testadsl/releases/1.00/testadsl/language/english/blocks.php XoopsModules/testadsl/releases/1.00/testadsl/language/english/index.html XoopsModules/testadsl/releases/1.00/testadsl/language/english/main.php XoopsModules/testadsl/releases/1.00/testadsl/language/english/modinfo.php XoopsModules/testadsl/releases/1.00/testadsl/language/french/ XoopsModules/testadsl/releases/1.00/testadsl/language/french/admin.php XoopsModules/testadsl/releases/1.00/testadsl/language/french/blocks.php XoopsModules/testadsl/releases/1.00/testadsl/language/french/index.html XoopsModules/testadsl/releases/1.00/testadsl/language/french/main.php XoopsModules/testadsl/releases/1.00/testadsl/language/french/modinfo.php XoopsModules/testadsl/releases/1.00/testadsl/language/index.html XoopsModules/testadsl/releases/1.00/testadsl/language/italian/ XoopsModules/testadsl/releases/1.00/testadsl/language/italian/admin.php XoopsModules/testadsl/releases/1.00/testadsl/language/italian/blocks.php XoopsModules/testadsl/releases/1.00/testadsl/language/italian/index.html XoopsModules/testadsl/releases/1.00/testadsl/language/italian/main.php XoopsModules/testadsl/releases/1.00/testadsl/language/italian/modinfo.php XoopsModules/testadsl/releases/1.00/testadsl/sql/ XoopsModules/testadsl/releases/1.00/testadsl/sql/index.html XoopsModules/testadsl/releases/1.00/testadsl/templates/ XoopsModules/testadsl/releases/1.00/testadsl/templates/blocks/ XoopsModules/testadsl/releases/1.00/testadsl/templates/blocks/index.html XoopsModules/testadsl/releases/1.00/testadsl/templates/index.html XoopsModules/testadsl/releases/1.00/testadsl/xoops_version.php XoopsModules/testadsl/releases/1.01/ XoopsModules/testadsl/releases/1.01/testadsl/ XoopsModules/testadsl/releases/1.01/testadsl/admin/ XoopsModules/testadsl/releases/1.01/testadsl/admin/about.php XoopsModules/testadsl/releases/1.01/testadsl/admin/admin_footer.php XoopsModules/testadsl/releases/1.01/testadsl/admin/admin_header.php XoopsModules/testadsl/releases/1.01/testadsl/admin/index.html XoopsModules/testadsl/releases/1.01/testadsl/admin/index.php XoopsModules/testadsl/releases/1.01/testadsl/admin/menu.php XoopsModules/testadsl/releases/1.01/testadsl/blocks/ XoopsModules/testadsl/releases/1.01/testadsl/blocks/index.html XoopsModules/testadsl/releases/1.01/testadsl/class/ XoopsModules/testadsl/releases/1.01/testadsl/class/index.html XoopsModules/testadsl/releases/1.01/testadsl/class/menu.php XoopsModules/testadsl/releases/1.01/testadsl/class/object.php XoopsModules/testadsl/releases/1.01/testadsl/images/ XoopsModules/testadsl/releases/1.01/testadsl/images/deco/ XoopsModules/testadsl/releases/1.01/testadsl/images/deco/about.png XoopsModules/testadsl/releases/1.01/testadsl/images/deco/arrow.gif XoopsModules/testadsl/releases/1.01/testadsl/images/deco/delete.gif XoopsModules/testadsl/releases/1.01/testadsl/images/deco/edit.gif XoopsModules/testadsl/releases/1.01/testadsl/images/deco/index.html XoopsModules/testadsl/releases/1.01/testadsl/images/deco/index.png XoopsModules/testadsl/releases/1.01/testadsl/images/deco/off.gif XoopsModules/testadsl/releases/1.01/testadsl/images/deco/on.gif XoopsModules/testadsl/releases/1.01/testadsl/images/deco/permissions.png XoopsModules/testadsl/releases/1.01/testadsl/images/deco/pref.png XoopsModules/testadsl/releases/1.01/testadsl/images/deco/update.png XoopsModules/testadsl/releases/1.01/testadsl/images/index.html XoopsModules/testadsl/releases/1.01/testadsl/images/menu/ XoopsModules/testadsl/releases/1.01/testadsl/images/menu/bg.png XoopsModules/testadsl/releases/1.01/testadsl/images/menu/index.html XoopsModules/testadsl/releases/1.01/testadsl/images/menu/left_both.png XoopsModules/testadsl/releases/1.01/testadsl/images/menu/right_both.png XoopsModules/testadsl/releases/1.01/testadsl/images/testadsl_logo.gif XoopsModules/testadsl/releases/1.01/testadsl/images/testadsl_slogo.png XoopsModules/testadsl/releases/1.01/testadsl/images/txmod_logo.png XoopsModules/testadsl/releases/1.01/testadsl/include/ XoopsModules/testadsl/releases/1.01/testadsl/include/functions.php XoopsModules/testadsl/releases/1.01/testadsl/include/index.html XoopsModules/testadsl/releases/1.01/testadsl/include/install.php XoopsModules/testadsl/releases/1.01/testadsl/index.php XoopsModules/testadsl/releases/1.01/testadsl/language/ XoopsModules/testadsl/releases/1.01/testadsl/language/english/ XoopsModules/testadsl/releases/1.01/testadsl/language/english/admin.php XoopsModules/testadsl/releases/1.01/testadsl/language/english/blocks.php XoopsModules/testadsl/releases/1.01/testadsl/language/english/index.html XoopsModules/testadsl/releases/1.01/testadsl/language/english/main.php XoopsModules/testadsl/releases/1.01/testadsl/language/english/modinfo.php XoopsModules/testadsl/releases/1.01/testadsl/language/french/ XoopsModules/testadsl/releases/1.01/testadsl/language/french/admin.php XoopsModules/testadsl/releases/1.01/testadsl/language/french/blocks.php XoopsModules/testadsl/releases/1.01/testadsl/language/french/index.html XoopsModules/testadsl/releases/1.01/testadsl/language/french/main.php XoopsModules/testadsl/releases/1.01/testadsl/language/french/modinfo.php XoopsModules/testadsl/releases/1.01/testadsl/language/index.html XoopsModules/testadsl/releases/1.01/testadsl/language/italian/ XoopsModules/testadsl/releases/1.01/testadsl/language/italian/admin.php XoopsModules/testadsl/releases/1.01/testadsl/language/italian/blocks.php XoopsModules/testadsl/releases/1.01/testadsl/language/italian/index.html XoopsModules/testadsl/releases/1.01/testadsl/language/italian/main.php XoopsModules/testadsl/releases/1.01/testadsl/language/italian/modinfo.php XoopsModules/testadsl/releases/1.01/testadsl/speedtest/ XoopsModules/testadsl/releases/1.01/testadsl/speedtest/index.html XoopsModules/testadsl/releases/1.01/testadsl/speedtest/latency.txt XoopsModules/testadsl/releases/1.01/testadsl/speedtest/upload.asp XoopsModules/testadsl/releases/1.01/testadsl/speedtest/upload.aspx XoopsModules/testadsl/releases/1.01/testadsl/speedtest/upload.jsp XoopsModules/testadsl/releases/1.01/testadsl/speedtest/upload.php XoopsModules/testadsl/releases/1.01/testadsl/sql/ XoopsModules/testadsl/releases/1.01/testadsl/sql/index.html XoopsModules/testadsl/releases/1.01/testadsl/templates/ XoopsModules/testadsl/releases/1.01/testadsl/templates/blocks/ XoopsModules/testadsl/releases/1.01/testadsl/templates/blocks/index.html XoopsModules/testadsl/releases/1.01/testadsl/templates/index.html XoopsModules/testadsl/releases/1.01/testadsl/templates/testadsl_index.html XoopsModules/testadsl/releases/1.01/testadsl/xoops_version.php XoopsModules/testadsl/trunk/ Added: XoopsModules/testadsl/releases/1.00/testadsl/admin/about.php =================================================================== --- XoopsModules/testadsl/releases/1.00/testadsl/admin/about.php (rev 0) +++ XoopsModules/testadsl/releases/1.00/testadsl/admin/about.php 2012-02-15 13:17:00 UTC (rev 8993) @@ -0,0 +1,116 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * testadsl - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://www.txmod.netsons.org) + * + * 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://www.txmod.netsons.org) + * @license GNU GPL + * @package testadsl + * @author timgno () + * + * Version : 1.00: + * **************************************************************************** + */ + +include_once("admin_header.php"); + +xoops_cp_header(); + +if ( !is_readable(XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php")) { +testadsl_adminmenu(1, _AM_TESTADSL_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 (1, _AM_TESTADSL_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_TESTADSL_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_TESTADSL_ABOUT_RELEASEDATE.":</label><text>".$versioninfo->getInfo("release")."</text><br /> + <label>"._AM_TESTADSL_ABOUT_AUTHOR.":</label><text>".$versioninfo->getInfo("author")."</text><br /> + <label>"._AM_TESTADSL_ABOUT_CREDITS.":</label><text>".$versioninfo->getInfo("credits")."</text><br /> + <label>"._AM_TESTADSL_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_TESTADSL_ABOUT_MODULE_INFO."</legend> + <div style=\"padding: 8px;\"> + <label>"._AM_TESTADSL_ABOUT_MODULE_STATUS.":</label><text>".$versioninfo->getInfo("module_status")."</text><br /> + <label>"._AM_TESTADSL_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_TESTADSL_ABOUT_AUTHOR_INFO."</legend> + <div style=\"padding: 8px;\"> + <label>"._AM_TESTADSL_ABOUT_AUTHOR_NAME.":</label><text>".$versioninfo->getInfo("author")."</text><br /> + <label>"._AM_TESTADSL_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_TESTADSL_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/testadsl/releases/1.00/testadsl/admin/admin_footer.php =================================================================== --- XoopsModules/testadsl/releases/1.00/testadsl/admin/admin_footer.php (rev 0) +++ XoopsModules/testadsl/releases/1.00/testadsl/admin/admin_footer.php 2012-02-15 13:17:00 UTC (rev 8993) @@ -0,0 +1,29 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * testadsl - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://www.txmod.netsons.org) + * + * 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://www.txmod.netsons.org) + * @license GNU GPL + * @package testadsl + * @author timgno () + * + * Version : 1.00: + * **************************************************************************** + */ + +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/testadsl/releases/1.00/testadsl/admin/admin_header.php =================================================================== --- XoopsModules/testadsl/releases/1.00/testadsl/admin/admin_header.php (rev 0) +++ XoopsModules/testadsl/releases/1.00/testadsl/admin/admin_header.php 2012-02-15 13:17:00 UTC (rev 8993) @@ -0,0 +1,107 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * testadsl - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://www.txmod.netsons.org) + * + * 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://www.txmod.netsons.org) + * @license GNU GPL + * @package testadsl + * @author timgno () + * + * 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(); + +if ( $xoopsUser ) { + $xoopsModule = XoopsModule::getByDirname("testadsl"); + 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 testadsl_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/testadsl/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/testadsl/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/testadsl/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_TESTADSL_GENERALSET</a> + | <a href=\"".XOOPS_URL."/modules/testadsl/index.php\">_AM_TESTADSL_GOINDEX</a> + | <a href=\"".XOOPS_URL."/modules/testadsl/admin/upgrade.php\">_AM_TESTADSL_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/testadsl/admin/index.php\"><span>_MI_TESTADSL_MANAGER_INDEX</span></a></li> + + <li id=\"$tblColors[1]\"><a href=\"".XOOPS_URL."/modules/testadsl/admin/permissions.php\"><span>_MI_TESTADSL_MANAGER_PERMISSIONS</span></a></li> + <li id=\"$tblColors[2]\"><a href=\"".XOOPS_URL."/modules/testadsl/admin/about.php\"><span>_MI_TESTADSL_MANAGER_ABOUT</span></a></li> + </ul></div>"; +} + + +?> \ No newline at end of file Added: XoopsModules/testadsl/releases/1.00/testadsl/admin/index.html =================================================================== --- XoopsModules/testadsl/releases/1.00/testadsl/admin/index.html (rev 0) +++ XoopsModules/testadsl/releases/1.00/testadsl/admin/index.html 2012-02-15 13:17:00 UTC (rev 8993) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/testadsl/releases/1.00/testadsl/admin/index.php =================================================================== --- XoopsModules/testadsl/releases/1.00/testadsl/admin/index.php (rev 0) +++ XoopsModules/testadsl/releases/1.00/testadsl/admin/index.php 2012-02-15 13:17:00 UTC (rev 8993) @@ -0,0 +1,64 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * testadsl - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://www.txmod.netsons.org) + * + * 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://www.txmod.netsons.org) + * @license GNU GPL + * @package testadsl + * @author timgno () + * + * Version : 1.00: + * **************************************************************************** + */ + +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")) { +testadsl_adminmenu(0, _AM_TESTADSL_MANAGER_INDEX); +} else { +include_once XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php"; +loadModuleAdminMenu (0, _AM_TESTADSL_MANAGER_INDEX); +} + +include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->dirname()."/class/menu.php"; + + $menu = new testadslMenu(); + + $menu->addItem("update", "../../system/admin.php?fct=modulesadmin&op=update&module=testadsl", "../images/deco/update.png", _AM_TESTADSL_MANAGER_UPDATE); + $menu->addItem("permissions", "permissions.php", "../images/deco/permissions.png", _AM_TESTADSL_MANAGER_PERMISSIONS); + $menu->addItem("preference", "../../system/admin.php?fct=preferences&op=showmod&mod=".$xoopsModule->getVar("mid"). + "&&confcat_id=1", "../images/deco/pref.png", _AM_TESTADSL_MANAGER_PREFERENCES); + $menu->addItem("about", "about.php", "../images/deco/about.png", _AM_TESTADSL_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_TESTADSL_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 "</td> + </tr> + </table>"; +include_once("admin_footer.php"); +xoops_cp_footer(); + +?> \ No newline at end of file Added: XoopsModules/testadsl/releases/1.00/testadsl/admin/menu.php =================================================================== --- XoopsModules/testadsl/releases/1.00/testadsl/admin/menu.php (rev 0) +++ XoopsModules/testadsl/releases/1.00/testadsl/admin/menu.php 2012-02-15 13:17:00 UTC (rev 8993) @@ -0,0 +1,34 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * testadsl - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://www.txmod.netsons.org) + * + * 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://www.txmod.netsons.org) + * @license GNU GPL + * @package testadsl + * @author timgno () + * + * Version : 1.00: + * **************************************************************************** + */ + +$adminmenu = array(); +$adminmenu[0]["title"] = _MI_TESTADSL_MANAGER_INDEX; +$adminmenu[0]["link"] = "admin/index.php"; +$adminmenu[1]["title"] = _MI_TESTADSL_MANAGER_PERMISSIONS; +$adminmenu[1]["link"] = "admin/permissions.php"; + +$adminmenu[2]["title"] = _MI_TESTADSL_MANAGER_ABOUT; +$adminmenu[2]["link"] = "admin/about.php"; + +?> \ No newline at end of file Added: XoopsModules/testadsl/releases/1.00/testadsl/blocks/index.html =================================================================== --- XoopsModules/testadsl/releases/1.00/testadsl/blocks/index.html (rev 0) +++ XoopsModules/testadsl/releases/1.00/testadsl/blocks/index.html 2012-02-15 13:17:00 UTC (rev 8993) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/testadsl/releases/1.00/testadsl/class/index.html =================================================================== --- XoopsModules/testadsl/releases/1.00/testadsl/class/index.html (rev 0) +++ XoopsModules/testadsl/releases/1.00/testadsl/class/index.html 2012-02-15 13:17:00 UTC (rev 8993) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/testadsl/releases/1.00/testadsl/class/menu.php =================================================================== --- XoopsModules/testadsl/releases/1.00/testadsl/class/menu.php (rev 0) +++ XoopsModules/testadsl/releases/1.00/testadsl/class/menu.php 2012-02-15 13:17:00 UTC (rev 8993) @@ -0,0 +1,176 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * testadsl - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://www.txmod.netsons.org) + * + * 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://www.txmod.netsons.org) + * @license GNU GPL + * @package testadsl + * @author timgno () + * + * Version : 1.00: + * **************************************************************************** + */ + +class testadslMenu +{ + public $Width = 100; + public $Height = 100; + public $BgColor = "transparent"; + public $OverBgColor = "#FFF6C1"; + public $BorderWidth = 1; + public $BorderColor = "#CCCCCC"; + public $OverBorderColor = "#FF9900"; + public $BorderStyle = "solid"; + public $OverBorderStyle = "solid"; + public $Font = "Tahoma, Arial, Helvetica"; + public $FontColor = "#666666"; + public $OverFontColor = "#1E90FF"; + public $FontDeco = "none"; + public $OverFontDeco = "none"; + public $FontSize = 11; + public $FontWeight = "bold"; + public $FontExtra = "Tahoma, Arial, Helvetica"; + public $FontExtraColor = "#A98952"; + public $OverFontExtraColor = "#0033FF"; + public $FontExtraDeco = "underline"; + public $OverFontExtraDeco = "underline"; + public $FontExtraSize = 9; + public $FontExtraWeight = "normal"; + public $TextAlign = "center"; + private $_items = array(); + + public function addItem($id, $link="", $icon="", $name="", $extra="", $alt=""){ + if (isset($this->_items[$id])) return false; + $rtn["link"] = $link; + $rtn["icon"] = $icon; + $rtn["name"] = $name; + $rtn["extra"] = $extra; + $rtn["alt"] = $alt; + $this->_items[$id] = $rtn; + return true; + } + + public function setLink($id, $link){ + if (isset($this->_items[$id])){ + $this->_items[$id]["link"] = $link; + return true; + } else { + return false; + } + } + + public function setIcon($id, $icon){ + if (isset($this->_items[$id])){ + $this->_items[$id]["icon"] = $icon; + return true; + } else { + return false; + } + } + + public function setName($id, $name){ + if (isset($this->_items[$id])){ + $this->_items[$id]["name"] = $name; + return true; + } else { + return false; + } + } + + public function setExtra($id, $extra){ + if (isset($this->_items[$id])){ + $this->_items[$id]["extra"] = $extra; + return true; + } else { + return false; + } + } + + public function setAlt($id, $alt){ + if (isset($this->_items[$id])){ + $this->_items[$id]["alt"] = $alt; + return true; + } else { + return false; + } + } + + public function getCSS($ws = true){ + if ($ws) $csscode = "<style type=\"text/css\">\n<!--"; + $csscode .= "div.rmmenuicon{ + margin: 3px; + font-family: $this->Font; + text-align: ".$this->TextAlign."; + } + div.rmmenuicon a { + display: block; float: left; + height: ".$this->Height."px !important; + height: ".$this->Height."px; + width: ".$this->Width."px !important; + width: ".$this->Width."px; + vertical-align: middle; + text-decoration : none; + border: ".$this->BorderWidth."px $this->BorderStyle $this->BorderColor; + padding: 2px 5px 1px 5px; + margin: 3px; + color: $this->FontColor; + } + div.rmmenuicon img { margin-top: 8px; margin-bottom: 8px; } + div.rmmenuicon a span { + font-size: ".$this->FontSize."px; + font-weight: $this->FontWeight; + display: block; + } + div.rmmenuicon a span.uno{ + font-size: ".$this->FontExtraSize."px; + font-weight: $this->FontExtraWeight; + text-decoration: $this->FontExtraDeco; + color: $this->FontExtraColor; + } + div.rmmenuicon a:hover{ + background-color: $this->OverBgColor; + border: ".$this->BorderWidth."px $this->BorderStyle $this->OverBorderColor; + color: $this->OverFontColor; + } + div.rmmenuicon a:hover span{ + text-decoration: $this->OverFontDeco; + } + div.rmmenuicon a:hover span.uno{ + text-decoration: $this->OverFontExtraDeco; + color: $this->OverFontExtraColor; + }"; + if ($ws) $csscode .= "\n-->\n</style>"; + return $csscode; + } + + public function render(){ + + $ret = "<div class=\"rmmenuicon\">"; + foreach ($this->_items as $k => $v){ + $ret .= "<a href=\"".$v["link"]."\" title=\"".($v["alt"]!="" ? $v["alt"] : $v["name"])."\">".($v["icon"]!="" ? "<img src=\"".$v["icon"]."\" alt=\"".$v["name"]."\" /> " : ""); + if ($v["name"] != "") $ret .= "<span>".$v["name"]."</span>"; + if ($v["extra"] != "") $ret .= "<span class=\"uno\">".$v["extra"]."</span>"; + if ($v["extra"] != "") $ret .= "<span class=\"uno\">".$v["extra"]."</span>"; + $ret .= "</a>"; + } + $ret .= "</div><div style=\"clear: both;\"></div>"; + return $ret; + } + + public function display(){ + echo $this->render(); + } +} + +?> \ No newline at end of file Added: XoopsModules/testadsl/releases/1.00/testadsl/class/object.php =================================================================== --- XoopsModules/testadsl/releases/1.00/testadsl/class/object.php (rev 0) +++ XoopsModules/testadsl/releases/1.00/testadsl/class/object.php 2012-02-15 13:17:00 UTC (rev 8993) @@ -0,0 +1,412 @@ +<?php +/** + * **************************************************************************** + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * + * Cette licence, contient des limitations!!! + * + * 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. + * + * @license TDM GPL license + * @author TDM TEAM DEV MODULE + * + * **************************************************************************** + */ + +class XoopsPersistableObjectHandler extends XoopsObjectHandler{ + + /** + * Information about the class, the handler is managing + * + * @var string + */ + var $table; + var $keyName; + var $className; + var $identifierName; + + + /** + * Constructor - called from child classes + * @param object $db {@link XoopsDatabase} object + * @param string $tablename Name of database table + * @param string $classname Name of Class, this handler is managing + * @param string $keyname Name of the property, holding the key + * + * @return void + */ + function XoopsPersistableObjectHandler(&$db, $tablename, $classname, $keyname, $idenfierName = false) { + $this->XoopsObjectHandler($db); + $this->table = $db->prefix($tablename); + $this->keyName = $keyname; + $this->className = $classname; + if ($idenfierName != false) { + $this->identifierName = $idenfierName; + } + } + + /** + * create a new user + * + * @param bool $isNew Flag the new objects as "new"? + * + * @return object + */ + function &create($isNew = true) { + $obj =& new $this->className(); + if ($isNew === true) { + $obj->setNew(); + } + return $obj; + } + + /** + * retrieve an object + * + * @param mixed $id ID of the object - or array of ids for joint keys. Joint keys MUST be given in the same order as in the constructor + * @param bool $as_object whether to return an object or an array + * @return mixed reference to the object, FALSE if failed + */ + function &get($id, $as_object=true) { + if (is_array($this->keyName)) { + $criteria = new CriteriaCompo(); + for ($i = 0; $i < count($this->keyName); $i++) { + $criteria->add(new Criteria($this->keyName[$i], intval($id[$i]))); + } + } else { + $criteria = new Criteria($this->keyName, intval($id)); + } + $criteria->setLimit(1); + $obj_array = $this->getObjects($criteria, false, $as_object); + if (count($obj_array) != 1) { + $obj = $this->create(); + return $obj; + } + return $obj_array[0]; + } + + /** + * retrieve objects from the database + * + * @param object $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the ID as key for the array? + * @param bool $as_object return an array of objects? + * + * @return array + */ + function getObjects($criteria=null, $id_as_key=false, $as_object=true){ + $ret = array(); + $limit = $start = 0; + $sql = 'SELECT * FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->getSort() != '') { + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + return $this->convertResultSet($result, $id_as_key, $as_object); + } + + /** + * Convert a database resultset to a returnable array + * + * @param object $result database resultset + * @param bool $id_as_key - should NOT be used with joint keys + * @param bool $as_object + * + * @return array + */ + function convertResultSet($result, $id_as_key = false, $as_object = true) { + $ret = array(); + while ($myrow = $this->db->fetchArray($result)) { + $obj =& $this->create(false); + $obj->assignVars($myrow); + if (!$id_as_key) { + if ($as_object) { + $ret[] =& $obj; + } else { + $row = array(); + $vars = $obj->getVars(); + foreach (array_keys($vars) as $i) { + $row[$i] = $obj->getVar($i); + } + $ret[] = $row; + } + } else { + if ($as_object) { + $ret[$myrow[$this->keyName]] =& $obj; + } else { + $row = array(); + $vars = $obj->getVars(); + foreach (array_keys($vars) as $i) { + $row[$i] = $obj->getVar($i); + } + $ret[$myrow[$this->keyName]] = $row; + } + } + unset($obj); + } + return $ret; + } + + /** + * Retrieve a list of objects as arrays - DON'T USE WITH JOINT KEYS + * + * @param object $criteria {@link CriteriaElement} conditions to be met + * @param int $limit Max number of objects to fetch + * @param int $start Which record to start at + * + * @return array + */ + function getList($criteria = null, $limit = 0, $start = 0) { + $ret = array(); + if ($criteria == null) { + $criteria = new CriteriaCompo(); + } + + if ($criteria->getSort() == '') { + $criteria->setSort($this->identifierName); + } + + $sql = 'SELECT '.$this->keyName; + if(!empty($this->identifierName)){ + $sql .= ', '.$this->identifierName; + } + $sql .= ' FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->getSort() != '') { + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + $myts =& MyTextSanitizer::getInstance(); + while ($myrow = $this->db->fetchArray($result)) { + //identifiers should be textboxes, so sanitize them like that + $ret[$myrow[$this->keyName]] = empty($this->identifierName)?1:$myts->htmlSpecialChars($myrow[$this->identifierName]); + } + return $ret; + } + + /** + * count objects matching a condition + * + * @param object $criteria {@link CriteriaElement} to match + * @return int count of objects + */ + function getCount($criteria=null){ + $field = ""; + $groupby = false; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + if ($criteria->groupby != "") { + $groupby = true; + $field = $criteria->groupby.", "; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used + } + } + $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->groupby != "") { + $sql .= $criteria->getGroupby(); + } + } + $result = $this->db->query($sql); + if (!$result) { + return 0; + } + if ($groupby == false) { + list($count) = $this->db->fetchRow($result); + return $count; + } else { + $ret = array(); + while (list($id, $count) = $this->db->fetchRow($result)) { + $ret[$id] = $count; + } + return $ret; + } + } + + /** + * delete an object from the database + * + * @param object $obj reference to the object to delete + * @param bool $force + * @return bool FALSE if failed. + */ + function delete(&$obj, $force = false){ + if (is_array($this->keyName)) { + $clause = array(); + for ($i = 0; $i < count($this->keyName); $i++) { + $clause[] = $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]); + } + $whereclause = implode(" AND ", $clause); + } else { + $whereclause = $this->keyName." = ".$obj->getVar($this->keyName); + } + $sql = "DELETE FROM ".$this->table." WHERE ".$whereclause; + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } + + /** + * insert a new object in the database + * + * @param object $obj reference to the object + * @param bool $force whether to force the query execution despite security settings + * @param bool $checkObject check if the object is dirty and clean the attributes + * @return bool FALSE if failed, TRUE if already present and unchanged or successful + */ + + function insert(&$obj, $force=false, $checkObject=true){ + if ($checkObject != false) { + if (!is_object($obj)) { + var_dump($obj); + return false; + } + /** + * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5 + */ + if (!is_a($obj, $this->className)) { + $obj->setErrors(get_class($obj)." Differs from ".$this->className); + return false; + } + if (!$obj->isDirty()) { + $obj->setErrors("Not dirty"); //will usually not be outputted as errors are not displayed when the method returns true, but it can be helpful when troubleshooting code - Mith + return true; + } + } + if (!$obj->cleanVars()) { + return false; + } + + foreach ($obj->cleanVars as $k => $v) { + if ($obj->vars[$k]['data_type'] == XOBJ_DTYPE_INT) { + $cleanvars[$k] = intval($v); + } elseif ( is_array( $v ) ) { + $cleanvars[ $k ] = $this->db->quoteString( implode( ',', $v ) ); + } else { + $cleanvars[$k] = $this->db->quoteString($v); + } + } + if ($obj->isNew()) { + if (!is_array($this->keyName)) { + if ($cleanvars[$this->keyName] < 1) { + $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq'); + } + } + $sql = "INSERT INTO ".$this->table." (".implode(',', array_keys($cleanvars)).") VALUES (".implode(',', array_values($cleanvars)) .")"; + } else { + $sql = "UPDATE ".$this->table." SET"; + foreach ($cleanvars as $key => $value) { + if ((!is_array($this->keyName) && $key == $this->keyName) || (is_array($this->keyName) && in_array($key, $this->keyName))) { + continue; + } + if (isset($notfirst) ) { + $sql .= ","; + } + $sql .= " ".$key." = ".$value; + $notfirst = true; + } + if (is_array($this->keyName)) { + $whereclause = ""; + for ($i = 0; $i < count($this->keyName); $i++) { + if ($i > 0) { + $whereclause .= " AND "; + } + $whereclause .= $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]); + } + } else { + $whereclause = $this->keyName." = ".$obj->getVar($this->keyName); + } + $sql .= " WHERE ".$whereclause; + } + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + if ($obj->isNew() && !is_array($this->keyName)) { + $obj->assignVar($this->keyName, $this->db->getInsertId()); + } + return true; + } + + /** + * Change a value for objects with a certain criteria + * + * @param string $fieldname Name of the field + * @param string $fieldvalue Value to write + * @param object $criteria {@link CriteriaElement} + * @return bool + */ + function updateAll($fieldname, $fieldvalue, $criteria = null, $force = false){ + $set_clause = $fieldname . ' = '; + if ( is_numeric( $fieldvalue ) ) { + $set_clause .= $fieldvalue; + } elseif ( is_array( $fieldvalue ) ) { + $set_clause .= $this->db->quoteString( implode( ',', $fieldvalue ) ); + } else { + $set_clause .= $this->db->quoteString( $fieldvalue ); + } + $sql = 'UPDATE '.$this->table.' SET '.$set_clause; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + } + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } + + /** + * delete all objects meeting the conditions + * + * @param object $criteria {@link CriteriaElement} with conditions to meet + * @return bool + */ + function deleteAll($criteria = null){ + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql = 'DELETE FROM '.$this->table; + $sql .= ' '.$criteria->renderWhere(); + if (!$this->db->queryF($sql)) { + return false; + } + $rows = $this->db->getAffectedRows(); + return $rows > 0 ? $rows : true; + } + return false; + } +} +?> \ No newline at end of file Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/about.png =================================================================== (Binary files differ) Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/about.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/arrow.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/arrow.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/delete.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/delete.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/edit.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/edit.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/index.html =================================================================== --- XoopsModules/testadsl/releases/1.00/testadsl/images/deco/index.html (rev 0) +++ XoopsModules/testadsl/releases/1.00/testadsl/images/deco/index.html 2012-02-15 13:17:00 UTC (rev 8993) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/index.png =================================================================== (Binary files differ) Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/index.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/off.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/off.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/on.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/on.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/permissions.png =================================================================== (Binary files differ) Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/permissions.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/pref.png =================================================================== (Binary files differ) Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/pref.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/update.png =================================================================== (Binary files differ) Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/update.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/testadsl/releases/1.00/testadsl/images/index.html =================================================================== --- XoopsModules/testadsl/releases/1.00/testadsl/images/index.html (rev 0) +++ XoopsModules/testadsl/releases/1.00/testadsl/images/index.html 2012-02-15 13:17:00 UTC (rev 8993) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/testadsl/releases/1.00/testadsl/images/menu/bg.png =================================================================== (Binary files differ) Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/menu/bg.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/testadsl/releases/1.00/testadsl/images/menu/index.html =================================================================== --- XoopsModules/testadsl/releases/1.00/testadsl/images/menu/index.html (rev 0) +++ XoopsModules/testadsl/releases/1.00/testadsl/images/menu/index.html 2012-02-15 13:17:00 UTC (rev 8993) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/testadsl/releases/1.00/testadsl/images/menu/left_both.png =================================================================== (Binary files differ) Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/menu/left_both.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/testadsl/releases/1.00/testadsl/images/menu/right_both.png =================================================================== (Binary files differ) Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/menu/right_both.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/testadsl/releases/1.00/testadsl/images/testadsl_slogo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/testadsl_slogo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/testadsl/releases/1.00/testadsl/images/txmod_logo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/txmod_logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/testadsl/releases/1.00/testadsl/include/functions.php =================================================================== --- XoopsModules/testadsl/releases/1.00/testadsl/include/functions.php (rev 0) +++ XoopsModules/testadsl/releases/1.00/testadsl/include/functions.php 2012-02-15 13:17:00 UTC (rev 8993) @@ -0,0 +1,44 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * testadsl - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://www.txmod.netsons.org) + * + * 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://www.txmod.netsons.org) + * @license GNU GPL + * @package testadsl + * @author timgno () + * + * Version : 1.00: + * **************************************************************************** + */ + + +/***************Blocks***************/ +function block_addCatSelect($cats) { + if(is_array($cats)) + { + $cat_sql = "(".current($cats); + array_shift($cats); + foreach($cats as $cat) + { + $cat_sql .= ",".$cat; + } + $cat_sql .= ")"; + } + return $cat_sql; +} + + + + +?> \ No newline at end of file Added: XoopsModules/testadsl/releases/1.00/testadsl/include/index.html =================================================================== --- XoopsModules/testadsl/releases/1.00/testadsl/include/index.html (rev 0) +++ XoopsModules/testadsl/releases/1.00/testadsl/include/index.html 2012-02-15 13:17:00 UTC (rev 8993) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/testadsl/releases/1.00/testadsl/include/install.php =================================================================== --- XoopsModules/testadsl/releases/1.00/testadsl/include/install.php (rev 0) +++ XoopsModules/testadsl/releases/1.00/testadsl/include/install.php 2012-02-15 13:17:00 UTC (rev 8993) @@ -0,0 +1,35 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * testadsl - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://www.txmod.netsons.org) + * + * 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://www.txmod.netsons.org) + * @license GNU GPL + * @package testadsl + * @author timgno () + * + * Version : 1.00: + * **************************************************************************** + */ + +$indexFile = XOOPS_ROOT_PATH."/modules/TDMCreate/include/index.html"; +$blankFile = XOOPS_ROOT_PATH."/modules/TDMCreate/images/deco/blank.gif"; + +//Creation du dossier "uploads" pour le module \xE0 la racine du site +$module_uploads = XOOPS_ROOT_PATH."/uploads/testadsl"; +if(!is_dir($module_uploads)) + mkdir($module_uploads, 0777); + chmod($module_uploads, 0777); +copy($indexFile, XOOPS_ROOT_PATH."/uploads/testadsl/index.html"); + +?> \ No newline at end of file Added: XoopsModules/testadsl/releases/1.00/testadsl/index.php =================================================================== --- XoopsModules/testadsl/releases/1.00/testadsl/index.php (rev 0) +++ XoopsModules/testadsl/releases/1.00/testadsl/index.php 2012-02-15 13:17:00 UTC (rev 8993) @@ -0,0 +1,57 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * testadsl - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) timgno (http://www.txmod.netsons.org) + * + * 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://www.txmod.netsons.org) + * @l... [truncated message content] |
From: <txm...@us...> - 2012-02-15 13:20:02
|
Revision: 8994 http://xoops.svn.sourceforge.net/xoops/?rev=8994&view=rev Author: txmodxoops Date: 2012-02-15 13:19:51 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Module videobyuser v1.02 Added Paths: ----------- XoopsModules/videobyuser/ XoopsModules/videobyuser/branches/ XoopsModules/videobyuser/releases/ XoopsModules/videobyuser/releases/1.02/ XoopsModules/videobyuser/releases/1.02/videosbyuser/ XoopsModules/videobyuser/releases/1.02/videosbyuser/class/ XoopsModules/videobyuser/releases/1.02/videosbyuser/class/videosbyuser.class.php XoopsModules/videobyuser/releases/1.02/videosbyuser/header.php XoopsModules/videobyuser/releases/1.02/videosbyuser/images/ XoopsModules/videobyuser/releases/1.02/videosbyuser/images/videosbyuser_slogo.png XoopsModules/videobyuser/releases/1.02/videosbyuser/index.php XoopsModules/videobyuser/releases/1.02/videosbyuser/language/ XoopsModules/videobyuser/releases/1.02/videosbyuser/language/english/ XoopsModules/videobyuser/releases/1.02/videosbyuser/language/english/modinfo.php XoopsModules/videobyuser/releases/1.02/videosbyuser/language/italian/ XoopsModules/videobyuser/releases/1.02/videosbyuser/language/italian/modinfo.php XoopsModules/videobyuser/releases/1.02/videosbyuser/readme.txt XoopsModules/videobyuser/releases/1.02/videosbyuser/style/ XoopsModules/videobyuser/releases/1.02/videosbyuser/style/videosbyuser.css XoopsModules/videobyuser/releases/1.02/videosbyuser/xoops_version.php XoopsModules/videobyuser/trunk/ Added: XoopsModules/videobyuser/releases/1.02/videosbyuser/class/videosbyuser.class.php =================================================================== --- XoopsModules/videobyuser/releases/1.02/videosbyuser/class/videosbyuser.class.php (rev 0) +++ XoopsModules/videobyuser/releases/1.02/videosbyuser/class/videosbyuser.class.php 2012-02-15 13:19:51 UTC (rev 8994) @@ -0,0 +1,343 @@ +<?php + +/** + * videosbyuser Class. + * + * videosbyuser is a class written by txmod in PHP5 + * to act as a wrapper for Youtube's API. + * + * Methods process the response XML and return a friendly array of data + * to make development simple and intuitive. + */ + +class videosbyuser +{ +//CLASS VARIABLES + + /** + * @var string + */ + var $video_object = null; + + /** + * @var string + */ + var $user_object = null; + + /** + * @var string + */ + var $comment_object = null; + + /** + * @var int + */ + var $next_index = -1; +//CLASS CONSTRUCTOR + + /** + * Class constructor. + * @param string $video The video object name in the returned array. + * @param string $user The user object name in the returned array + * @param string $comment The comment object name in the returned array + */ + function videosbyuser($video, $user, $comment) { + $this->video_object = $video; + $this->user_object = $user; + $this->comment_object = $comment; + } +//CLASS FUNCTIONS + /** + * Returns all youtube videos that belong to the corresponding user. + */ + function getUserVideos($user,$category=null,$start_index =1,$max = 25){ + //set up the url to the feed + $feedURL = 'http://gdata.youtube.com/feeds/api/videos?author='.$user.'&start-index='.$start_index.'&max-results='.$max; + + //add category variable to feed url, if it exists + if($category != null){ $feedURL = $feedURL . '&category=' . $category; } + + //read the feed and place it in an simple_xml object + $xml = simplexml_load_file($feedURL); + + //get the next start index. + if(!empty($xml->link[4])){ + $this->next_index = (int)preg_replace('/&max-results='.$max.'/', '', preg_replace('/http:\/\/gdata.youtube.com\/feeds\/api\/videos\?author='.$user.'&start-index=/','', (string)$xml->link[4]->attributes()->href)); + } //if empty, then set $this->nex_index to -1 to let the user know they have reached the end of the list + else { + $this->next_index = -1; + } + + $video_array = array (); //holds the video objects + $i = 0; + foreach ($xml->entry as $entry) { + //id is the full url to get the video feed. the characters after the last slash is the actual video id + //so id here could be 'http://gdata.youtube.com/feeds/api/videos/2jkExrrm_sQ' with the actual video id being 2jkExrrm_sQ + $c = array(); //reset memory for temp video object + //extract youtube id from url + $c[$this->video_object]['youtube_id'] = preg_replace('/http:\/\/gdata.youtube.com\/feeds\/api\/videos\//','',(string) $entry->id); + $c[$this->video_object]['author'] = $entry->author->name; + + $video = array(); //reset variable + //magically gets new variables for each video + $video = $entry->children('http://search.yahoo.com/mrss/'); + $player = $video->group->player->attributes(); //get value for player variable + $thumbnail1 = $video->group->thumbnail[0]->attributes(); //get value for first thumbnail variable + $thumbnail2 = $video->group->thumbnail[1]->attributes(); //get value for first thumbnail variable + $thumbnail3 = $video->group->thumbnail[2]->attributes(); //get value for first thumbnail variable + $thumbnail4 = $video->group->thumbnail[3]->attributes(); //get value for first thumbnail variable + + $c[$this->video_object]['title'] = (string) $video->group->title; + $c[$this->video_object]['description'] = (string) $video->group->description; + //keywords are a number of keywords in one string separated by commas + $c[$this->video_object]['keywords'] = (string) $video->group->keywords; + //category is a single keyword + $c[$this->video_object]['category'] = (string) $video->group->category; + //url is the actual url to the videos page + $c[$this->video_object]['url'] = (string) $player['url']; + //urls to thethumbnail images + $c[$this->video_object]['thumbnail_url1'] = (string) $thumbnail1['url']; + $c[$this->video_object]['thumbnail_url2'] = (string) $thumbnail2['url']; + $c[$this->video_object]['thumbnail_url3'] = (string) $thumbnail3['url']; + $c[$this->video_object]['thumbnail_url4'] = (string) $thumbnail4['url']; + + //magically get the duration for video in seconds + $yt = $video->children('http://gdata.youtube.com/schemas/2007'); + $duration = $yt->duration->attributes(); //extract from xml + $c[$this->video_object]['duration'] = (string) $duration['seconds']; + + + $video = array(); //reset variable + //magically get the duration for video in seconds + $video = $entry->children('http://gdata.youtube.com/schemas/2007'); + $views = $video->statistics->attributes(); + + //if results were returned - removes php warning + if(!empty($video)){ + //number of times the video has been viewed + if($views['viewCount']==''){ $c[$this->video_object]['view_count'] = '0'; } + else{ $c[$this->video_object]['view_count'] = (string) $views['viewCount']; } + //number of times the video has been set as favorite + if($views['favoriteCount']==''){ $c[$this->video_object]['favorite_count'] = '0'; } + else{ $c[$this->video_object]['favorite_count'] = (string) $views['favoriteCount']; } + } else { //results were not returned + $c[$this->video_object]['view_count'] = '0'; + $c[$this->video_object]['favorite_count'] = '0'; + } + $video_array[] = $c; + $i++; + } + + //set the array to instance variable $user_videos + return $video_array; + } + + function getUserInfo($user) { + + $authorURL = 'http://gdata.youtube.com/feeds/api/users/' . $user; + + $xml = simplexml_load_file($authorURL); + $author_array = array (); + if (!empty ($xml)) { + $author = $xml->children('http://gdata.youtube.com/schemas/2007'); + //user's user name' + $author_array[$this->user_object]['username'] = (string) $author->username; + //users first name (if supplied) + $author_array[$this->user_object]['first_name'] = (string) $author->firstName; + //users last name (if supplied) + $author_array[$this->user_object]['last_name'] = (string) $author->lastName; + //users age (if supplied) + $author_array[$this->user_object]['age'] = (string) $author->age; + //users hobbies (if supplied) + $author_array[$this->user_object]['hobbies'] = (string) $author->hobbies; + //users relationship (if supplied) ie single, married, etc... + $author_array[$this->user_object]['relationship'] = (string) $author->relationship; + //users occupation + $author_array[$this->user_object]['occupation'] = (string) $author->occupation; + //favorite music + $author_array[$this->user_object]['music'] = (string) $author->music; + //favorite movies (not youtube videos) ... the rest are pretty obvious + $author_array[$this->user_object]['movies'] = (string) $author->movies; + $author_array[$this->user_object]['location'] = (string) $author->location; + $author_array[$this->user_object]['hometown'] = (string) $author->hometown; + $author_array[$this->user_object]['gender'] = (string) $author->gender; + $author_array[$this->user_object]['description'] = (string) $author->description; + } + return $author_array; + } + + function getMostViewed($start_index = 1, $max = 25) { + $feedURL = 'http://gdata.youtube.com/feeds/api/standardfeeds/most_viewed?start-index=' . $start_index . '&max-results=' . $max; + $xml = simplexml_load_file($feedURL); + $video_array = array (); //holds the video objects + $i = 0; + foreach ($xml->entry as $entry) { + //id is the full url to get the video feed. the characters after the last slash is the actual video id + //so id here could be 'http://gdata.youtube.com/feeds/api/videos/2jkExrrm_sQ' with the actual video id being 2jkExrrm_sQ + $c = array(); //reset memory for temp video object + //extract youtube id from url + $c[$this->video_object]['youtube_id'] = preg_replace('/http:\/\/gdata.youtube.com\/feeds\/api\/videos\//','',(string) $entry->id); + $c[$this->video_object]['author'] = $entry->author->name; + + $video = array(); //reset variable + //magically gets new variables for each video + $video = $entry->children('http://search.yahoo.com/mrss/'); + $player = $video->group->player->attributes(); //get value for player variable + $thumbnail1 = $video->group->thumbnail[0]->attributes(); //get value for first thumbnail variable + $thumbnail2 = $video->group->thumbnail[1]->attributes(); //get value for first thumbnail variable + $thumbnail3 = $video->group->thumbnail[2]->attributes(); //get value for first thumbnail variable + $thumbnail4 = $video->group->thumbnail[3]->attributes(); //get value for first thumbnail variable + + $c[$this->video_object]['title'] = (string) $video->group->title; + $c[$this->video_object]['description'] = (string) $video->group->description; + //keywords are a number of keywords in one string separated by commas + $c[$this->video_object]['keywords'] = (string) $video->group->keywords; + //category is a single keyword + $c[$this->video_object]['category'] = (string) $video->group->category; + //url is the actual url to the videos page + $c[$this->video_object]['url'] = (string) $player['url']; + //urls to thethumbnail images + $c[$this->video_object]['thumbnail_url1'] = (string) $thumbnail1['url']; + $c[$this->video_object]['thumbnail_url2'] = (string) $thumbnail2['url']; + $c[$this->video_object]['thumbnail_url3'] = (string) $thumbnail3['url']; + $c[$this->video_object]['thumbnail_url4'] = (string) $thumbnail4['url']; + + //magically get the duration for video in seconds + $yt = $video->children('http://gdata.youtube.com/schemas/2007'); + $duration = $yt->duration->attributes(); //extract from xml + $c[$this->video_object]['duration'] = (string) $duration['seconds']; + + + $video = array(); //reset variable + //magically get the duration for video in seconds + $video = $entry->children('http://gdata.youtube.com/schemas/2007'); + $views = $video->statistics->attributes(); + + //if results were returned - removes php warning + if(!empty($video)){ + //number of times the video has been viewed + if($views['viewCount']==''){ $c[$this->video_object]['view_count'] = '0'; } + else{ $c[$this->video_object]['view_count'] = (string) $views['viewCount']; } + //number of times the video has been set as favorite + if($views['favoriteCount']==''){ $c[$this->video_object]['favorite_count'] = '0'; } + else{ $c[$this->video_object]['favorite_count'] = (string) $views['favoriteCount']; } + } else { //results were not returned + $c[$this->video_object]['view_count'] = '0'; + $c[$this->video_object]['favorite_count'] = '0'; + } + $video_array[] = $c; + $i++; + } + + //set the array to instance variable $user_videos + return $video_array; + } + /** + * Returns the video comments of a youtube video.<br /> + */ + + function getVideoComments($id,$start_index=1,$max=25) { + $commentURL = 'http://gdata.youtube.com/feeds/api/videos/' . $id. '/comments?start-index='.$start_index.'&max-results='.$max; + $xml = simplexml_load_file($commentURL); + + $comment_array = array(); + $i=0; + foreach($xml->entry as $entry) + { + $comment_array[$i][$this->comment_object]['youtube_id'] = $id; + //get the author's name + $comment_array[$i][$this->comment_object]['author'] = (string)$entry->author->name; + //get title of the comment + $comment_array[$i][$this->comment_object]['title'] = (string)$entry->title; + //get comment content + $comment_array[$i][$this->comment_object]['content'] = (string)$entry->content; + //get the last time the comment was updated + $comment_array[$i][$this->comment_object]['updated'] = $entry->updated; + //get the time the comment was published + $comment_array[$i][$this->comment_object]['published'] = $entry->published; + $i++; + } + + return $comment_array; + } + /** + * Returns the information of a youtube video. + */ + + function getVideoInfo($id) { + //set up the feed url + $feedURL = 'http://gdata.youtube.com/feeds/api/videos/' . $id; + //read the feed and place it in an simple_xml object + $xml = simplexml_load_file($feedURL); + //create an empty array to deal with foreach loops incase nothing is returned from the feed query + $video_array = array (); + + //if the query returned a value and the xml object is not empty + if (!empty ($xml)) { + + //store the youtube_id in the object. + $video_array[$this->video_object]['youtube_id'] = $id; + //get the authors name + $video_array[$this->video_object]['author'] = $xml->author->name; + $video = $xml->children('http://search.yahoo.com/mrss/'); + + $player = $video->group->player->attributes(); + $thumbnail1 = $video->group->thumbnail[0]->attributes(); //get value for first thumbnail variable + $thumbnail2 = $video->group->thumbnail[1]->attributes(); //get value for first thumbnail variable + $thumbnail3 = $video->group->thumbnail[2]->attributes(); //get value for first thumbnail variable + $thumbnail4 = $video->group->thumbnail[3]->attributes(); //get value for first thumbnail variable + //get the url to the thumbnails for the video + $video_array[$this->video_object]['thumbnail_url1'] = (string) $thumbnail1['url']; + $video_array[$this->video_object]['thumbnail_url2'] = (string) $thumbnail2['url']; + $video_array[$this->video_object]['thumbnail_url3'] = (string) $thumbnail3['url']; + $video_array[$this->video_object]['thumbnail_url4'] = (string) $thumbnail4['url']; + + //get the video's title + $video_array[$this->video_object]['title'] = (string) $video->group->title; + //get the video's description + $video_array[$this->video_object]['description'] = (string) $video->group->description; + //get the video's category + $video_array[$this->video_object]['category'] = (string)$video->group->category; + //get the video's tags/keywords + $video_array[$this->video_object]['keywords'] = (string) $video->group->keywords; + //get the url to the video + $video_array[$this->video_object]['url'] = (string) $player['url']; + + + $yt = $video->children('http://gdata.youtube.com/schemas/2007'); + $length = $yt->duration->attributes(); + //get the video length in seconds + $video_array[$this->video_object]['length'] = (string) $length['seconds']; + $video = $xml->children('http://gdata.youtube.com/schemas/2007'); + //get the number of times the video has been viewed and marked as favorite + $views = $video->statistics->attributes(); + + + //if results were returned - removes php warning + if(!empty($video)){ + //number of times the video has been viewed + if($views['viewCount']==''){ $video_array[$this->video_object]['view_count'] = '0'; } + else{ $video_array[$this->video_object]['view_count'] = (string) $views['viewCount']; } + //number of times the video has been set as favorite + if($views['favoriteCount']==''){ $video_array[$this->video_object]['favorite_count'] = '0'; } + else{ $video_array[$this->video_object]['favorite_count'] = (string) $views['favoriteCount']; } + } else { //results were not returned + $video_array[$this->video_object]['view_count'] = '0'; + $video_array[$this->video_object]['favorite_count'] = '0'; + } + + $video = $xml->children('http://schemas.google.com/g/2005'); + + //check to see if there are any comments/any information about the comments + //if there is get the feedlink and number of comments + if ($video->comments->feedLink) { + $comments = $video->comments->feedLink->attributes(); + //get the number of comments for the video + $video_array[$this->video_object]['comments_count'] = (string) $comments['countHint']; + } + } + //return the current video array + return $video_array; + } +} +?> \ No newline at end of file Added: XoopsModules/videobyuser/releases/1.02/videosbyuser/header.php =================================================================== --- XoopsModules/videobyuser/releases/1.02/videosbyuser/header.php (rev 0) +++ XoopsModules/videobyuser/releases/1.02/videosbyuser/header.php 2012-02-15 13:19:51 UTC (rev 8994) @@ -0,0 +1,8 @@ +<?php +// +// Author: timgno +// WebSite: http://mcdirectory.netsons.org/txmod/ +// +include '../../mainfile.php'; +$myts =& MyTextSanitizer::getInstance(); +?> \ No newline at end of file Added: XoopsModules/videobyuser/releases/1.02/videosbyuser/images/videosbyuser_slogo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/videobyuser/releases/1.02/videosbyuser/images/videosbyuser_slogo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/videobyuser/releases/1.02/videosbyuser/index.php =================================================================== --- XoopsModules/videobyuser/releases/1.02/videosbyuser/index.php (rev 0) +++ XoopsModules/videobyuser/releases/1.02/videosbyuser/index.php 2012-02-15 13:19:51 UTC (rev 8994) @@ -0,0 +1,76 @@ +<?php +// +// Author: timgno +// WebSite: http://mcdirectory.netsons.org/txmod/ +// +// inclusione intestazione +include('header.php'); +global $xoTheme; + +// inclusione dell'intestazione della pagina (header file) +include(XOOPS_ROOT_PATH.'/header.php'); + +$xoTheme->addStylesheet("modules/videosbyuser/style/videosbyuser.css"); + +echo '<span style="text-align: center;"><b>'._MI_VBU_NAME.'</b></span><br /><br />'; + +$user = $myts->htmlspecialchars(trim($xoopsModuleConfig['custom_keyword'])); +//get or create youtube username +if( isset($_GET['user']) && trim($_GET['user'])!="") +{ + $youtube_user = $_GET['user']; + $youtube_user = urlencode($youtube_user); +} +else {$youtube_user = $user;} + +//create php5tube object and get videos +include_once("class/videosbyuser.class.php"); +$videosbyuser = new videosbyuser('Video','User','Comment'); +$videos = $videosbyuser->getUserVideos($youtube_user); + +?> + +<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get"><div><?php echo _MI_VBU_SEARCHUSER; ?>:<input type="text" name="user" value="<?php echo $youtube_user; ?>" /> + <input type="submit" name="submit" value="<?php echo _MI_VBU_SEARCH; ?>" /></div><div> </div></form> + +<table cellpadding="2" cellspacing="2" border="1"> + +<?php foreach($videos as $video) { ?> +<tr> + <td><table cellpadding="2" cellspacing="2" border="0"> + <tr> + <td><div style="padding:2px;"><img src="<?php echo $video['Video']['thumbnail_url1']; ?>"></div></td> + <td><div style="padding:2px;"><img src="<?php echo $video['Video']['thumbnail_url2']; ?>"></div></td> + <td><div style="padding:2px;"><img src="<?php echo $video['Video']['thumbnail_url3']; ?>"></div></td> + </tr> + </table> + </td></tr> +<tr> +<td><table cellpadding="2" cellspacing="2" border="1"> + <tr> + <td> + <div style="padding:10px;"> + <a href="http://www.youtube.com/watch?v=<?php echo $video['Video']['youtube_id']; ?>" target="_blank"> + <img src="<?php echo $video['Video']['thumbnail_url4']; ?>" border="0" alt="<?php echo $video['Video']['title']; ?>" /> + </a> + </div> +</td> +<td> + <div style="font-size:10pt;"><b>Title</b> = <?php echo $video['Video']['title']; ?></div> + <div><b>Category</b> = <?php echo $video['Video']['category']; ?> times</div> + <div><b>Tags</b> = <?php echo $video['Video']['keywords']; ?> times</div> + <div><b>Description</b> = <?php echo $video['Video']['description']; ?></div> + <div><b>Views</b> = <?php echo $video['Video']['view_count']; ?> times</div> + <div><b>Marked as favorite</b> = <?php echo $video['Video']['favorite_count']; ?> times</div> + </td></tr> + </table> + </td></tr> +<?php } ?> +<tr><td style="text-align: right;" width="100%">Powered by: <a href="http://mcdirectory.netsons.org/txmod/" target="_blank">TXMod</a></td> +</table> + +<?php +// inclusione del footer +include(XOOPS_ROOT_PATH.'/footer.php'); + +?> \ No newline at end of file Added: XoopsModules/videobyuser/releases/1.02/videosbyuser/language/english/modinfo.php =================================================================== --- XoopsModules/videobyuser/releases/1.02/videosbyuser/language/english/modinfo.php (rev 0) +++ XoopsModules/videobyuser/releases/1.02/videosbyuser/language/english/modinfo.php 2012-02-15 13:19:51 UTC (rev 8994) @@ -0,0 +1,10 @@ +<?php + +define("_MI_VBU_NAME", "Videos by User"); +define("_MI_VBU_DESC", "Searching for videos based on the user's name"); +define("_MI_VBU_CUSTOMKEYWORD", "Keyword"); +define("_MI_VBU_CUSTOMKEYWORDDSC", "Keyword default"); + +define("_MI_VBU_SEARCHUSER", "Search User"); +define("_MI_VBU_SEARCH", "Search"); +?> \ No newline at end of file Added: XoopsModules/videobyuser/releases/1.02/videosbyuser/language/italian/modinfo.php =================================================================== --- XoopsModules/videobyuser/releases/1.02/videosbyuser/language/italian/modinfo.php (rev 0) +++ XoopsModules/videobyuser/releases/1.02/videosbyuser/language/italian/modinfo.php 2012-02-15 13:19:51 UTC (rev 8994) @@ -0,0 +1,11 @@ +<?php + +define("_MI_VBU_NAME", "Videos by User"); +define("_MI_VBU_DESC", "Ricerca dei video in base al nome dell'utente"); +define("_MI_VBU_CUSTOMKEYWORD", "Parola chiave"); +define("_MI_VBU_CUSTOMKEYWORDDSC", "Parola chiave di default"); + +define("_MI_VBU_SEARCHUSER", "Cerca Utente"); +define("_MI_VBU_SEARCH", "Cerca"); + +?> \ No newline at end of file Added: XoopsModules/videobyuser/releases/1.02/videosbyuser/readme.txt =================================================================== --- XoopsModules/videobyuser/releases/1.02/videosbyuser/readme.txt (rev 0) +++ XoopsModules/videobyuser/releases/1.02/videosbyuser/readme.txt 2012-02-15 13:19:51 UTC (rev 8994) @@ -0,0 +1,3 @@ +Se vuoi sapere quanti o quali video ha inserito un utente su YouTube, questo modulo lo pu\xF2 fare. Dai dati che si ricevono, si visualizza il titolo, la categoria, la descrizione, le parole chiavi, quante volte \xE8 stato visualizzato e quanti l'hanno inserito tra i loro preferiti + +If you want to know how many or which included a video on YouTube user, this form can do. The data that we receive, you see the title, category, description, keywords, how many times has been viewed and how many have included among their favorites \ No newline at end of file Added: XoopsModules/videobyuser/releases/1.02/videosbyuser/style/videosbyuser.css =================================================================== --- XoopsModules/videobyuser/releases/1.02/videosbyuser/style/videosbyuser.css (rev 0) +++ XoopsModules/videobyuser/releases/1.02/videosbyuser/style/videosbyuser.css 2012-02-15 13:19:51 UTC (rev 8994) @@ -0,0 +1,14 @@ +/* base modules by timgno + http://mcdirectory.netsons.org/txmod/ + */ +html {} +body{} + +div.base{ + color: #F90000; + height: 100px; + text-align: center; + font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size: 14px; + font-weight: bold; +} \ No newline at end of file Added: XoopsModules/videobyuser/releases/1.02/videosbyuser/xoops_version.php =================================================================== --- XoopsModules/videobyuser/releases/1.02/videosbyuser/xoops_version.php (rev 0) +++ XoopsModules/videobyuser/releases/1.02/videosbyuser/xoops_version.php 2012-02-15 13:19:51 UTC (rev 8994) @@ -0,0 +1,31 @@ +<?php +// +// Author: timgno +// WebSite: http://mcdirectory.netsons.org/txmod/ +// +$modversion['name'] = _MI_VBU_NAME; +$modversion['version'] = 1.02; +$modversion['description'] = _MI_VBU_DESC; +$modversion['author'] = 'timgno - http://mcdirectory.netsons.org/txmod'; +$modversion['credits'] = 'http://mcdirectory.netsons.org/txmod/'; +$modversion['help'] = 'help.php'; +$modversion['license'] = 'GPL see LICENSE'; +$modversion['official'] = 0; +$modversion['image'] = 'images/videosbyuser_slogo.png'; +$modversion['dirname'] = 'videosbyuser'; +// Admin +$modversion['hasAdmin'] = 1; +$modversion['adminindex'] = ""; +$modversion['adminmenu'] = ""; +// Main +$modversion['hasMain'] = 1; + +// Config +$i = 1; +$modversion['config'][$i]['name'] = 'custom_keyword'; +$modversion['config'][$i]['title'] = '_MI_VBU_CUSTOMKEYWORD'; +$modversion['config'][$i]['description'] = '_MI_VBU_CUSTOMKEYWORDDSC'; +$modversion['config'][$i]['formtype'] = 'textbox'; +$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['default'] = 'Rai'; +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-02-15 13:27:47
|
Revision: 8996 http://xoops.svn.sourceforge.net/xoops/?rev=8996&view=rev Author: txmodxoops Date: 2012-02-15 13:27:36 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Module youtubestream v1.01, v1.05, v1.12 Added Paths: ----------- XoopsModules/youtubestream/ XoopsModules/youtubestream/branches/ XoopsModules/youtubestream/releases/ XoopsModules/youtubestream/releases/1.01/ XoopsModules/youtubestream/releases/1.01/youtubestream/ XoopsModules/youtubestream/releases/1.01/youtubestream/class/ XoopsModules/youtubestream/releases/1.01/youtubestream/class/YouTubeAPI XoopsModules/youtubestream/releases/1.01/youtubestream/class/YouTubeAPI.inc.php XoopsModules/youtubestream/releases/1.01/youtubestream/header.php XoopsModules/youtubestream/releases/1.01/youtubestream/images/ XoopsModules/youtubestream/releases/1.01/youtubestream/images/index.html XoopsModules/youtubestream/releases/1.01/youtubestream/images/youtubestream_slogo.png XoopsModules/youtubestream/releases/1.01/youtubestream/index.php XoopsModules/youtubestream/releases/1.01/youtubestream/language/ XoopsModules/youtubestream/releases/1.01/youtubestream/language/english/ XoopsModules/youtubestream/releases/1.01/youtubestream/language/english/index.html XoopsModules/youtubestream/releases/1.01/youtubestream/language/english/modinfo.php XoopsModules/youtubestream/releases/1.01/youtubestream/language/french/ XoopsModules/youtubestream/releases/1.01/youtubestream/language/french/index.html XoopsModules/youtubestream/releases/1.01/youtubestream/language/french/modinfo.php XoopsModules/youtubestream/releases/1.01/youtubestream/language/index.html XoopsModules/youtubestream/releases/1.01/youtubestream/language/italian/ XoopsModules/youtubestream/releases/1.01/youtubestream/language/italian/index.html XoopsModules/youtubestream/releases/1.01/youtubestream/language/italian/modinfo.php XoopsModules/youtubestream/releases/1.01/youtubestream/xoops_version.php XoopsModules/youtubestream/releases/1.05/ XoopsModules/youtubestream/releases/1.05/youtubestream/ XoopsModules/youtubestream/releases/1.05/youtubestream/admin/ XoopsModules/youtubestream/releases/1.05/youtubestream/admin/about.php XoopsModules/youtubestream/releases/1.05/youtubestream/admin/admin_header.php XoopsModules/youtubestream/releases/1.05/youtubestream/admin/index.html XoopsModules/youtubestream/releases/1.05/youtubestream/admin/index.php XoopsModules/youtubestream/releases/1.05/youtubestream/admin/info_header.php XoopsModules/youtubestream/releases/1.05/youtubestream/admin/menu.php XoopsModules/youtubestream/releases/1.05/youtubestream/class/ XoopsModules/youtubestream/releases/1.05/youtubestream/class/YouTubeAPI XoopsModules/youtubestream/releases/1.05/youtubestream/class/YouTubeAPI.inc.php XoopsModules/youtubestream/releases/1.05/youtubestream/class/index.html XoopsModules/youtubestream/releases/1.05/youtubestream/header.php XoopsModules/youtubestream/releases/1.05/youtubestream/images/ XoopsModules/youtubestream/releases/1.05/youtubestream/images/index.html XoopsModules/youtubestream/releases/1.05/youtubestream/images/logo-en.png XoopsModules/youtubestream/releases/1.05/youtubestream/images/youtubestream_slogo.png XoopsModules/youtubestream/releases/1.05/youtubestream/include/ XoopsModules/youtubestream/releases/1.05/youtubestream/include/functions.php XoopsModules/youtubestream/releases/1.05/youtubestream/include/index.html XoopsModules/youtubestream/releases/1.05/youtubestream/include/vars.php XoopsModules/youtubestream/releases/1.05/youtubestream/index.php XoopsModules/youtubestream/releases/1.05/youtubestream/language/ XoopsModules/youtubestream/releases/1.05/youtubestream/language/english/ XoopsModules/youtubestream/releases/1.05/youtubestream/language/english/admin.php XoopsModules/youtubestream/releases/1.05/youtubestream/language/english/index.html XoopsModules/youtubestream/releases/1.05/youtubestream/language/english/main.php XoopsModules/youtubestream/releases/1.05/youtubestream/language/english/modinfo.php XoopsModules/youtubestream/releases/1.05/youtubestream/language/french/ XoopsModules/youtubestream/releases/1.05/youtubestream/language/french/admin.php XoopsModules/youtubestream/releases/1.05/youtubestream/language/french/index.html XoopsModules/youtubestream/releases/1.05/youtubestream/language/french/main.php XoopsModules/youtubestream/releases/1.05/youtubestream/language/french/modinfo.php XoopsModules/youtubestream/releases/1.05/youtubestream/language/index.html XoopsModules/youtubestream/releases/1.05/youtubestream/language/italian/ XoopsModules/youtubestream/releases/1.05/youtubestream/language/italian/admin.php XoopsModules/youtubestream/releases/1.05/youtubestream/language/italian/index.html XoopsModules/youtubestream/releases/1.05/youtubestream/language/italian/main.php XoopsModules/youtubestream/releases/1.05/youtubestream/language/italian/modinfo.php XoopsModules/youtubestream/releases/1.05/youtubestream/readme.txt XoopsModules/youtubestream/releases/1.05/youtubestream/style/ XoopsModules/youtubestream/releases/1.05/youtubestream/style/index.html XoopsModules/youtubestream/releases/1.05/youtubestream/style/youtubestream.css XoopsModules/youtubestream/releases/1.05/youtubestream/templates/ XoopsModules/youtubestream/releases/1.05/youtubestream/templates/index.html XoopsModules/youtubestream/releases/1.05/youtubestream/templates/youtubestream.html XoopsModules/youtubestream/releases/1.05/youtubestream/xoops_version.php XoopsModules/youtubestream/releases/1.12/ XoopsModules/youtubestream/releases/1.12/youtubestream/ XoopsModules/youtubestream/releases/1.12/youtubestream/admin/ XoopsModules/youtubestream/releases/1.12/youtubestream/admin/about.php XoopsModules/youtubestream/releases/1.12/youtubestream/admin/admin_header.php XoopsModules/youtubestream/releases/1.12/youtubestream/admin/index.html XoopsModules/youtubestream/releases/1.12/youtubestream/admin/index.php XoopsModules/youtubestream/releases/1.12/youtubestream/admin/info_header.php XoopsModules/youtubestream/releases/1.12/youtubestream/admin/menu.php XoopsModules/youtubestream/releases/1.12/youtubestream/class/ XoopsModules/youtubestream/releases/1.12/youtubestream/class/YTStream.class.php XoopsModules/youtubestream/releases/1.12/youtubestream/class/YouTubeAPI.inc.php XoopsModules/youtubestream/releases/1.12/youtubestream/class/class.YouTubeParser.php XoopsModules/youtubestream/releases/1.12/youtubestream/class/index.html XoopsModules/youtubestream/releases/1.12/youtubestream/class/youtubedownloader_class.php XoopsModules/youtubestream/releases/1.12/youtubestream/comment_delete.php XoopsModules/youtubestream/releases/1.12/youtubestream/comment_edit.php XoopsModules/youtubestream/releases/1.12/youtubestream/comment_new.php XoopsModules/youtubestream/releases/1.12/youtubestream/comment_post.php XoopsModules/youtubestream/releases/1.12/youtubestream/comment_reply.php XoopsModules/youtubestream/releases/1.12/youtubestream/content-store.php XoopsModules/youtubestream/releases/1.12/youtubestream/dlvideo.php XoopsModules/youtubestream/releases/1.12/youtubestream/header.php XoopsModules/youtubestream/releases/1.12/youtubestream/images/ XoopsModules/youtubestream/releases/1.12/youtubestream/images/down.png XoopsModules/youtubestream/releases/1.12/youtubestream/images/index.html XoopsModules/youtubestream/releases/1.12/youtubestream/images/logo-big.png XoopsModules/youtubestream/releases/1.12/youtubestream/images/logo-small.png XoopsModules/youtubestream/releases/1.12/youtubestream/images/player.png XoopsModules/youtubestream/releases/1.12/youtubestream/images/tube.png XoopsModules/youtubestream/releases/1.12/youtubestream/images/youtubestream_slogo.png XoopsModules/youtubestream/releases/1.12/youtubestream/include/ XoopsModules/youtubestream/releases/1.12/youtubestream/include/comment_functions.php XoopsModules/youtubestream/releases/1.12/youtubestream/include/functions.php XoopsModules/youtubestream/releases/1.12/youtubestream/include/index.html XoopsModules/youtubestream/releases/1.12/youtubestream/include/vars.php XoopsModules/youtubestream/releases/1.12/youtubestream/index.php XoopsModules/youtubestream/releases/1.12/youtubestream/language/ XoopsModules/youtubestream/releases/1.12/youtubestream/language/english/ XoopsModules/youtubestream/releases/1.12/youtubestream/language/english/admin.php XoopsModules/youtubestream/releases/1.12/youtubestream/language/english/index.html XoopsModules/youtubestream/releases/1.12/youtubestream/language/english/main.php XoopsModules/youtubestream/releases/1.12/youtubestream/language/english/modinfo.php XoopsModules/youtubestream/releases/1.12/youtubestream/language/french/ XoopsModules/youtubestream/releases/1.12/youtubestream/language/french/admin.php XoopsModules/youtubestream/releases/1.12/youtubestream/language/french/index.html XoopsModules/youtubestream/releases/1.12/youtubestream/language/french/main.php XoopsModules/youtubestream/releases/1.12/youtubestream/language/french/modinfo.php XoopsModules/youtubestream/releases/1.12/youtubestream/language/index.html XoopsModules/youtubestream/releases/1.12/youtubestream/language/italian/ XoopsModules/youtubestream/releases/1.12/youtubestream/language/italian/admin.php XoopsModules/youtubestream/releases/1.12/youtubestream/language/italian/index.html XoopsModules/youtubestream/releases/1.12/youtubestream/language/italian/main.php XoopsModules/youtubestream/releases/1.12/youtubestream/language/italian/modinfo.php XoopsModules/youtubestream/releases/1.12/youtubestream/newclass.php XoopsModules/youtubestream/releases/1.12/youtubestream/readme.txt XoopsModules/youtubestream/releases/1.12/youtubestream/sql/ XoopsModules/youtubestream/releases/1.12/youtubestream/sql/index.html XoopsModules/youtubestream/releases/1.12/youtubestream/sql/mysql.sql XoopsModules/youtubestream/releases/1.12/youtubestream/store.txt XoopsModules/youtubestream/releases/1.12/youtubestream/style/ XoopsModules/youtubestream/releases/1.12/youtubestream/style/index.html XoopsModules/youtubestream/releases/1.12/youtubestream/style/youtubestream.css XoopsModules/youtubestream/releases/1.12/youtubestream/sytvideo.php XoopsModules/youtubestream/releases/1.12/youtubestream/templates/ XoopsModules/youtubestream/releases/1.12/youtubestream/templates/index.html XoopsModules/youtubestream/releases/1.12/youtubestream/templates/youtubestream_dlvideo.html XoopsModules/youtubestream/releases/1.12/youtubestream/templates/youtubestream_index.html XoopsModules/youtubestream/releases/1.12/youtubestream/templates/youtubestream_sytvideo.html XoopsModules/youtubestream/releases/1.12/youtubestream/xoops_version.php XoopsModules/youtubestream/trunk/ Added: XoopsModules/youtubestream/releases/1.01/youtubestream/class/YouTubeAPI =================================================================== (Binary files differ) Property changes on: XoopsModules/youtubestream/releases/1.01/youtubestream/class/YouTubeAPI ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/youtubestream/releases/1.01/youtubestream/class/YouTubeAPI.inc.php =================================================================== --- XoopsModules/youtubestream/releases/1.01/youtubestream/class/YouTubeAPI.inc.php (rev 0) +++ XoopsModules/youtubestream/releases/1.01/youtubestream/class/YouTubeAPI.inc.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,167 @@ +<?php +define("ANY",0); +define("YT",1); +define("PC",2); + +/** + * This class fetching live streaming links of youtube videos, both for mobile (real player) and PC (flash player) + * + *@author Rochak Chauhan [www.dmwtechnologies.com] + */ +class YouTubeAPI { + private $startIndex=1; + private $format=YT; + private $maxResults=10; + private $keyword=""; + private $feedString=""; + + public function __construct($keyword,$maxResults=10,$startIndex=1,$format=ANY) { + $this->keyword=$keyword; + $this->format=$format; + $this->maxResults=$maxResults; + $this->startIndex=$startIndex; + $url="http://gdata.youtube.com/feeds/api/videos?vq=$keyword&start-index=$startIndex&max-results=$maxResults"; + $this->feedString=$this->getXmlCodeViaFopen($url); + } + + /** + * Function to get the XML code from the YouTubeAPI + * + * @param string $url + * @access private + * + * @return string + */ + private function getXmlCodeViaFopen($url){ + $returnStr=""; + $fp=fopen($url, "r") or die("ERROR: Illigal YouTube API URL"); + while (!feof($fp)) { + $returnStr.=fgetc($fp); + } + fclose($fp); + return $returnStr; + } + + /** + * Function to get the Title from the XML/RSS Feed + * + * @param string $str + * @access private + * @return string + */ + private function getTitle($str) { + $final=array(); + $returnArray=array(); + $pattern="/<title type='text'>(.*)\<\/title\>/Uis"; + preg_match_all($pattern, $str, $returnArray, PREG_SET_ORDER); + if(isset($returnArray[0][1])) { + return $returnArray[0][1]; + } + else { + return "NA"; + } + } + + /** + * Function to get the FLV/SWF url from the XML/RSS Feed + * + * @param string $str + * @access private + * @return string + */ + private function getFlvUrl($str) { + $final=array(); + $returnArray=array(); + $pattern="/<media:player url='(.*)'/Uis"; + //$pattern="/<media:content url='(.*)' type='application\/x-shockwave-flash'/Uis"; + preg_match_all($pattern, $str, $returnArray, PREG_SET_ORDER); + + if(isset($returnArray[0][1])) { + return $returnArray[0][1]; + } + else { + return "#"; + } + } + + /** + * Function to get the mobile streaming url from the XML/RSS Feed + * + * @param string $str + * @access private + * @return string + */ + private function getMobileUrl($str) { + + $final=array(); + $returnArray=array(); + $pattern="/<media:content url='(.*)' type='video\/3gpp'/Uis"; + preg_match_all($pattern, $str, $returnArray, PREG_SET_ORDER); + + if(isset($returnArray[1][1])) { + return $returnArray[1][1]; + } + else { + return "#"; + } + } + + /** + * Function to get the video thumbnail from the XML/RSS Feed + * + * @param string $str + * @access private + * @return string + */ + private function getThumbnailUrl($str) { + + $final=array(); + $returnArray=array(); + $pattern="/<media:thumbnail url='(.*)' height='97'/Uis"; + preg_match_all($pattern, $str, $returnArray, PREG_SET_ORDER); + + $rand=rand(0,2); + + if(isset($returnArray[$rand][1])) { + return $returnArray[$rand][1]; + } + else { + return "http://static.fluxstatic.com/-/Clients/Common/Img/ExternalCommunityThumbnails/ExtCommunity_YouTube_Size50x50.jpg"; + } + } + + /** + * Function to get Streaming link info + * + * @param string $feed + * @access public + * @return array + */ + public function getStreamingLinks() { + $feed=$this->feedString; + $final=array(); + $returnArray=array(); + //$pattern="/<title type='text'>(.*)<category scheme=/Uis"; + $pattern="/<title type='text'>(.*)<category scheme='http:\/\/gdata.youtube.com\/schemas\/2007\/keywords.cat'/Uis"; + preg_match_all($pattern, $feed, $returnArray, PREG_SET_ORDER); + + for($i=1;$i<count($returnArray);$i++){ + $str=$returnArray[$i][0]; + $title=$this->getTitle($str); + $flvUrl=$this->getFlvUrl($str); + $mobileUrl=$this->getMobileUrl($str); + $thumbnailUrl=$this->getThumbnailUrl($str); + if ($this->format==YT) { + $final[]=array("title"=>$title,"flvurl"=>$flvUrl,"thumbnailUrl"=>$thumbnailUrl); + } + elseif ($this->format==PC) { + $final[]=array("title"=>$title,"mobileurl"=>$mobileUrl,"thumbnailUrl"=>$thumbnailUrl); + } + else { + $final[]=array("title"=>$title,"flvurl"=>$flvUrl,"mobileurl"=>$mobileUrl,"thumbnailUrl"=>$thumbnailUrl); + } + } + return $final; + } +} +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.01/youtubestream/header.php =================================================================== --- XoopsModules/youtubestream/releases/1.01/youtubestream/header.php (rev 0) +++ XoopsModules/youtubestream/releases/1.01/youtubestream/header.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,5 @@ +<?php + +include_once '../../mainfile.php'; + +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.01/youtubestream/images/index.html =================================================================== --- XoopsModules/youtubestream/releases/1.01/youtubestream/images/index.html (rev 0) +++ XoopsModules/youtubestream/releases/1.01/youtubestream/images/index.html 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.01/youtubestream/images/youtubestream_slogo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/youtubestream/releases/1.01/youtubestream/images/youtubestream_slogo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/youtubestream/releases/1.01/youtubestream/index.php =================================================================== --- XoopsModules/youtubestream/releases/1.01/youtubestream/index.php (rev 0) +++ XoopsModules/youtubestream/releases/1.01/youtubestream/index.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,72 @@ +<?php +// +// --------------------------------------------------- +// File: index.php +// Version: 1.01 +// Date-Time: 2008/07/08 16:03:10 +// Author: timgno +// Email: ris...@ne... +// URL: http://www.risorseweb.netsons.org +// License +// --------------------------------------------------- +// +include('header.php'); +include(XOOPS_ROOT_PATH.'/header.php'); + +$maxrecords=5; +$keyword="Ferrari"; +if (isset($_GET['keyword']) && trim($_GET['keyword'])!="") { + $keyword=$_GET['keyword']; + $keyword=urlencode($keyword); +} +if (isset($_GET['maxrecords']) && trim($_GET['maxrecords'])!="") { + $maxrecords=$_GET['maxrecords']; +} +?> +<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get"><div>Search:<input type="text" name="keyword" value="<?php echo $keyword; ?>"/> Records:<select name="maxrecords"> +<?php +for ($i=1;$i<=5;$i++){ + $j=$i*5; + if ($maxrecords == $j) { + echo "<option value='$j' selected='selected'>$j</option>"; + } + else { + echo "<option value='$j'>$j</option>"; + } +} +?> +</select> <input type="submit" name="submit" value="Search" /></div><div> </div></form> +<?php +require_once("class/YouTubeAPI.inc.php"); +$api=new YouTubeAPI($keyword,$maxrecords,1); +$result=$api->getStreamingLinks(); +$total=count($result); +for ($i=0;$i<$total;$i++){ + $mobileUrl=$flvUrl="#"; + $imageSrc=$result[$i]['thumbnailUrl']; + $title=$result[$i]['title']; + if (isset($result[$i]['flvurl'])) { + $flvUrl=$result[$i]['flvurl']; + } + if (isset($result[$i]['mobileurl'])) { + $mobileUrl=$result[$i]['mobileurl']; + } + + echo "<div>$title<br /><img src='$imageSrc' alt='$title' /><br /><a href='$flvUrl' target='_blank'>Stream on YouTube</a><br /><a href='$mobileUrl'>Stream on PC</a></div><div> </div>"; +} +?> +<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get"><div>Search:<input type="text" name="keyword" value="<?php echo $keyword; ?>" /> Records:<select name="maxrecords"> +<?php +for ($i=1;$i<=5;$i++){ + $j=$i*5; + if ($maxrecords == $j) { + echo "<option value='$j' selected='selected'>$j</option>"; + } + else { + echo "<option value='$j'>$j</option>"; + } +} +?> +</select> <input type="submit" name="submit" value="Search" /></div><div> </div></form> +<div class="footer">Powered by <a href="http://mcdirectory.netsons.org/txmod/">TXMod for Xoops</a></div> +<?php include(XOOPS_ROOT_PATH.'/footer.php'); ?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.01/youtubestream/language/english/index.html =================================================================== --- XoopsModules/youtubestream/releases/1.01/youtubestream/language/english/index.html (rev 0) +++ XoopsModules/youtubestream/releases/1.01/youtubestream/language/english/index.html 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.01/youtubestream/language/english/modinfo.php =================================================================== --- XoopsModules/youtubestream/releases/1.01/youtubestream/language/english/modinfo.php (rev 0) +++ XoopsModules/youtubestream/releases/1.01/youtubestream/language/english/modinfo.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,26 @@ +<?php +// +// --------------------------------------------------- +// Module: youtube_stream +// File: language/modinfo.php +// Version: 1.0 +// Date-Time: 2008/07/8 15:03:10 +// Author: timgno +// Email: ris...@ne... +// URL: http://www.risorseweb.netsons.org +// --------------------------------------------------- +// + +//info italiano +define("_MI_YOUTUBE_STREAM_NAME", "YouTube Stream"); +define("_MI_YOUTUBE_STREAM_DESC", "Cerca e visualizza Video Stream da youtube."); + +// preferenze +define("_MI_YOUTUBE_STREAM_CUSTOMKEYWORD", "Parola chiave"); +define("_MI_YOUTUBE_STREAM_CUSTOMKEYWORDDSC", "Parola chiave che sar\xE0 visualizzata all'inizio."); +define("_MI_YOUTUBE_STREAM_MAXSELECT", "Numero massimo selezioni"); +define("_MI_YOUTUBE_STREAM_MAXSELECTDSC", "Numero di video selezionabili da mostrare nella pagina principale."); +define("_MI_YOUTUBE_STREAM_MAXRECORDS", "Numero massimo records"); +define("_MI_YOUTUBE_STREAM_MAXRECORDSDSC", "Numero massimo di records da mostrare nella pagina principale."); + +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.01/youtubestream/language/french/index.html =================================================================== --- XoopsModules/youtubestream/releases/1.01/youtubestream/language/french/index.html (rev 0) +++ XoopsModules/youtubestream/releases/1.01/youtubestream/language/french/index.html 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.01/youtubestream/language/french/modinfo.php =================================================================== --- XoopsModules/youtubestream/releases/1.01/youtubestream/language/french/modinfo.php (rev 0) +++ XoopsModules/youtubestream/releases/1.01/youtubestream/language/french/modinfo.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,26 @@ +<?php +// +// --------------------------------------------------- +// Module: youtube_stream +// File: language/modinfo.php +// Version: 1.0 +// Date-Time: 2008/07/8 15:03:10 +// Author: timgno +// Email: ris...@ne... +// URL: http://www.risorseweb.netsons.org +// --------------------------------------------------- +// + +//info italiano +define("_MI_YOUTUBE_STREAM_NAME", "YouTube Stream"); +define("_MI_YOUTUBE_STREAM_DESC", "Cerca e visualizza Video Stream da youtube."); + +// preferenze +define("_MI_YOUTUBE_STREAM_CUSTOMKEYWORD", "Parola chiave"); +define("_MI_YOUTUBE_STREAM_CUSTOMKEYWORDDSC", "Parola chiave che sar\xE0 visualizzata all'inizio."); +define("_MI_YOUTUBE_STREAM_MAXSELECT", "Numero massimo selezioni"); +define("_MI_YOUTUBE_STREAM_MAXSELECTDSC", "Numero di video selezionabili da mostrare nella pagina principale."); +define("_MI_YOUTUBE_STREAM_MAXRECORDS", "Numero massimo records"); +define("_MI_YOUTUBE_STREAM_MAXRECORDSDSC", "Numero massimo di records da mostrare nella pagina principale."); + +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.01/youtubestream/language/index.html =================================================================== --- XoopsModules/youtubestream/releases/1.01/youtubestream/language/index.html (rev 0) +++ XoopsModules/youtubestream/releases/1.01/youtubestream/language/index.html 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.01/youtubestream/language/italian/index.html =================================================================== --- XoopsModules/youtubestream/releases/1.01/youtubestream/language/italian/index.html (rev 0) +++ XoopsModules/youtubestream/releases/1.01/youtubestream/language/italian/index.html 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.01/youtubestream/language/italian/modinfo.php =================================================================== --- XoopsModules/youtubestream/releases/1.01/youtubestream/language/italian/modinfo.php (rev 0) +++ XoopsModules/youtubestream/releases/1.01/youtubestream/language/italian/modinfo.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,26 @@ +<?php +// +// --------------------------------------------------- +// Module: youtube_stream +// File: language/modinfo.php +// Version: 1.0 +// Date-Time: 2008/07/8 15:03:10 +// Author: timgno +// Email: ris...@ne... +// URL: http://www.risorseweb.netsons.org +// --------------------------------------------------- +// + +//info italiano +define("_MI_YOUTUBE_STREAM_NAME", "YouTube Stream"); +define("_MI_YOUTUBE_STREAM_DESC", "Cerca e visualizza Video Stream da youtube."); + +// preferenze +define("_MI_YOUTUBE_STREAM_CUSTOMKEYWORD", "Parola chiave"); +define("_MI_YOUTUBE_STREAM_CUSTOMKEYWORDDSC", "Parola chiave che sar\xE0 visualizzata all'inizio."); +define("_MI_YOUTUBE_STREAM_MAXSELECT", "Numero massimo selezioni"); +define("_MI_YOUTUBE_STREAM_MAXSELECTDSC", "Numero di video selezionabili da mostrare nella pagina principale."); +define("_MI_YOUTUBE_STREAM_MAXRECORDS", "Numero massimo records"); +define("_MI_YOUTUBE_STREAM_MAXRECORDSDSC", "Numero massimo di records da mostrare nella pagina principale."); + +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.01/youtubestream/xoops_version.php =================================================================== --- XoopsModules/youtubestream/releases/1.01/youtubestream/xoops_version.php (rev 0) +++ XoopsModules/youtubestream/releases/1.01/youtubestream/xoops_version.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,58 @@ +<?php +// +// --------------------------------------------------- +// File: xoops_version.php +// Version: 1.01 +// Date-Time: 2008/07/08 16:03:10 +// Author: timgno +// Email: ris...@ne... +// URL: http://www.risorseweb.netsons.org +// --------------------------------------------------- +// +if (!defined("XOOPS_ROOT_PATH")) { + die("XOOPS root path not defined"); +} +// main +$modversion['name'] = _MI_YOUTUBE_STREAM_NAME; // +$modversion['version'] = 1.01; +$modversion['description'] = _MI_YOUTUBE_STREAM_DESC; // +$modversion['author'] = 'timgno'; +$modversion['credits'] = 'http://risorseweb.netsons.org - http://www.xoopsitalia.org'; +$modversion['help'] = ''; +$modversion['license'] = 'GPL see LICENSE'; +$modversion['official'] = 0; +$modversion['image'] = 'images/youtubestream_slogo.png'; +$modversion['dirname'] = 'youtubestream'; + +// Added by timgno for the About page +$modversion['developer_lead'] = "timgno"; +$modversion['developer_contributor'] = ""; +$modversion['developer_website_url'] = "http://mcdirectory.netsons.org/txmod/"; +$modversion['developer_website_name'] = "TXMod"; +$modversion['developer_email'] = "ris...@ne..."; +$modversion['status_version'] = "Release Candidate"; +$modversion['releasedate'] = "Jun 25th 2008"; +$modversion['status'] = "RC"; +$modversion['date'] = "2008-06-27"; +$modversion['xoopsversion'] = "2.0/2.2/2.3"; + +$modversion['author_realname'] = "<b>Luis Sirio</b>"; + +$modversion['author_website'][1]['name'] = "TXMod"; +$modversion['author_website'][1]['url'] = "http://mcdirectory.netsons.org/txmod/"; +$modversion['author_website'][2]['name'] = "Risorse Web"; +$modversion['author_website'][2]['url'] = "http://www.risorseweb.netsons.org"; + +$modversion['author_email'] = "ris...@ne..."; +$modversion['demo_site_url'] = "http://mcdirectory.netsons.org/txmod/modules/codelink/"; +$modversion['demo_site_name'] = "TXMod"; +$modversion['support_site_url'] = "http://www.xoopsitalia.org"; +$modversion['support_site_name'] = "XoopsItalia"; + +// Admin +$modversion['hasAdmin'] = 0; + +// Main +$modversion['hasMain'] = 1; + +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/admin/about.php =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/admin/about.php (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/admin/about.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,59 @@ +<?php +// +// --------------------------------------------------- +// File: admin/about.php +// Version: 1.0 +// Date-Time: 2008/07/11 14:53:14 +// Author: timgno +// Email: ris...@ne... +// URLs: http://www.risorseweb.netsons.org - http://mcdirectory.netsons.org/txmod/ +// License GNU +// --------------------------------------------------- +// + +include "admin_header.php"; + +xoops_cp_header(); +include "info_header.php"; + +// Author Information +$sform = new XoopsThemeForm(_AM_YOUTUBE_STREAM_AUTHOR_INFO, "", ""); +if ( $versioninfo->getInfo('author_realname')) + $author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")"; +else + $author_name = $versioninfo->getInfo('author'); +$sform -> addElement(new XoopsFormLabel(_AM_YOUTUBE_STREAM_AUTHOR_NAME, $author_name)); +$author_sites = $versioninfo -> getInfo('author_website'); +$author_site_info = ""; +foreach($author_sites as $site){ + $author_site_info .= "<a href='" . $site['url'] . "' target='blank'>" . $site['name'] . "</a>; "; +} +$sform -> addElement(new XoopsFormLabel(_AM_YOUTUBE_STREAM_AUTHOR_WEBSITE, $author_site_info)); +$sform -> addElement(new XoopsFormLabel(_AM_YOUTUBE_STREAM_AUTHOR_EMAIL, "<a href='mailto:" . $versioninfo -> getInfo('author_email') . "'>" . $versioninfo -> getInfo('author_email') . "</a>")); +$sform -> addElement(new XoopsFormLabel(_AM_YOUTUBE_STREAM_AUTHOR_CREDITS, $versioninfo -> getInfo('credits'))); +$sform -> display(); +echo "<br />"; +$sform = new XoopsThemeForm(_AM_YOUTUBE_STREAM_MODULE_INFO, "", ""); +$sform -> addElement(new XoopsFormLabel(_AM_YOUTUBE_STREAM_MODULE_STATUS, $versioninfo -> getInfo('status'))); +$sform -> addElement(new XoopsFormLabel(_AM_YOUTUBE_STREAM_MODULE_XOOPSVERSION, $versioninfo -> getInfo('xoopsversion'))); +$sform -> addElement(new XoopsFormLabel(_AM_YOUTUBE_STREAM_MODULE_DEMO, "<a href='" . $versioninfo -> getInfo('demo_site_url') . "' target='blank'>" . $versioninfo -> getInfo('demo_site_name') . "</a>")); +$sform -> addElement(new XoopsFormLabel(_AM_YOUTUBE_STREAM_MODULE_SUPPORT, "<a href='" . $versioninfo -> getInfo('support_site_url') . "' target='blank'>" . $versioninfo -> getInfo('support_site_name') . "</a>")); +$sform -> display(); +echo "<br />"; +$file = "../readme.txt"; +if (@file_exists($file)) +{ + $fp = @fopen($file, "r"); + $readmetext = @fread($fp, filesize($file)); + @fclose($file); + $sform = new XoopsThemeForm(_AM_YOUTUBE_STREAM_ABOUT, "", ""); + ob_start(); + echo "<div class='even' align='left'>".$myts->displayTarea($readmetext)."</div>"; + $sform -> addElement(new XoopsFormLabel('', ob_get_contents(), 0)); + ob_end_clean(); + $sform -> display(); + unset($file); +} + +xoops_cp_footer(); +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/admin/admin_header.php =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/admin/admin_header.php (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/admin/admin_header.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,27 @@ +<?php +// +// --------------------------------------------------- +// File: admin/admin_header.php +// Version: 1.05 +// Date-Time: 2008/07/11 10:03:11 +// Author: timgno +// Email: ris...@ne... +// URLs: http://www.risorseweb.netsons.org - http://mcdirectory.netsons.org/txmod/ +// License GNU +// --------------------------------------------------- +// +include '../../../mainfile.php'; +include '../../../include/cp_header.php'; + +if ( !file_exists("../language/".$xoopsConfig['language']."/admin.php") ) +{ + include "../language/".$xoopsConfig['language']."/admin.php"; +} + +include_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/class/uploader.php'; + +$myts = &MyTextSanitizer::getInstance(); + +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/admin/index.html =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/admin/index.html (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/admin/index.html 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/admin/index.php =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/admin/index.php (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/admin/index.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,28 @@ +<?php +// +// --------------------------------------------------- +// Module: youtubestream +// File: admin/index.php +// Version: 1.05 +// Date-Time: 2008/07/11 18:00:10 +// Author: timgno +// Email: ris...@ne... +// URL: http://www.risorseweb.netsons.org +// --------------------------------------------------- +// + +include "admin_header.php"; + +xoops_cp_header(); +include "info_header.php"; +global $xoopsModule; +echo "<br /><br />"; +echo "<div style=\"text-align: center; color: #FF0000;\">".$xoopsModule->getVar('name')."</div>"; +echo "<br /><br />"; +echo "<div style=\"text-align: center; color: #ccc; font-weight: bold;\"> + <a href='".XOOPS_URL."/modules/youtubestream/index.php' >"._AM_YOUTUBE_STREAM_GOTOMODULE."</a> | + <a href='".XOOPS_URL."/modules/youtubestream/admin/about.php' >"._AM_YOUTUBE_STREAM_INFO."</a> + </div>"; +xoops_cp_footer(); + +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/admin/info_header.php =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/admin/info_header.php (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/admin/info_header.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,25 @@ +<?php +// +// --------------------------------------------------- +// File: admin/info_header.php +// Version: 1.0 +// Date-Time: 2008/05/11 11:34:40 +// Author: timgno +// Email: ris...@ne... +// URL: http://www.risorseweb.netsons.org +// --------------------------------------------------- +// + +include "admin_header.php"; + +$module_handler =& xoops_gethandler('module'); +$versioninfo =& $module_handler->get($xoopsModule->getVar('mid')); + +// Left headings... +echo "<a href='index.php'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule -> dirname() . "/" . $versioninfo -> getInfo('image') . "' alt='' hspace='10' vspace='0' align='left'></a>"; +echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $versioninfo->getInfo('name') . " ver " . $versioninfo->getInfo('version') . "</div>"; +echo "</div>"; +echo " -------------------------------- "; +echo "<div>" . _AM_YOUTUBE_STREAM_RELEASE . ": " . $versioninfo -> getInfo('releasedate') . "</div><br />"; + +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/admin/menu.php =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/admin/menu.php (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/admin/menu.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,15 @@ +<?php +// +// --------------------------------------------------- +// File: admin/menu.php +// Version: 1.05 +// Date-Time: 2008/07/10 10:00:10 +// Author: timgno +// Email: ris...@ne... +// URLs: http://www.risorseweb.netsons.org - http://mcdirectory.netsons.org/txmod/ +// License GNU +// --------------------------------------------------- +// +$adminmenu[0]['title'] = _MI_YOUTUBE_STREAM_ADMENU0; +$adminmenu[0]['link'] = "admin/about.php"; +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/class/YouTubeAPI =================================================================== (Binary files differ) Property changes on: XoopsModules/youtubestream/releases/1.05/youtubestream/class/YouTubeAPI ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/youtubestream/releases/1.05/youtubestream/class/YouTubeAPI.inc.php =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/class/YouTubeAPI.inc.php (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/class/YouTubeAPI.inc.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,169 @@ +<?php +define("ANY",0); +define("YT",1); +define("PC",2); + +/** + * This class fetching live streaming links of youtube videos, both for mobile (real player) and PC (flash player) + * + *@author timgno http://mcdirectory.netsons.org/txmod/ + *@credit Rochak Chauhan [www.dmwtechnologies.com] + */ +class YouTubeAPI +{ + var $startIndex=1; + var $format=YT; + var $maxResults=50; + var $keyword=""; + var $feedString=""; + + function YouTubeAPI($keyword,$maxResults=50,$startIndex=1,$format=ANY) + { + $this->keyword=$keyword; + $this->format=$format; + $this->maxResults=$maxResults; + $this->startIndex=$startIndex; + $url="http://gdata.youtube.com/feeds/api/videos?vq=$keyword&start-index=$startIndex&max-results=$maxResults"; + $this->feedString=$this->getXmlCodeViaFopen($url); + } + /** + * Function to get the XML code from the YouTubeAPI + * + * @param string $url + * @access private + * + * @return string + */ + function &getXmlCodeViaFopen($url) + { + $returnStr=""; + $fp=fopen($url, "r") or die("ERROR: Illegal YouTube API URL"); + while (!feof($fp)) { + $returnStr.=fgetc($fp); + } + fclose($fp); + return $returnStr; + } + /** + * Function to get the Title from the XML/RSS Feed + * + * @param string $str + * @access private + * @return string + */ + function &getTitle($str) + { + $final=array(); + $returnArray=array(); + $pattern="/<title type='text'>(.*)\<\/title\>/Uis"; + preg_match_all($pattern, $str, $returnArray, PREG_SET_ORDER); + if(isset($returnArray[0][1])) { + return $returnArray[0][1]; + } + else { + return "NA"; + } + } + /** + * Function to get the FLV/SWF url from the XML/RSS Feed + * + * @param string $str + * @access private + * @return string + */ + function &getFlvUrl($str) + { + $final=array(); + $returnArray=array(); + $pattern="/<media:player url='(.*)'/Uis"; + //$pattern="/<media:content url='(.*)' type='application\/x-shockwave-flash'/Uis"; + preg_match_all($pattern, $str, $returnArray, PREG_SET_ORDER); + + if(isset($returnArray[0][1])) { + return $returnArray[0][1]; + } + else { + return "#"; + } + } + /** + * Function to get the mobile streaming url from the XML/RSS Feed + * + * @param string $str + * @access private + * @return string + */ + function &getMobileUrl($str) + { + $final=array(); + $returnArray=array(); + $pattern="/<media:content url='(.*)' type='video\/3gpp'/Uis"; + preg_match_all($pattern, $str, $returnArray, PREG_SET_ORDER); + + if(isset($returnArray[1][1])) { + return $returnArray[1][1]; + } + else { + return "#"; + } + } + /** + * Function to get the video thumbnail from the XML/RSS Feed + * + * @param string $str + * @access private + * @return string + */ + function &getThumbnailUrl($str) + { + $final=array(); + $returnArray=array(); + $pattern="/<media:thumbnail url='(.*)' height='97'/Uis"; + preg_match_all($pattern, $str, $returnArray, PREG_SET_ORDER); + + $rand=rand(0,2); + + if(isset($returnArray[$rand][1])) { + return $returnArray[$rand][1]; + } + else { + return "http://static.fluxstatic.com/-/Clients/Common/Img/ExternalCommunityThumbnails/ExtCommunity_YouTube_Size50x50.jpg"; + } + } + /** + * Function to get Streaming link info + * + * @param string $feed + * @access public + * @return array + */ + function &getStreamingLinks() + { + $feed=$this->feedString; + $final=array(); + $returnArray=array(); + //$pattern="/<title type='text'>(.*)<category scheme=/Uis"; + $pattern="/<title type='text'>(.*)<category scheme='http:\/\/gdata.youtube.com\/schemas\/2007\/keywords.cat'/Uis"; + preg_match_all($pattern, $feed, $returnArray, PREG_SET_ORDER); + + for($i = 1; $i < count($returnArray); $i++) + { + $str=$returnArray[$i][0]; + $title=$this->getTitle($str); + $flvUrl=$this->getFlvUrl($str); + $mobileUrl=$this->getMobileUrl($str); + $thumbnailUrl=$this->getThumbnailUrl($str); + if ($this->format==YT) { + $final[]=array("title"=>$title,"flvurl"=>$flvUrl,"thumbnailUrl"=>$thumbnailUrl); + } + elseif ($this->format==PC) { + $final[]=array("title"=>$title,"mobileurl"=>$mobileUrl,"thumbnailUrl"=>$thumbnailUrl); + } + else { + $final[]=array("title"=>$title,"flvurl"=>$flvUrl,"mobileurl"=>$mobileUrl,"thumbnailUrl"=>$thumbnailUrl); + } + } + return $final; + } +} +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/class/index.html =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/class/index.html (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/class/index.html 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/header.php =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/header.php (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/header.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,5 @@ +<?php + +include_once '../../mainfile.php'; + +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/images/index.html =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/images/index.html (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/images/index.html 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/images/logo-en.png =================================================================== (Binary files differ) Property changes on: XoopsModules/youtubestream/releases/1.05/youtubestream/images/logo-en.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/youtubestream/releases/1.05/youtubestream/images/youtubestream_slogo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/youtubestream/releases/1.05/youtubestream/images/youtubestream_slogo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/youtubestream/releases/1.05/youtubestream/include/functions.php =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/include/functions.php (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/include/functions.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,14 @@ +<?php +// +// Author: timgno http://mcdirectory.netsons.org/txmod/ +// +function numRecords() +{ + +} + +function numOptions() +{ + +} +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/include/index.html =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/include/index.html (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/include/index.html 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/include/vars.php =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/include/vars.php (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/include/vars.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,8 @@ +<?php +// +// +// +define("ANY",0); +define("PC",1); +define("MOBILE",2); +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/index.php =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/index.php (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/index.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,103 @@ +<?php +// +// --------------------------------------------------- +// File: index.php +// Version: 1.05 +// Date-Time: 2008/07/10 10:00:10 +// Author: timgno +// Email: ris...@ne... +// URLs: http://www.risorseweb.netsons.org - http://mcdirectory.netsons.org/txmod/ +// License +// --------------------------------------------------- +// +include('header.php'); +global $xoopsModuleConfig; + +$maxrecords = 5; +$maxselect = 50; +$keyword = $xoopsModuleConfig['custom_keyword']; + +$myts =& MyTextSanitizer::getInstance(); +if (isset($_GET['keyword']) && trim($_GET['keyword'])!="") +{ + $keyword = $myts->stripSlashesGPC(trim($_GET['keyword'])); + $keyword = urlencode($keyword); +} + +if (isset($_GET['maxrecords'])) +{ + $maxrecords = $_GET['maxrecords']; + $xoopsOption['maxrecords'] = intval($_GET['maxrecords']); + if ($xoopsOption['maxrecords'] > $maxselect) + { + $xoopsOption['maxrecords'] = $xoopsModuleConfig['max_records']; + } +} else { + $xoopsOption['maxrecords'] = $xoopsModuleConfig['max_records']; +} +// dichiarazione template principale +$xoopsOption['template_main'] = 'youtubestream.html'; + +include(XOOPS_ROOT_PATH.'/header.php'); + +// Personalizzazione dello stile +$xoTheme->addStylesheet('modules/youtubestream/style/youtubestream.css'); + +$xoopsTpl->assign('lang_slogan', _MD_YOUTUBE_STREAM_SLOGAN); +$xoopsTpl->assign('lang_description', _MD_YOUTUBE_STREAM_DESCRIPTION); +$xoopsTpl->assign('keyword', $keyword); +$xoopsTpl->assign('num_column', $xoopsModuleConfig['num_column']); + +include_once("class/YouTubeAPI.inc.php"); +$api =& new YouTubeAPI($keyword, $xoopsOption['maxrecords'], 1); +$result = $api->getStreamingLinks(); +$total = count($result); +$count = 1; +$videos = array(); +for ($i = 0; $i <= $total; $i++) +{ + $videos['imageSrc'] = $result[$i]['thumbnailUrl']; + $videos['title'] = $result[$i]['title']; + if (isset($result[$i]['flvurl'])) + { + $videos['flvUrl'] = $result[$i]['flvurl']; + } + if (isset($result[$i]['mobileurl'])) + { + $videos['mobileUrl'] = $result[$i]['mobileurl']; + } + $videos['lang_video_title'] = _MD_YOUTUBE_STREAM_VIDEOTITLE; + $videos['lang_streamonyt'] = _MD_YOUTUBE_STREAM_STREAMONYT; + $videos['lang_streamonpc'] = _MD_YOUTUBE_STREAM_STREAMONPC; + + $videos['count'] = $count; + $xoopsTpl->append('videos', $videos); + $count++; +} + +if ($xoopsModuleConfig['displayselect'] == 1 ) +{ + $xoopsTpl->assign('displayselect', true); + + $numrecords_options = ''; + for ( $i = 5; $i <= $maxselect; $i = $i + 5 ) + { + $sel = ''; + if ($i == $xoopsOption['maxrecords']) + { + $sel = ' selected="selected"'; + } + $numrecords_options .= '<option value="'.$i.'"'.$sel.'>'.$i.'</option>'; + } + $xoopsTpl->assign('select_option', $numrecords_options); +} else { + $xoopsTpl->assign('displayselect', false); +} + +$xoopsTpl->assign('lang_search', _MD_YOUTUBE_STREAM_SEARCH); +$xoopsTpl->assign('lang_records', _MD_YOUTUBE_STREAM_RECORDS); + +$xoopsTpl->assign('admin_url', " - <a href='".XOOPS_URL."/modules/youtubestream/admin/index.php'>"._MD_YOUTUBE_STREAM_ADMIN."</a> - "); + +include(XOOPS_ROOT_PATH.'/footer.php'); +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/language/english/admin.php =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/language/english/admin.php (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/language/english/admin.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,30 @@ +<?php +// +// --------------------------------------------------- +// Module: youtubestream +// File: language/admin.php +// Version: 1.0 +// Date-Time: 2008/07/11 15:43:10 +// Author: timgno +// Email: ris...@ne... +// URL: http://www.risorseweb.netsons.org +// --------------------------------------------------- +// + +// info admin +define('_AM_YOUTUBE_STREAM_AUTHOR_INFO', "Author Informations"); +define('_AM_YOUTUBE_STREAM_AUTHOR_NAME', "Author"); +define('_AM_YOUTUBE_STREAM_AUTHOR_WEBSITE', "Author WebSite"); +define('_AM_YOUTUBE_STREAM_AUTHOR_EMAIL', "Author Email"); +define('_AM_YOUTUBE_STREAM_AUTHOR_CREDITS', "Credits"); +define('_AM_YOUTUBE_STREAM_MODULE_INFO', "Module Build Informations"); +define('_AM_YOUTUBE_STREAM_MODULE_STATUS', "Build Status"); +define('_AM_YOUTUBE_STREAM_MODULE_DEMO', "Demo of the module"); +define('_AM_YOUTUBE_STREAM_MODULE_SUPPORT', "Official Support"); +define('_AM_YOUTUBE_STREAM_RELEASE', "Date to release "); +define('_AM_YOUTUBE_STREAM_AUTHOR_BUGFIXES', "Story of bug fix"); +define('_AM_YOUTUBE_STREAM_MODULE_XOOPSVERSION', "Xoops Versions"); +define('_AM_YOUTUBE_STREAM_ABOUT', "Informations Evoluction"); +define('_AM_YOUTUBE_STREAM_GOTOMODULE', "Go to module"); +define('_AM_YOUTUBE_STREAM_INFO', "Info"); +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/language/english/index.html =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/language/english/index.html (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/language/english/index.html 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/language/english/main.php =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/language/english/main.php (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/language/english/main.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,25 @@ +<?php +// +// --------------------------------------------------- +// Module: youtubestream +// File: language/main.php +// Version: 1.05 +// Date-Time: 2008/07/8 15:03:10 +// Author: timgno +// Email: ris...@ne... +// URL: http://www.risorseweb.netsons.org +// --------------------------------------------------- +// + +//info italiano +define("_MD_YOUTUBE_STREAM_SLOGAN", "YouTube Stream with RealPlayer"); +define("_MD_YOUTUBE_STREAM_DESCRIPTION", "Search Video Stream from YouTube simply typing a keyword in the text field to receive a list of so many videos that you can view directly on your PC or on the YouTube site. To view videos use the links under the picture."); +define("_MD_YOUTUBE_STREAM_SEARCH", "Search"); +define("_MD_YOUTUBE_STREAM_RECORDS", "Records"); + +define("_MD_YOUTUBE_STREAM_VIDEOTITLE", "Title"); +define("_MD_YOUTUBE_STREAM_STREAMONYT", "Stream on YouTube"); +define("_MD_YOUTUBE_STREAM_STREAMONPC", "Stream on PC"); + +define("_MD_YOUTUBE_STREAM_ADMIN", "Administraction"); +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/language/english/modinfo.php =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/language/english/modinfo.php (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/language/english/modinfo.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,30 @@ +<?php +// +// --------------------------------------------------- +// Module: youtubestream +// File: language/modinfo.php +// Version: 1.05 +// Date-Time: 2008/07/8 15:03:10 +// Author: timgno +// Email: ris...@ne... +// URL: http://www.risorseweb.netsons.org +// --------------------------------------------------- +// + +//info english +define("_MI_YOUTUBE_STREAM_NAME", "YouTube Stream"); +define("_MI_YOUTUBE_STREAM_DESC", "Search Video Stream from YouTube"); + +// preference +define("_MI_YOUTUBE_STREAM_CUSTOMKEYWORD", "Keywords"); +define("_MI_YOUTUBE_STREAM_CUSTOMKEYWORDDSC", "Keywords which will be displayed at the beginning."); +define('_MI_YOUTUBE_STREAM_DISPLAYSEL', 'Show two box selection?'); +define('_MI_YOUTUBE_STREAM_DISPLAYSELDSC', 'Choose Yes to show two box selection at the top and bottom of the page.'); +define("_MI_YOUTUBE_STREAM_MAXRECORDS", "Maximum results"); +define("_MI_YOUTUBE_STREAM_MAXRECORDSDSC", "Maximum number of results to display on the main page."); +define("_MI_YOUTUBE_STREAM_NUMCOLUMN", "Number horizontal results"); +define("_MI_YOUTUBE_STREAM_NUMCOLUMNDSC", "Number of horizontal results to display on the main page."); + +define("_MI_YOUTUBE_STREAM_ADMENU0","Info on YouTube Stream"); + +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/language/french/admin.php =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/language/french/admin.php (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/language/french/admin.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,30 @@ +<?php +// +// --------------------------------------------------- +// Module: youtubestream +// File: language/admin.php +// Version: 1.0 +// Date-Time: 2008/07/11 15:43:10 +// Author: timgno +// Email: ris...@ne... +// URL: http://www.risorseweb.netsons.org +// --------------------------------------------------- +// + +// info admin +define('_AM_YOUTUBE_STREAM_AUTHOR_INFO', "Informazioni Autore"); +define('_AM_YOUTUBE_STREAM_AUTHOR_NAME', "Autore"); +define('_AM_YOUTUBE_STREAM_AUTHOR_WEBSITE', "Sito Autore"); +define('_AM_YOUTUBE_STREAM_AUTHOR_EMAIL', "Email Autore"); +define('_AM_YOUTUBE_STREAM_AUTHOR_CREDITS', "Crediti"); +define('_AM_YOUTUBE_STREAM_MODULE_INFO', "Informazioni Sviluppo Modulo"); +define('_AM_YOUTUBE_STREAM_MODULE_STATUS', "Stato Sviluppo"); +define('_AM_YOUTUBE_STREAM_MODULE_DEMO', "Demo de module"); +define('_AM_YOUTUBE_STREAM_MODULE_SUPPORT', "Support officiale"); +define('_AM_YOUTUBE_STREAM_RELEASE', "Data di rilascio "); +define('_AM_YOUTUBE_STREAM_AUTHOR_BUGFIXES', "Storia dei bug fissi"); +define('_AM_YOUTUBE_STREAM_MODULE_XOOPSVERSION', "Versione Xoops"); +define('_AM_YOUTUBE_STREAM_ABOUT', "Informationes Evoluctione"); +define('_AM_YOUTUBE_STREAM_GOTOMODULE', "Accuel de module"); +define('_AM_YOUTUBE_STREAM_INFO', "Info"); +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/language/french/index.html =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/language/french/index.html (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/language/french/index.html 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/language/french/main.php =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/language/french/main.php (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/language/french/main.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,26 @@ +<?php +// +// --------------------------------------------------- +// Module: youtubestream +// File: language/main.php +// Version: 1.05 +// Date-Time: 2008/07/8 15:03:10 +// Author: timgno +// Email: ris...@ne... +// URL: http://www.risorseweb.netsons.org +// --------------------------------------------------- +// + +//info french +define("_MD_YOUTUBE_STREAM_SLOGAN", "YouTube Stream avec RealPlayer"); +define("_MD_YOUTUBE_STREAM_DESCRIPTION", "Recherche flux vid\xE9o de YouTube simplement taper un mot-cl\xE9 dans le champ de texte pour recevoir une liste de tant de vid\xE9os que vous pouvez consulter directement sur votre PC ou sur le site YouTube. Pour visionner les vid\xE9os utiliser les liens sous la photo."); +define("_MD_YOUTUBE_STREAM_SEARCH", "Recherche"); +define("_MD_YOUTUBE_STREAM_RECORDS", "Records"); + +define("_MD_YOUTUBE_STREAM_VIDEOTITLE", "Titre"); +define("_MD_YOUTUBE_STREAM_STREAMONYT", "Stream sur YouTube"); +define("_MD_YOUTUBE_STREAM_STREAMONPC", "Stream sur PC"); + +define("_MD_YOUTUBE_STREAM_ADMIN", "Amministraction"); + +?> \ No newline at end of file Added: XoopsModules/youtubestream/releases/1.05/youtubestream/language/french/modinfo.php =================================================================== --- XoopsModules/youtubestream/releases/1.05/youtubestream/language/french/modinfo.php (rev 0) +++ XoopsModules/youtubestream/releases/1.05/youtubestream/language/french/modinfo.php 2012-02-15 13:27:36 UTC (rev 8996) @@ -0,0 +1,30 @@ +<?php +// +// --------------------------------------------------- +// Module: youtubestream +// File: language/modinfo.php +// Version: 1.05 +// Date-Time: 2008/07/8 15:03:10 +// Author: timgno +// Email: ris...@ne... +// URL: http://www.risorseweb.netsons.org +// --------------------------------------------------- +// + +//info french +define("_MI_YOUTUBE_STREAM_NAME", "YouTube Stream"); +define("_MI_YOUTUBE_STREAM_DESC", "Recherche flux vid\xE9o de YouTube"); + +// preference +define("_MI_YOUTUBE_STREAM_CUSTOMKEYWORD", "Mots-cl\xE9s"); +define("_MI_YOUTUBE_STREAM_CUSTOMKEYWORDDSC", "Mots-cl\xE9s qui sera affich\xE9 au d\xE9but."); +define('_MI_YOUTUBE_STREAM_DISPLAYSEL', 'Voir la bo\xEEte de s\xE9lection de deux?'); +define('_MI_YOUTUBE_STREAM_DISPLAYSELDSC', 'Choisissez Oui pour pr\xE9sent... [truncated message content] |
From: <txm...@us...> - 2012-02-15 13:34:41
|
Revision: 8997 http://xoops.svn.sourceforge.net/xoops/?rev=8997&view=rev Author: txmodxoops Date: 2012-02-15 13:34:26 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Module googleearth v1.01, v1.25 Added Paths: ----------- XoopsModules/googleearth/ XoopsModules/googleearth/branches/ XoopsModules/googleearth/releases/ XoopsModules/googleearth/releases/1.01/ XoopsModules/googleearth/releases/1.01/googleearth/ XoopsModules/googleearth/releases/1.01/googleearth/admin/ XoopsModules/googleearth/releases/1.01/googleearth/admin/about.php XoopsModules/googleearth/releases/1.01/googleearth/admin/admin_footer.php XoopsModules/googleearth/releases/1.01/googleearth/admin/admin_header.php XoopsModules/googleearth/releases/1.01/googleearth/admin/index.html XoopsModules/googleearth/releases/1.01/googleearth/admin/index.php XoopsModules/googleearth/releases/1.01/googleearth/admin/menu.php XoopsModules/googleearth/releases/1.01/googleearth/blocks/ XoopsModules/googleearth/releases/1.01/googleearth/blocks/index.html XoopsModules/googleearth/releases/1.01/googleearth/class/ XoopsModules/googleearth/releases/1.01/googleearth/class/index.html XoopsModules/googleearth/releases/1.01/googleearth/class/menu.php XoopsModules/googleearth/releases/1.01/googleearth/class/object.php XoopsModules/googleearth/releases/1.01/googleearth/header.php XoopsModules/googleearth/releases/1.01/googleearth/images/ XoopsModules/googleearth/releases/1.01/googleearth/images/deco/ XoopsModules/googleearth/releases/1.01/googleearth/images/deco/about.png XoopsModules/googleearth/releases/1.01/googleearth/images/deco/arrow.gif XoopsModules/googleearth/releases/1.01/googleearth/images/deco/delete.gif XoopsModules/googleearth/releases/1.01/googleearth/images/deco/edit.gif XoopsModules/googleearth/releases/1.01/googleearth/images/deco/index.html XoopsModules/googleearth/releases/1.01/googleearth/images/deco/index.png XoopsModules/googleearth/releases/1.01/googleearth/images/deco/off.gif XoopsModules/googleearth/releases/1.01/googleearth/images/deco/on.gif XoopsModules/googleearth/releases/1.01/googleearth/images/deco/permissions.png XoopsModules/googleearth/releases/1.01/googleearth/images/deco/pref.png XoopsModules/googleearth/releases/1.01/googleearth/images/deco/update.png XoopsModules/googleearth/releases/1.01/googleearth/images/googleearth_logo.png XoopsModules/googleearth/releases/1.01/googleearth/images/googleearth_slogo.png XoopsModules/googleearth/releases/1.01/googleearth/images/index.html XoopsModules/googleearth/releases/1.01/googleearth/images/menu/ XoopsModules/googleearth/releases/1.01/googleearth/images/menu/bg.png XoopsModules/googleearth/releases/1.01/googleearth/images/menu/index.html XoopsModules/googleearth/releases/1.01/googleearth/images/menu/left_both.png XoopsModules/googleearth/releases/1.01/googleearth/images/menu/right_both.png XoopsModules/googleearth/releases/1.01/googleearth/include/ XoopsModules/googleearth/releases/1.01/googleearth/include/functions.php XoopsModules/googleearth/releases/1.01/googleearth/include/index.html XoopsModules/googleearth/releases/1.01/googleearth/include/install.php XoopsModules/googleearth/releases/1.01/googleearth/index.php XoopsModules/googleearth/releases/1.01/googleearth/language/ XoopsModules/googleearth/releases/1.01/googleearth/language/english/ XoopsModules/googleearth/releases/1.01/googleearth/language/english/admin.php XoopsModules/googleearth/releases/1.01/googleearth/language/english/blocks.php XoopsModules/googleearth/releases/1.01/googleearth/language/english/index.html XoopsModules/googleearth/releases/1.01/googleearth/language/english/main.php XoopsModules/googleearth/releases/1.01/googleearth/language/english/modinfo.php XoopsModules/googleearth/releases/1.01/googleearth/language/french/ XoopsModules/googleearth/releases/1.01/googleearth/language/french/admin.php XoopsModules/googleearth/releases/1.01/googleearth/language/french/blocks.php XoopsModules/googleearth/releases/1.01/googleearth/language/french/index.html XoopsModules/googleearth/releases/1.01/googleearth/language/french/main.php XoopsModules/googleearth/releases/1.01/googleearth/language/french/modinfo.php XoopsModules/googleearth/releases/1.01/googleearth/language/index.html XoopsModules/googleearth/releases/1.01/googleearth/language/italian/ XoopsModules/googleearth/releases/1.01/googleearth/language/italian/admin.php XoopsModules/googleearth/releases/1.01/googleearth/language/italian/blocks.php XoopsModules/googleearth/releases/1.01/googleearth/language/italian/index.html XoopsModules/googleearth/releases/1.01/googleearth/language/italian/main.php XoopsModules/googleearth/releases/1.01/googleearth/language/italian/modinfo.php XoopsModules/googleearth/releases/1.01/googleearth/language/spanish/ XoopsModules/googleearth/releases/1.01/googleearth/language/spanish/admin.php XoopsModules/googleearth/releases/1.01/googleearth/language/spanish/blocks.php XoopsModules/googleearth/releases/1.01/googleearth/language/spanish/index.html XoopsModules/googleearth/releases/1.01/googleearth/language/spanish/main.php XoopsModules/googleearth/releases/1.01/googleearth/language/spanish/modinfo.php XoopsModules/googleearth/releases/1.01/googleearth/sql/ XoopsModules/googleearth/releases/1.01/googleearth/sql/index.html XoopsModules/googleearth/releases/1.01/googleearth/templates/ XoopsModules/googleearth/releases/1.01/googleearth/templates/blocks/ XoopsModules/googleearth/releases/1.01/googleearth/templates/blocks/index.html XoopsModules/googleearth/releases/1.01/googleearth/templates/googleearth.html XoopsModules/googleearth/releases/1.01/googleearth/templates/index.html XoopsModules/googleearth/releases/1.01/googleearth/xoops_version.php XoopsModules/googleearth/releases/1.25/ XoopsModules/googleearth/releases/1.25/gearth/ XoopsModules/googleearth/releases/1.25/gearth/admin/ XoopsModules/googleearth/releases/1.25/gearth/admin/about.php XoopsModules/googleearth/releases/1.25/gearth/admin/admin_footer.php XoopsModules/googleearth/releases/1.25/gearth/admin/admin_header.php XoopsModules/googleearth/releases/1.25/gearth/admin/home.php XoopsModules/googleearth/releases/1.25/gearth/admin/index.html XoopsModules/googleearth/releases/1.25/gearth/admin/index.php XoopsModules/googleearth/releases/1.25/gearth/admin/menu.php XoopsModules/googleearth/releases/1.25/gearth/blocks/ XoopsModules/googleearth/releases/1.25/gearth/blocks/index.html XoopsModules/googleearth/releases/1.25/gearth/changelog.txt XoopsModules/googleearth/releases/1.25/gearth/class/ XoopsModules/googleearth/releases/1.25/gearth/class/index.html XoopsModules/googleearth/releases/1.25/gearth/class/menu.php XoopsModules/googleearth/releases/1.25/gearth/class/object.php XoopsModules/googleearth/releases/1.25/gearth/header.php XoopsModules/googleearth/releases/1.25/gearth/images/ XoopsModules/googleearth/releases/1.25/gearth/images/deco/ XoopsModules/googleearth/releases/1.25/gearth/images/deco/about.png XoopsModules/googleearth/releases/1.25/gearth/images/deco/arrow.gif XoopsModules/googleearth/releases/1.25/gearth/images/deco/delete.gif XoopsModules/googleearth/releases/1.25/gearth/images/deco/edit.gif XoopsModules/googleearth/releases/1.25/gearth/images/deco/index.html XoopsModules/googleearth/releases/1.25/gearth/images/deco/index.png XoopsModules/googleearth/releases/1.25/gearth/images/deco/off.gif XoopsModules/googleearth/releases/1.25/gearth/images/deco/on.gif XoopsModules/googleearth/releases/1.25/gearth/images/deco/permissions.png XoopsModules/googleearth/releases/1.25/gearth/images/deco/pref.png XoopsModules/googleearth/releases/1.25/gearth/images/deco/update.png XoopsModules/googleearth/releases/1.25/gearth/images/gearth_logo.gif XoopsModules/googleearth/releases/1.25/gearth/images/gearth_logo.png XoopsModules/googleearth/releases/1.25/gearth/images/gearth_slogo.png XoopsModules/googleearth/releases/1.25/gearth/images/index.html XoopsModules/googleearth/releases/1.25/gearth/images/menu/ XoopsModules/googleearth/releases/1.25/gearth/images/menu/bg.png XoopsModules/googleearth/releases/1.25/gearth/images/menu/index.html XoopsModules/googleearth/releases/1.25/gearth/images/menu/left_both.png XoopsModules/googleearth/releases/1.25/gearth/images/menu/right_both.png XoopsModules/googleearth/releases/1.25/gearth/images/txmod_logo.png XoopsModules/googleearth/releases/1.25/gearth/include/ XoopsModules/googleearth/releases/1.25/gearth/include/configs.php XoopsModules/googleearth/releases/1.25/gearth/include/functions.php XoopsModules/googleearth/releases/1.25/gearth/include/ginit.js XoopsModules/googleearth/releases/1.25/gearth/include/index.html XoopsModules/googleearth/releases/1.25/gearth/include/install.php XoopsModules/googleearth/releases/1.25/gearth/index.php XoopsModules/googleearth/releases/1.25/gearth/language/ XoopsModules/googleearth/releases/1.25/gearth/language/english/ XoopsModules/googleearth/releases/1.25/gearth/language/english/admin.php XoopsModules/googleearth/releases/1.25/gearth/language/english/blocks.php XoopsModules/googleearth/releases/1.25/gearth/language/english/index.html XoopsModules/googleearth/releases/1.25/gearth/language/english/main.php XoopsModules/googleearth/releases/1.25/gearth/language/english/modinfo.php XoopsModules/googleearth/releases/1.25/gearth/language/french/ XoopsModules/googleearth/releases/1.25/gearth/language/french/admin.php XoopsModules/googleearth/releases/1.25/gearth/language/french/blocks.php XoopsModules/googleearth/releases/1.25/gearth/language/french/index.html XoopsModules/googleearth/releases/1.25/gearth/language/french/main.php XoopsModules/googleearth/releases/1.25/gearth/language/french/modinfo.php XoopsModules/googleearth/releases/1.25/gearth/language/index.html XoopsModules/googleearth/releases/1.25/gearth/language/italian/ XoopsModules/googleearth/releases/1.25/gearth/language/italian/admin.php XoopsModules/googleearth/releases/1.25/gearth/language/italian/blocks.php XoopsModules/googleearth/releases/1.25/gearth/language/italian/index.html XoopsModules/googleearth/releases/1.25/gearth/language/italian/main.php XoopsModules/googleearth/releases/1.25/gearth/language/italian/modinfo.php XoopsModules/googleearth/releases/1.25/gearth/language/spanish/ XoopsModules/googleearth/releases/1.25/gearth/language/spanish/admin.php XoopsModules/googleearth/releases/1.25/gearth/language/spanish/blocks.php XoopsModules/googleearth/releases/1.25/gearth/language/spanish/index.html XoopsModules/googleearth/releases/1.25/gearth/language/spanish/main.php XoopsModules/googleearth/releases/1.25/gearth/language/spanish/modinfo.php XoopsModules/googleearth/releases/1.25/gearth/readme.txt XoopsModules/googleearth/releases/1.25/gearth/sql/ XoopsModules/googleearth/releases/1.25/gearth/sql/index.html XoopsModules/googleearth/releases/1.25/gearth/templates/ XoopsModules/googleearth/releases/1.25/gearth/templates/blocks/ XoopsModules/googleearth/releases/1.25/gearth/templates/blocks/index.html XoopsModules/googleearth/releases/1.25/gearth/templates/gearth_index.html XoopsModules/googleearth/releases/1.25/gearth/templates/index.html XoopsModules/googleearth/releases/1.25/gearth/xoops_version.php XoopsModules/googleearth/trunk/ Added: XoopsModules/googleearth/releases/1.01/googleearth/admin/about.php =================================================================== --- XoopsModules/googleearth/releases/1.01/googleearth/admin/about.php (rev 0) +++ XoopsModules/googleearth/releases/1.01/googleearth/admin/about.php 2012-02-15 13:34:26 UTC (rev 8997) @@ -0,0 +1,116 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Google Earth - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://txmod.netsons.org) + * + * 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 txmod (http://txmod.netsons.org) + * @license GNU GPL + * @package Google Earth + * @author txmod () + * + * Version : 1.00: + * **************************************************************************** + */ + +include_once("admin_header.php"); + +xoops_cp_header(); + +if ( !is_readable(XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php")) { +googleearth_adminmenu(1, _AM_GOOGLEEARTH_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 (1, _AM_GOOGLEEARTH_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_GOOGLEEARTH_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_GOOGLEEARTH_ABOUT_RELEASEDATE.":</label><text>".$versioninfo->getInfo("release")."</text><br /> + <label>"._AM_GOOGLEEARTH_ABOUT_AUTHOR.":</label><text>".$versioninfo->getInfo("author")."</text><br /> + <label>"._AM_GOOGLEEARTH_ABOUT_CREDITS.":</label><text>".$versioninfo->getInfo("credits")."</text><br /> + <label>"._AM_GOOGLEEARTH_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_GOOGLEEARTH_ABOUT_MODULE_INFO."</legend> + <div style=\"padding: 8px;\"> + <label>"._AM_GOOGLEEARTH_ABOUT_MODULE_STATUS.":</label><text>".$versioninfo->getInfo("module_status")."</text><br /> + <label>"._AM_GOOGLEEARTH_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_GOOGLEEARTH_ABOUT_AUTHOR_INFO."</legend> + <div style=\"padding: 8px;\"> + <label>"._AM_GOOGLEEARTH_ABOUT_AUTHOR_NAME.":</label><text>".$versioninfo->getInfo("author")."</text><br /> + <label>"._AM_GOOGLEEARTH_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_GOOGLEEARTH_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/googleearth/releases/1.01/googleearth/admin/admin_footer.php =================================================================== --- XoopsModules/googleearth/releases/1.01/googleearth/admin/admin_footer.php (rev 0) +++ XoopsModules/googleearth/releases/1.01/googleearth/admin/admin_footer.php 2012-02-15 13:34:26 UTC (rev 8997) @@ -0,0 +1,29 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Google Earth - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://txmod.netsons.org) + * + * 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 txmod (http://txmod.netsons.org) + * @license GNU GPL + * @package Google Earth + * @author txmod () + * + * Version : 1.00: + * **************************************************************************** + */ + +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/googleearth/releases/1.01/googleearth/admin/admin_header.php =================================================================== --- XoopsModules/googleearth/releases/1.01/googleearth/admin/admin_header.php (rev 0) +++ XoopsModules/googleearth/releases/1.01/googleearth/admin/admin_header.php 2012-02-15 13:34:26 UTC (rev 8997) @@ -0,0 +1,107 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Google Earth - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://txmod.netsons.org) + * + * 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 txmod (http://txmod.netsons.org) + * @license GNU GPL + * @package Google Earth + * @author txmod () + * + * 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(); + +if ( $xoopsUser ) { + $xoopsModule = XoopsModule::getByDirname("googleearth"); + 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 googleearth_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/googleearth/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/googleearth/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/googleearth/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_GOOGLEEARTH_GENERALSET</a> + | <a href=\"".XOOPS_URL."/modules/googleearth/index.php\">_AM_GOOGLEEARTH_GOINDEX</a> + | <a href=\"".XOOPS_URL."/modules/googleearth/admin/upgrade.php\">_AM_GOOGLEEARTH_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/googleearth/admin/index.php\"><span>_MI_GOOGLEEARTH_MANAGER_INDEX</span></a></li> + + <li id=\"$tblColors[1]\"><a href=\"".XOOPS_URL."/modules/googleearth/admin/permissions.php\"><span>_MI_GOOGLEEARTH_MANAGER_PERMISSIONS</span></a></li> + <li id=\"$tblColors[2]\"><a href=\"".XOOPS_URL."/modules/googleearth/admin/about.php\"><span>_MI_GOOGLEEARTH_MANAGER_ABOUT</span></a></li> + </ul></div>"; +} + + +?> \ No newline at end of file Added: XoopsModules/googleearth/releases/1.01/googleearth/admin/index.html =================================================================== --- XoopsModules/googleearth/releases/1.01/googleearth/admin/index.html (rev 0) +++ XoopsModules/googleearth/releases/1.01/googleearth/admin/index.html 2012-02-15 13:34:26 UTC (rev 8997) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/googleearth/releases/1.01/googleearth/admin/index.php =================================================================== --- XoopsModules/googleearth/releases/1.01/googleearth/admin/index.php (rev 0) +++ XoopsModules/googleearth/releases/1.01/googleearth/admin/index.php 2012-02-15 13:34:26 UTC (rev 8997) @@ -0,0 +1,64 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Google Earth - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://txmod.netsons.org) + * + * 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 txmod (http://txmod.netsons.org) + * @license GNU GPL + * @package Google Earth + * @author txmod () + * + * Version : 1.00: + * **************************************************************************** + */ + +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")) { +googleearth_adminmenu(0, _AM_GOOGLEEARTH_MANAGER_INDEX); +} else { +include_once XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php"; +loadModuleAdminMenu (0, _AM_GOOGLEEARTH_MANAGER_INDEX); +} + +include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->dirname()."/class/menu.php"; + + $menu = new googleearthMenu(); + + $menu->addItem("update", "../../system/admin.php?fct=modulesadmin&op=update&module=googleearth", "../images/deco/update.png", _AM_GOOGLEEARTH_MANAGER_UPDATE); + $menu->addItem("permissions", "permissions.php", "../images/deco/permissions.png", _AM_GOOGLEEARTH_MANAGER_PERMISSIONS); + $menu->addItem("preference", "../../system/admin.php?fct=preferences&op=showmod&mod=".$xoopsModule->getVar("mid"). + "&&confcat_id=1", "../images/deco/pref.png", _AM_GOOGLEEARTH_MANAGER_PREFERENCES); + $menu->addItem("about", "about.php", "../images/deco/about.png", _AM_GOOGLEEARTH_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_GOOGLEEARTH_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 "</td> + </tr> + </table>"; +include_once("admin_footer.php"); +xoops_cp_footer(); + +?> \ No newline at end of file Added: XoopsModules/googleearth/releases/1.01/googleearth/admin/menu.php =================================================================== --- XoopsModules/googleearth/releases/1.01/googleearth/admin/menu.php (rev 0) +++ XoopsModules/googleearth/releases/1.01/googleearth/admin/menu.php 2012-02-15 13:34:26 UTC (rev 8997) @@ -0,0 +1,34 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Google Earth - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://txmod.netsons.org) + * + * 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 txmod (http://txmod.netsons.org) + * @license GNU GPL + * @package Google Earth + * @author txmod () + * + * Version : 1.00: + * **************************************************************************** + */ + +$adminmenu = array(); +$adminmenu[0]["title"] = _MI_GOOGLEEARTH_MANAGER_INDEX; +$adminmenu[0]["link"] = "admin/index.php"; +$adminmenu[1]["title"] = _MI_GOOGLEEARTH_MANAGER_PERMISSIONS; +$adminmenu[1]["link"] = "admin/permissions.php"; + +$adminmenu[2]["title"] = _MI_GOOGLEEARTH_MANAGER_ABOUT; +$adminmenu[2]["link"] = "admin/about.php"; + +?> \ No newline at end of file Added: XoopsModules/googleearth/releases/1.01/googleearth/blocks/index.html =================================================================== --- XoopsModules/googleearth/releases/1.01/googleearth/blocks/index.html (rev 0) +++ XoopsModules/googleearth/releases/1.01/googleearth/blocks/index.html 2012-02-15 13:34:26 UTC (rev 8997) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/googleearth/releases/1.01/googleearth/class/index.html =================================================================== --- XoopsModules/googleearth/releases/1.01/googleearth/class/index.html (rev 0) +++ XoopsModules/googleearth/releases/1.01/googleearth/class/index.html 2012-02-15 13:34:26 UTC (rev 8997) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/googleearth/releases/1.01/googleearth/class/menu.php =================================================================== --- XoopsModules/googleearth/releases/1.01/googleearth/class/menu.php (rev 0) +++ XoopsModules/googleearth/releases/1.01/googleearth/class/menu.php 2012-02-15 13:34:26 UTC (rev 8997) @@ -0,0 +1,176 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Google Earth - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://txmod.netsons.org) + * + * 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 txmod (http://txmod.netsons.org) + * @license GNU GPL + * @package Google Earth + * @author txmod () + * + * Version : 1.00: + * **************************************************************************** + */ + +class googleearthMenu +{ + public $Width = 100; + public $Height = 100; + public $BgColor = "transparent"; + public $OverBgColor = "#FFF6C1"; + public $BorderWidth = 1; + public $BorderColor = "#CCCCCC"; + public $OverBorderColor = "#FF9900"; + public $BorderStyle = "solid"; + public $OverBorderStyle = "solid"; + public $Font = "Tahoma, Arial, Helvetica"; + public $FontColor = "#666666"; + public $OverFontColor = "#1E90FF"; + public $FontDeco = "none"; + public $OverFontDeco = "none"; + public $FontSize = 11; + public $FontWeight = "bold"; + public $FontExtra = "Tahoma, Arial, Helvetica"; + public $FontExtraColor = "#A98952"; + public $OverFontExtraColor = "#0033FF"; + public $FontExtraDeco = "underline"; + public $OverFontExtraDeco = "underline"; + public $FontExtraSize = 9; + public $FontExtraWeight = "normal"; + public $TextAlign = "center"; + private $_items = array(); + + public function addItem($id, $link="", $icon="", $name="", $extra="", $alt=""){ + if (isset($this->_items[$id])) return false; + $rtn["link"] = $link; + $rtn["icon"] = $icon; + $rtn["name"] = $name; + $rtn["extra"] = $extra; + $rtn["alt"] = $alt; + $this->_items[$id] = $rtn; + return true; + } + + public function setLink($id, $link){ + if (isset($this->_items[$id])){ + $this->_items[$id]["link"] = $link; + return true; + } else { + return false; + } + } + + public function setIcon($id, $icon){ + if (isset($this->_items[$id])){ + $this->_items[$id]["icon"] = $icon; + return true; + } else { + return false; + } + } + + public function setName($id, $name){ + if (isset($this->_items[$id])){ + $this->_items[$id]["name"] = $name; + return true; + } else { + return false; + } + } + + public function setExtra($id, $extra){ + if (isset($this->_items[$id])){ + $this->_items[$id]["extra"] = $extra; + return true; + } else { + return false; + } + } + + public function setAlt($id, $alt){ + if (isset($this->_items[$id])){ + $this->_items[$id]["alt"] = $alt; + return true; + } else { + return false; + } + } + + public function getCSS($ws = true){ + if ($ws) $csscode = "<style type=\"text/css\">\n<!--"; + $csscode .= "div.rmmenuicon{ + margin: 3px; + font-family: $this->Font; + text-align: ".$this->TextAlign."; + } + div.rmmenuicon a { + display: block; float: left; + height: ".$this->Height."px !important; + height: ".$this->Height."px; + width: ".$this->Width."px !important; + width: ".$this->Width."px; + vertical-align: middle; + text-decoration : none; + border: ".$this->BorderWidth."px $this->BorderStyle $this->BorderColor; + padding: 2px 5px 1px 5px; + margin: 3px; + color: $this->FontColor; + } + div.rmmenuicon img { margin-top: 8px; margin-bottom: 8px; } + div.rmmenuicon a span { + font-size: ".$this->FontSize."px; + font-weight: $this->FontWeight; + display: block; + } + div.rmmenuicon a span.uno{ + font-size: ".$this->FontExtraSize."px; + font-weight: $this->FontExtraWeight; + text-decoration: $this->FontExtraDeco; + color: $this->FontExtraColor; + } + div.rmmenuicon a:hover{ + background-color: $this->OverBgColor; + border: ".$this->BorderWidth."px $this->BorderStyle $this->OverBorderColor; + color: $this->OverFontColor; + } + div.rmmenuicon a:hover span{ + text-decoration: $this->OverFontDeco; + } + div.rmmenuicon a:hover span.uno{ + text-decoration: $this->OverFontExtraDeco; + color: $this->OverFontExtraColor; + }"; + if ($ws) $csscode .= "\n-->\n</style>"; + return $csscode; + } + + public function render(){ + + $ret = "<div class=\"rmmenuicon\">"; + foreach ($this->_items as $k => $v){ + $ret .= "<a href=\"".$v["link"]."\" title=\"".($v["alt"]!="" ? $v["alt"] : $v["name"])."\">".($v["icon"]!="" ? "<img src=\"".$v["icon"]."\" alt=\"".$v["name"]."\" /> " : ""); + if ($v["name"] != "") $ret .= "<span>".$v["name"]."</span>"; + if ($v["extra"] != "") $ret .= "<span class=\"uno\">".$v["extra"]."</span>"; + if ($v["extra"] != "") $ret .= "<span class=\"uno\">".$v["extra"]."</span>"; + $ret .= "</a>"; + } + $ret .= "</div><div style=\"clear: both;\"></div>"; + return $ret; + } + + public function display(){ + echo $this->render(); + } +} + +?> \ No newline at end of file Added: XoopsModules/googleearth/releases/1.01/googleearth/class/object.php =================================================================== --- XoopsModules/googleearth/releases/1.01/googleearth/class/object.php (rev 0) +++ XoopsModules/googleearth/releases/1.01/googleearth/class/object.php 2012-02-15 13:34:26 UTC (rev 8997) @@ -0,0 +1,412 @@ +<?php +/** + * **************************************************************************** + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * + * Cette licence, contient des limitations!!! + * + * 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. + * + * @license TDM GPL license + * @author TDM TEAM DEV MODULE + * + * **************************************************************************** + */ + +class XoopsPersistableObjectHandler extends XoopsObjectHandler{ + + /** + * Information about the class, the handler is managing + * + * @var string + */ + var $table; + var $keyName; + var $className; + var $identifierName; + + + /** + * Constructor - called from child classes + * @param object $db {@link XoopsDatabase} object + * @param string $tablename Name of database table + * @param string $classname Name of Class, this handler is managing + * @param string $keyname Name of the property, holding the key + * + * @return void + */ + function XoopsPersistableObjectHandler(&$db, $tablename, $classname, $keyname, $idenfierName = false) { + $this->XoopsObjectHandler($db); + $this->table = $db->prefix($tablename); + $this->keyName = $keyname; + $this->className = $classname; + if ($idenfierName != false) { + $this->identifierName = $idenfierName; + } + } + + /** + * create a new user + * + * @param bool $isNew Flag the new objects as "new"? + * + * @return object + */ + function &create($isNew = true) { + $obj =& new $this->className(); + if ($isNew === true) { + $obj->setNew(); + } + return $obj; + } + + /** + * retrieve an object + * + * @param mixed $id ID of the object - or array of ids for joint keys. Joint keys MUST be given in the same order as in the constructor + * @param bool $as_object whether to return an object or an array + * @return mixed reference to the object, FALSE if failed + */ + function &get($id, $as_object=true) { + if (is_array($this->keyName)) { + $criteria = new CriteriaCompo(); + for ($i = 0; $i < count($this->keyName); $i++) { + $criteria->add(new Criteria($this->keyName[$i], intval($id[$i]))); + } + } else { + $criteria = new Criteria($this->keyName, intval($id)); + } + $criteria->setLimit(1); + $obj_array = $this->getObjects($criteria, false, $as_object); + if (count($obj_array) != 1) { + $obj = $this->create(); + return $obj; + } + return $obj_array[0]; + } + + /** + * retrieve objects from the database + * + * @param object $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the ID as key for the array? + * @param bool $as_object return an array of objects? + * + * @return array + */ + function getObjects($criteria=null, $id_as_key=false, $as_object=true){ + $ret = array(); + $limit = $start = 0; + $sql = 'SELECT * FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->getSort() != '') { + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + return $this->convertResultSet($result, $id_as_key, $as_object); + } + + /** + * Convert a database resultset to a returnable array + * + * @param object $result database resultset + * @param bool $id_as_key - should NOT be used with joint keys + * @param bool $as_object + * + * @return array + */ + function convertResultSet($result, $id_as_key = false, $as_object = true) { + $ret = array(); + while ($myrow = $this->db->fetchArray($result)) { + $obj =& $this->create(false); + $obj->assignVars($myrow); + if (!$id_as_key) { + if ($as_object) { + $ret[] =& $obj; + } else { + $row = array(); + $vars = $obj->getVars(); + foreach (array_keys($vars) as $i) { + $row[$i] = $obj->getVar($i); + } + $ret[] = $row; + } + } else { + if ($as_object) { + $ret[$myrow[$this->keyName]] =& $obj; + } else { + $row = array(); + $vars = $obj->getVars(); + foreach (array_keys($vars) as $i) { + $row[$i] = $obj->getVar($i); + } + $ret[$myrow[$this->keyName]] = $row; + } + } + unset($obj); + } + return $ret; + } + + /** + * Retrieve a list of objects as arrays - DON'T USE WITH JOINT KEYS + * + * @param object $criteria {@link CriteriaElement} conditions to be met + * @param int $limit Max number of objects to fetch + * @param int $start Which record to start at + * + * @return array + */ + function getList($criteria = null, $limit = 0, $start = 0) { + $ret = array(); + if ($criteria == null) { + $criteria = new CriteriaCompo(); + } + + if ($criteria->getSort() == '') { + $criteria->setSort($this->identifierName); + } + + $sql = 'SELECT '.$this->keyName; + if(!empty($this->identifierName)){ + $sql .= ', '.$this->identifierName; + } + $sql .= ' FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->getSort() != '') { + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + $myts =& MyTextSanitizer::getInstance(); + while ($myrow = $this->db->fetchArray($result)) { + //identifiers should be textboxes, so sanitize them like that + $ret[$myrow[$this->keyName]] = empty($this->identifierName)?1:$myts->htmlSpecialChars($myrow[$this->identifierName]); + } + return $ret; + } + + /** + * count objects matching a condition + * + * @param object $criteria {@link CriteriaElement} to match + * @return int count of objects + */ + function getCount($criteria=null){ + $field = ""; + $groupby = false; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + if ($criteria->groupby != "") { + $groupby = true; + $field = $criteria->groupby.", "; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used + } + } + $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->groupby != "") { + $sql .= $criteria->getGroupby(); + } + } + $result = $this->db->query($sql); + if (!$result) { + return 0; + } + if ($groupby == false) { + list($count) = $this->db->fetchRow($result); + return $count; + } else { + $ret = array(); + while (list($id, $count) = $this->db->fetchRow($result)) { + $ret[$id] = $count; + } + return $ret; + } + } + + /** + * delete an object from the database + * + * @param object $obj reference to the object to delete + * @param bool $force + * @return bool FALSE if failed. + */ + function delete(&$obj, $force = false){ + if (is_array($this->keyName)) { + $clause = array(); + for ($i = 0; $i < count($this->keyName); $i++) { + $clause[] = $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]); + } + $whereclause = implode(" AND ", $clause); + } else { + $whereclause = $this->keyName." = ".$obj->getVar($this->keyName); + } + $sql = "DELETE FROM ".$this->table." WHERE ".$whereclause; + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } + + /** + * insert a new object in the database + * + * @param object $obj reference to the object + * @param bool $force whether to force the query execution despite security settings + * @param bool $checkObject check if the object is dirty and clean the attributes + * @return bool FALSE if failed, TRUE if already present and unchanged or successful + */ + + function insert(&$obj, $force=false, $checkObject=true){ + if ($checkObject != false) { + if (!is_object($obj)) { + var_dump($obj); + return false; + } + /** + * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5 + */ + if (!is_a($obj, $this->className)) { + $obj->setErrors(get_class($obj)." Differs from ".$this->className); + return false; + } + if (!$obj->isDirty()) { + $obj->setErrors("Not dirty"); //will usually not be outputted as errors are not displayed when the method returns true, but it can be helpful when troubleshooting code - Mith + return true; + } + } + if (!$obj->cleanVars()) { + return false; + } + + foreach ($obj->cleanVars as $k => $v) { + if ($obj->vars[$k]['data_type'] == XOBJ_DTYPE_INT) { + $cleanvars[$k] = intval($v); + } elseif ( is_array( $v ) ) { + $cleanvars[ $k ] = $this->db->quoteString( implode( ',', $v ) ); + } else { + $cleanvars[$k] = $this->db->quoteString($v); + } + } + if ($obj->isNew()) { + if (!is_array($this->keyName)) { + if ($cleanvars[$this->keyName] < 1) { + $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq'); + } + } + $sql = "INSERT INTO ".$this->table." (".implode(',', array_keys($cleanvars)).") VALUES (".implode(',', array_values($cleanvars)) .")"; + } else { + $sql = "UPDATE ".$this->table." SET"; + foreach ($cleanvars as $key => $value) { + if ((!is_array($this->keyName) && $key == $this->keyName) || (is_array($this->keyName) && in_array($key, $this->keyName))) { + continue; + } + if (isset($notfirst) ) { + $sql .= ","; + } + $sql .= " ".$key." = ".$value; + $notfirst = true; + } + if (is_array($this->keyName)) { + $whereclause = ""; + for ($i = 0; $i < count($this->keyName); $i++) { + if ($i > 0) { + $whereclause .= " AND "; + } + $whereclause .= $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]); + } + } else { + $whereclause = $this->keyName." = ".$obj->getVar($this->keyName); + } + $sql .= " WHERE ".$whereclause; + } + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + if ($obj->isNew() && !is_array($this->keyName)) { + $obj->assignVar($this->keyName, $this->db->getInsertId()); + } + return true; + } + + /** + * Change a value for objects with a certain criteria + * + * @param string $fieldname Name of the field + * @param string $fieldvalue Value to write + * @param object $criteria {@link CriteriaElement} + * @return bool + */ + function updateAll($fieldname, $fieldvalue, $criteria = null, $force = false){ + $set_clause = $fieldname . ' = '; + if ( is_numeric( $fieldvalue ) ) { + $set_clause .= $fieldvalue; + } elseif ( is_array( $fieldvalue ) ) { + $set_clause .= $this->db->quoteString( implode( ',', $fieldvalue ) ); + } else { + $set_clause .= $this->db->quoteString( $fieldvalue ); + } + $sql = 'UPDATE '.$this->table.' SET '.$set_clause; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + } + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } + + /** + * delete all objects meeting the conditions + * + * @param object $criteria {@link CriteriaElement} with conditions to meet + * @return bool + */ + function deleteAll($criteria = null){ + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql = 'DELETE FROM '.$this->table; + $sql .= ' '.$criteria->renderWhere(); + if (!$this->db->queryF($sql)) { + return false; + } + $rows = $this->db->getAffectedRows(); + return $rows > 0 ? $rows : true; + } + return false; + } +} +?> \ No newline at end of file Added: XoopsModules/googleearth/releases/1.01/googleearth/header.php =================================================================== --- XoopsModules/googleearth/releases/1.01/googleearth/header.php (rev 0) +++ XoopsModules/googleearth/releases/1.01/googleearth/header.php 2012-02-15 13:34:26 UTC (rev 8997) @@ -0,0 +1,27 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Google Earth - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://txmod.netsons.org) + * + * 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 txmod (http://txmod.netsons.org) + * @license GNU GPL + * @package Google Map Search + * @author txmod (txm...@gm...) + * + * Version : 1.00: + * **************************************************************************** + */ +include("../../mainfile.php"); +global $xoopsTpl, $xoopsModuleConfig; + +?> \ No newline at end of file Added: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/about.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/about.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/arrow.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/arrow.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/delete.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/delete.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/edit.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/edit.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/index.html =================================================================== --- XoopsModules/googleearth/releases/1.01/googleearth/images/deco/index.html (rev 0) +++ XoopsModules/googleearth/releases/1.01/googleearth/images/deco/index.html 2012-02-15 13:34:26 UTC (rev 8997) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/index.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/index.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/off.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/off.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/on.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/on.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/permissions.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/permissions.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/pref.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/pref.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/update.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googleearth/releases/1.01/googleearth/images/deco/update.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googleearth/releases/1.01/googleearth/images/googleearth_logo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googleearth/releases/1.01/googleearth/images/googleearth_logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googleearth/releases/1.01/googleearth/images/googleearth_slogo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googleearth/releases/1.01/googleearth/images/googleearth_slogo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googleearth/releases/1.01/googleearth/images/index.html =================================================================== --- XoopsModules/googleearth/releases/1.01/googleearth/images/index.html (rev 0) +++ XoopsModules/googleearth/releases/1.01/googleearth/images/index.html 2012-02-15 13:34:26 UTC (rev 8997) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/googleearth/releases/1.01/googleearth/images/menu/bg.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googleearth/releases/1.01/googleearth/images/menu/bg.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googleearth/releases/1.01/googleearth/images/menu/index.html =================================================================== --- XoopsModules/googleearth/releases/1.01/googleearth/images/menu/index.html (rev 0) +++ XoopsModules/googleearth/releases/1.01/googleearth/images/menu/index.html 2012-02-15 13:34:26 UTC (rev 8997) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/googleearth/releases/1.01/googleearth/images/menu/left_both.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googleearth/releases/1.01/googleearth/images/menu/left_both.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googleearth/releases/1.01/googleearth/images/menu/right_both.png =================================================================== (Binary files differ) Property changes on: XoopsModules/googleearth/releases/1.01/googleearth/images/menu/right_both.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/googleearth/releases/1.01/googleearth/include/functions.php =================================================================== --- XoopsModules/googleearth/releases/1.01/googleearth/include/functions.php (rev 0) +++ XoopsModules/googleearth/releases/1.01/googleearth/include/functions.php 2012-02-15 13:34:26 UTC (rev 8997) @@ -0,0 +1,44 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * Google Earth - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (http://txmod.netsons.org) + * + * 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 txmod (http://txmod.netsons.org) + * @license GNU GPL + * @package Google Earth + * @author txmod () + * + * Version : 1.00: + * **************************************************************************** + */ + + +/***************Blocks***************/ +function block_addCatSelect($cats) { + if(is_array($cats)) + { + $cat_sql = "(".current($cats); + array_shift($c... [truncated message content] |
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] |
From: <txm...@us...> - 2012-02-15 14:01:27
|
Revision: 8999 http://xoops.svn.sourceforge.net/xoops/?rev=8999&view=rev Author: txmodxoops Date: 2012-02-15 14:01:16 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Module translation v1.01 Added Paths: ----------- XoopsModules/translation/ XoopsModules/translation/branches/ XoopsModules/translation/releases/ XoopsModules/translation/releases/1.01/ XoopsModules/translation/releases/1.01/translation/ XoopsModules/translation/releases/1.01/translation/admin/ XoopsModules/translation/releases/1.01/translation/admin/about.php XoopsModules/translation/releases/1.01/translation/admin/header.php XoopsModules/translation/releases/1.01/translation/admin/index.html XoopsModules/translation/releases/1.01/translation/admin/index.php XoopsModules/translation/releases/1.01/translation/admin/menu.php XoopsModules/translation/releases/1.01/translation/admin/traslator.php XoopsModules/translation/releases/1.01/translation/blocks/ XoopsModules/translation/releases/1.01/translation/blocks/index.html XoopsModules/translation/releases/1.01/translation/changelog.txt XoopsModules/translation/releases/1.01/translation/class/ XoopsModules/translation/releases/1.01/translation/class/index.html XoopsModules/translation/releases/1.01/translation/class/menu.php XoopsModules/translation/releases/1.01/translation/class/object.php XoopsModules/translation/releases/1.01/translation/header.php XoopsModules/translation/releases/1.01/translation/images/ XoopsModules/translation/releases/1.01/translation/images/deco/ XoopsModules/translation/releases/1.01/translation/images/deco/about.png XoopsModules/translation/releases/1.01/translation/images/deco/arrow.gif XoopsModules/translation/releases/1.01/translation/images/deco/delete.gif XoopsModules/translation/releases/1.01/translation/images/deco/edit.gif XoopsModules/translation/releases/1.01/translation/images/deco/index.html XoopsModules/translation/releases/1.01/translation/images/deco/index.png XoopsModules/translation/releases/1.01/translation/images/deco/off.gif XoopsModules/translation/releases/1.01/translation/images/deco/on.gif XoopsModules/translation/releases/1.01/translation/images/deco/permissions.png XoopsModules/translation/releases/1.01/translation/images/deco/pref.png XoopsModules/translation/releases/1.01/translation/images/deco/traslator.png XoopsModules/translation/releases/1.01/translation/images/deco/update.png XoopsModules/translation/releases/1.01/translation/images/index.html XoopsModules/translation/releases/1.01/translation/images/menu/ XoopsModules/translation/releases/1.01/translation/images/menu/bg.png XoopsModules/translation/releases/1.01/translation/images/menu/index.html XoopsModules/translation/releases/1.01/translation/images/menu/left_both.png XoopsModules/translation/releases/1.01/translation/images/menu/right_both.png XoopsModules/translation/releases/1.01/translation/images/translation_logo.png XoopsModules/translation/releases/1.01/translation/images/translation_slogo.png XoopsModules/translation/releases/1.01/translation/images/txmod_logo.png XoopsModules/translation/releases/1.01/translation/include/ XoopsModules/translation/releases/1.01/translation/include/configs.php XoopsModules/translation/releases/1.01/translation/include/functions.php XoopsModules/translation/releases/1.01/translation/include/index.html XoopsModules/translation/releases/1.01/translation/include/install.php XoopsModules/translation/releases/1.01/translation/include/lng.js XoopsModules/translation/releases/1.01/translation/include/style.css XoopsModules/translation/releases/1.01/translation/include/tables.css XoopsModules/translation/releases/1.01/translation/include/tables.js XoopsModules/translation/releases/1.01/translation/index.php XoopsModules/translation/releases/1.01/translation/language/ XoopsModules/translation/releases/1.01/translation/language/english/ XoopsModules/translation/releases/1.01/translation/language/english/admin.php XoopsModules/translation/releases/1.01/translation/language/english/blocks.php XoopsModules/translation/releases/1.01/translation/language/english/index.html XoopsModules/translation/releases/1.01/translation/language/english/main.php XoopsModules/translation/releases/1.01/translation/language/english/modinfo.php XoopsModules/translation/releases/1.01/translation/language/french/ XoopsModules/translation/releases/1.01/translation/language/french/admin.php XoopsModules/translation/releases/1.01/translation/language/french/blocks.php XoopsModules/translation/releases/1.01/translation/language/french/index.html XoopsModules/translation/releases/1.01/translation/language/french/main.php XoopsModules/translation/releases/1.01/translation/language/french/modinfo.php XoopsModules/translation/releases/1.01/translation/language/index.html XoopsModules/translation/releases/1.01/translation/language/italian/ XoopsModules/translation/releases/1.01/translation/language/italian/admin.php XoopsModules/translation/releases/1.01/translation/language/italian/blocks.php XoopsModules/translation/releases/1.01/translation/language/italian/index.html XoopsModules/translation/releases/1.01/translation/language/italian/main.php XoopsModules/translation/releases/1.01/translation/language/italian/modinfo.php XoopsModules/translation/releases/1.01/translation/sql/ XoopsModules/translation/releases/1.01/translation/sql/index.html XoopsModules/translation/releases/1.01/translation/tables.php XoopsModules/translation/releases/1.01/translation/templates/ XoopsModules/translation/releases/1.01/translation/templates/blocks/ XoopsModules/translation/releases/1.01/translation/templates/blocks/index.html XoopsModules/translation/releases/1.01/translation/templates/index.html XoopsModules/translation/releases/1.01/translation/templates/translation_footer.html XoopsModules/translation/releases/1.01/translation/templates/translation_header.html XoopsModules/translation/releases/1.01/translation/templates/translation_index.html XoopsModules/translation/releases/1.01/translation/templates/translation_tables.html XoopsModules/translation/releases/1.01/translation/xoops_version.php XoopsModules/translation/trunk/ Added: XoopsModules/translation/releases/1.01/translation/admin/about.php =================================================================== --- XoopsModules/translation/releases/1.01/translation/admin/about.php (rev 0) +++ XoopsModules/translation/releases/1.01/translation/admin/about.php 2012-02-15 14:01:16 UTC (rev 8999) @@ -0,0 +1,118 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * TRANSLATION - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (web...@tx...) + * + * 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 txmod (http://www.txmodxoops.org) + * @license GNU GPL + * @package Translation + * @author txmod (web...@tx...) + * + * Version : 1.00: + * **************************************************************************** + */ + +include_once("./header.php"); + +xoops_cp_header(); + +if ( !is_readable(XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php")) { +translation_adminmenu(2, _AM_TRANSLATION_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_TRANSLATION_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_TRANSLATION_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_TRANSLATION_ABOUT_RELEASEDATE.":</label><text>".$versioninfo->getInfo("release")."</text><br /> + <label>"._AM_TRANSLATION_ABOUT_AUTHOR.":</label><text>".$versioninfo->getInfo("author")."</text><br /> + <label>"._AM_TRANSLATION_ABOUT_CREDITS.":</label><text>".$versioninfo->getInfo("credits")."</text><br /> + <label>"._AM_TRANSLATION_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_TRANSLATION_ABOUT_MODULE_INFO."</legend> + <div style=\"padding: 8px;\"> + <label>"._AM_TRANSLATION_ABOUT_MODULE_STATUS.":</label><text>".$versioninfo->getInfo("module_status")."</text><br /> + <label>"._AM_TRANSLATION_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_TRANSLATION_ABOUT_AUTHOR_INFO."</legend> + <div style=\"padding: 8px;\"> + <label>"._AM_TRANSLATION_ABOUT_AUTHOR_NAME.":</label><text>".$versioninfo->getInfo("author")."</text><br /> + <label>"._AM_TRANSLATION_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_TRANSLATION_ABOUT_CHANGELOG."</legend> + <div style=\"padding: 8px;\"> + <div>".implode("<br />", file( $file ))."</div> + </div> + </fieldset> + <br clear=\"all\" />"; + +} +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/translation/releases/1.01/translation/admin/header.php =================================================================== --- XoopsModules/translation/releases/1.01/translation/admin/header.php (rev 0) +++ XoopsModules/translation/releases/1.01/translation/admin/header.php 2012-02-15 14:01:16 UTC (rev 8999) @@ -0,0 +1,107 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * TRANSLATION - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (web...@tx...) + * + * 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 txmod (http://www.txmodxoops.org) + * @license GNU GPL + * @package Translation + * @author txmod (web...@tx...) + * + * 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(); + +if ( $xoopsUser ) { + $xoopsModule = XoopsModule::getByDirname("translation"); + 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 translation_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/translation/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/translation/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/translation/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_TRANSLATION_GENERALSET</a> + | <a href=\"".XOOPS_URL."/modules/translation/index.php\">_AM_TRANSLATION_GOINDEX</a> + | <a href=\"".XOOPS_URL."/modules/translation/admin/upgrade.php\">_AM_TRANSLATION_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/translation/admin/index.php\"><span>_MI_TRANSLATION_MANAGER_INDEX</span></a></li> + + <li id=\"$tblColors[1]\"><a href=\"".XOOPS_URL."/modules/translation/admin/permissions.php\"><span>_MI_TRANSLATION_MANAGER_PERMISSIONS</span></a></li> + <li id=\"$tblColors[2]\"><a href=\"".XOOPS_URL."/modules/translation/admin/about.php\"><span>_MI_TRANSLATION_MANAGER_ABOUT</span></a></li> + </ul></div>"; +} + + +?> \ No newline at end of file Added: XoopsModules/translation/releases/1.01/translation/admin/index.html =================================================================== --- XoopsModules/translation/releases/1.01/translation/admin/index.html (rev 0) +++ XoopsModules/translation/releases/1.01/translation/admin/index.html 2012-02-15 14:01:16 UTC (rev 8999) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/translation/releases/1.01/translation/admin/index.php =================================================================== --- XoopsModules/translation/releases/1.01/translation/admin/index.php (rev 0) +++ XoopsModules/translation/releases/1.01/translation/admin/index.php 2012-02-15 14:01:16 UTC (rev 8999) @@ -0,0 +1,63 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * TRANSLATION - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (web...@tx...) + * + * 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 txmod (http://www.txmodxoops.org) + * @license GNU GPL + * @package Translation + * @author txmod (web...@tx...) + * + * Version : 1.00: + * **************************************************************************** + */ + +include_once("./header.php"); + +xoops_cp_header(); + +global $xoopsModule; + +//Apelle du menu admin +if ( !is_readable(XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php")) { +translation_adminmenu(0, _AM_TRANSLATION_MANAGER_INDEX); +} else { +include_once XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php"; +loadModuleAdminMenu (0, _AM_TRANSLATION_MANAGER_INDEX); +} + +include_once XOOPS_ROOT_PATH."/modules/translation/class/menu.php"; + + $menu = new translationMenu(); + $menu->addItem("traslator", "traslator.php", "../images/deco/traslator.png", _AM_TRANSLATION_MANAGER_TRASLATOR); + $menu->addItem("update", "../../system/admin.php?fct=modulesadmin&op=update&module=translation", "../images/deco/update.png", _AM_TRANSLATION_MANAGER_UPDATE); + $menu->addItem("preference", "../../system/admin.php?fct=preferences&op=showmod&mod=".$xoopsModule->getVar("mid"). + "&&confcat_id=1", "../images/deco/pref.png", _AM_TRANSLATION_MANAGER_PREFERENCES); + $menu->addItem("about", "about.php", "../images/deco/about.png", _AM_TRANSLATION_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_TRANSLATION_MANAGER_INDEX."</strong></div><br /> + <table width=\"100%\" border=\"0\" cellspacing=\"10\" cellpadding=\"4\"> + <tr> + <td valign=\"top\" width=\"auto\">".$menu->render()."</td> + <td valign=\"top\" width=\"auto\"></td> + </tr> + </table> +<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/translation/releases/1.01/translation/admin/menu.php =================================================================== --- XoopsModules/translation/releases/1.01/translation/admin/menu.php (rev 0) +++ XoopsModules/translation/releases/1.01/translation/admin/menu.php 2012-02-15 14:01:16 UTC (rev 8999) @@ -0,0 +1,33 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * TRANSLATION - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (web...@tx...) + * + * 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 txmod (http://www.txmodxoops.org) + * @license GNU GPL + * @package Translation + * @author txmod (web...@tx...) + * + * Version : 1.00: + * **************************************************************************** + */ + +$adminmenu = array(); +$adminmenu[0]["title"] = _MI_TRANSLATION_MANAGER_INDEX; +$adminmenu[0]["link"] = "admin/index.php"; +$adminmenu[1]["title"] = _MI_TRANSLATION_MANAGER_TRASLATOR; +$adminmenu[1]["link"] = "admin/traslator.php"; +$adminmenu[2]["title"] = _MI_TRANSLATION_MANAGER_ABOUT; +$adminmenu[2]["link"] = "admin/about.php"; + +?> \ No newline at end of file Added: XoopsModules/translation/releases/1.01/translation/admin/traslator.php =================================================================== --- XoopsModules/translation/releases/1.01/translation/admin/traslator.php (rev 0) +++ XoopsModules/translation/releases/1.01/translation/admin/traslator.php 2012-02-15 14:01:16 UTC (rev 8999) @@ -0,0 +1,63 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * TRANSLATION - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (web...@tx...) + * + * 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 txmod (http://www.txmodxoops.org) + * @license GNU GPL + * @package Translation + * @author txmod (web...@tx...) + * + * Version : 1.00: + * **************************************************************************** + */ + +include_once("./header.php"); + +xoops_cp_header(); + +global $xoopsModule; + +//Apelle du menu admin +if ( !is_readable(XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php")) { +translation_adminmenu(1, _AM_TRANSLATION_MANAGER_TRASLATOR); +} else { +include_once XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php"; +loadModuleAdminMenu (1, _AM_TRANSLATION_MANAGER_TRASLATOR); +} + +include_once XOOPS_ROOT_PATH."/modules/translation/class/menu.php"; + + $menu = new translationMenu(); + $menu->addItem("traslator", "traslator.php", "../images/deco/traslator.png", _AM_TRANSLATION_MANAGER_TRASLATOR); + $menu->addItem("update", "../../system/admin.php?fct=modulesadmin&op=update&module=translation", "../images/deco/update.png", _AM_TRANSLATION_MANAGER_UPDATE); + $menu->addItem("preference", "../../system/admin.php?fct=preferences&op=showmod&mod=".$xoopsModule->getVar("mid"). + "&&confcat_id=1", "../images/deco/pref.png", _AM_TRANSLATION_MANAGER_PREFERENCES); + $menu->addItem("about", "about.php", "../images/deco/about.png", _AM_TRANSLATION_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_TRANSLATION_MANAGER_INDEX."</strong></div><br /> + <table width=\"100%\" border=\"0\" cellspacing=\"10\" cellpadding=\"4\"> + <tr> + <td valign=\"top\" width=\"60%\">".$menu->render()."</td> + <td valign=\"top\" width=\"40%\"></td> + </tr> + </table> +<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/translation/releases/1.01/translation/blocks/index.html =================================================================== --- XoopsModules/translation/releases/1.01/translation/blocks/index.html (rev 0) +++ XoopsModules/translation/releases/1.01/translation/blocks/index.html 2012-02-15 14:01:16 UTC (rev 8999) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/translation/releases/1.01/translation/changelog.txt =================================================================== --- XoopsModules/translation/releases/1.01/translation/changelog.txt (rev 0) +++ XoopsModules/translation/releases/1.01/translation/changelog.txt 2012-02-15 14:01:16 UTC (rev 8999) @@ -0,0 +1,4 @@ +Version 1.01 +--------------------- +. Added Scripts JQuery Library +. Added Source From Google Traslaction Added: XoopsModules/translation/releases/1.01/translation/class/index.html =================================================================== --- XoopsModules/translation/releases/1.01/translation/class/index.html (rev 0) +++ XoopsModules/translation/releases/1.01/translation/class/index.html 2012-02-15 14:01:16 UTC (rev 8999) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/translation/releases/1.01/translation/class/menu.php =================================================================== --- XoopsModules/translation/releases/1.01/translation/class/menu.php (rev 0) +++ XoopsModules/translation/releases/1.01/translation/class/menu.php 2012-02-15 14:01:16 UTC (rev 8999) @@ -0,0 +1,176 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * TRANSLATION - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (web...@tx...) + * + * 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 txmod (http://www.txmodxoops.org) + * @license GNU GPL + * @package Translation + * @author txmod (web...@tx...) + * + * Version : 1.00: + * **************************************************************************** + */ + +class translationMenu +{ + public $Width = 100; + public $Height = 100; + public $BgColor = "transparent"; + public $OverBgColor = "#FFF6C1"; + public $BorderWidth = 1; + public $BorderColor = "#CCCCCC"; + public $OverBorderColor = "#FF9900"; + public $BorderStyle = "solid"; + public $OverBorderStyle = "solid"; + public $Font = "Tahoma, Arial, Helvetica"; + public $FontColor = "#666666"; + public $OverFontColor = "#1E90FF"; + public $FontDeco = "none"; + public $OverFontDeco = "none"; + public $FontSize = 11; + public $FontWeight = "bold"; + public $FontExtra = "Tahoma, Arial, Helvetica"; + public $FontExtraColor = "#A98952"; + public $OverFontExtraColor = "#0033FF"; + public $FontExtraDeco = "underline"; + public $OverFontExtraDeco = "underline"; + public $FontExtraSize = 9; + public $FontExtraWeight = "normal"; + public $TextAlign = "center"; + private $_items = array(); + + public function addItem($id, $link="", $icon="", $name="", $extra="", $alt=""){ + if (isset($this->_items[$id])) return false; + $rtn["link"] = $link; + $rtn["icon"] = $icon; + $rtn["name"] = $name; + $rtn["extra"] = $extra; + $rtn["alt"] = $alt; + $this->_items[$id] = $rtn; + return true; + } + + public function setLink($id, $link){ + if (isset($this->_items[$id])){ + $this->_items[$id]["link"] = $link; + return true; + } else { + return false; + } + } + + public function setIcon($id, $icon){ + if (isset($this->_items[$id])){ + $this->_items[$id]["icon"] = $icon; + return true; + } else { + return false; + } + } + + public function setName($id, $name){ + if (isset($this->_items[$id])){ + $this->_items[$id]["name"] = $name; + return true; + } else { + return false; + } + } + + public function setExtra($id, $extra){ + if (isset($this->_items[$id])){ + $this->_items[$id]["extra"] = $extra; + return true; + } else { + return false; + } + } + + public function setAlt($id, $alt){ + if (isset($this->_items[$id])){ + $this->_items[$id]["alt"] = $alt; + return true; + } else { + return false; + } + } + + public function getCSS($ws = true){ + if ($ws) $csscode = "<style type=\"text/css\">\n<!--"; + $csscode .= "div.rmmenuicon{ + margin: 3px; + font-family: $this->Font; + text-align: ".$this->TextAlign."; + } + div.rmmenuicon a { + display: block; float: left; + height: ".$this->Height."px !important; + height: ".$this->Height."px; + width: ".$this->Width."px !important; + width: ".$this->Width."px; + vertical-align: middle; + text-decoration : none; + border: ".$this->BorderWidth."px $this->BorderStyle $this->BorderColor; + padding: 2px 5px 1px 5px; + margin: 3px; + color: $this->FontColor; + } + div.rmmenuicon img { margin-top: 8px; margin-bottom: 8px; } + div.rmmenuicon a span { + font-size: ".$this->FontSize."px; + font-weight: $this->FontWeight; + display: block; + } + div.rmmenuicon a span.uno{ + font-size: ".$this->FontExtraSize."px; + font-weight: $this->FontExtraWeight; + text-decoration: $this->FontExtraDeco; + color: $this->FontExtraColor; + } + div.rmmenuicon a:hover{ + background-color: $this->OverBgColor; + border: ".$this->BorderWidth."px $this->BorderStyle $this->OverBorderColor; + color: $this->OverFontColor; + } + div.rmmenuicon a:hover span{ + text-decoration: $this->OverFontDeco; + } + div.rmmenuicon a:hover span.uno{ + text-decoration: $this->OverFontExtraDeco; + color: $this->OverFontExtraColor; + }"; + if ($ws) $csscode .= "\n-->\n</style>"; + return $csscode; + } + + public function render(){ + + $ret = "<div class=\"rmmenuicon\">"; + foreach ($this->_items as $k => $v){ + $ret .= "<a href=\"".$v["link"]."\" title=\"".($v["alt"]!="" ? $v["alt"] : $v["name"])."\">".($v["icon"]!="" ? "<img src=\"".$v["icon"]."\" alt=\"".$v["name"]."\" /> " : ""); + if ($v["name"] != "") $ret .= "<span>".$v["name"]."</span>"; + if ($v["extra"] != "") $ret .= "<span class=\"uno\">".$v["extra"]."</span>"; + // if ($v["extra"] != "") $ret .= "<span class=\"uno\">".$v["extra"]."</span>"; + $ret .= "</a>"; + } + $ret .= "</div><div style=\"clear: both;\"></div>"; + return $ret; + } + + public function display(){ + echo $this->render(); + } +} + +?> \ No newline at end of file Added: XoopsModules/translation/releases/1.01/translation/class/object.php =================================================================== --- XoopsModules/translation/releases/1.01/translation/class/object.php (rev 0) +++ XoopsModules/translation/releases/1.01/translation/class/object.php 2012-02-15 14:01:16 UTC (rev 8999) @@ -0,0 +1,412 @@ +<?php +/** + * **************************************************************************** + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * + * Cette licence, contient des limitations!!! + * + * 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. + * + * @license TDM GPL license + * @author TDM TEAM DEV MODULE + * + * **************************************************************************** + */ + +class XoopsPersistableObjectHandler extends XoopsObjectHandler{ + + /** + * Information about the class, the handler is managing + * + * @var string + */ + var $table; + var $keyName; + var $className; + var $identifierName; + + + /** + * Constructor - called from child classes + * @param object $db {@link XoopsDatabase} object + * @param string $tablename Name of database table + * @param string $classname Name of Class, this handler is managing + * @param string $keyname Name of the property, holding the key + * + * @return void + */ + function XoopsPersistableObjectHandler(&$db, $tablename, $classname, $keyname, $idenfierName = false) { + $this->XoopsObjectHandler($db); + $this->table = $db->prefix($tablename); + $this->keyName = $keyname; + $this->className = $classname; + if ($idenfierName != false) { + $this->identifierName = $idenfierName; + } + } + + /** + * create a new user + * + * @param bool $isNew Flag the new objects as "new"? + * + * @return object + */ + function &create($isNew = true) { + $obj =& new $this->className(); + if ($isNew === true) { + $obj->setNew(); + } + return $obj; + } + + /** + * retrieve an object + * + * @param mixed $id ID of the object - or array of ids for joint keys. Joint keys MUST be given in the same order as in the constructor + * @param bool $as_object whether to return an object or an array + * @return mixed reference to the object, FALSE if failed + */ + function &get($id, $as_object=true) { + if (is_array($this->keyName)) { + $criteria = new CriteriaCompo(); + for ($i = 0; $i < count($this->keyName); $i++) { + $criteria->add(new Criteria($this->keyName[$i], intval($id[$i]))); + } + } else { + $criteria = new Criteria($this->keyName, intval($id)); + } + $criteria->setLimit(1); + $obj_array = $this->getObjects($criteria, false, $as_object); + if (count($obj_array) != 1) { + $obj = $this->create(); + return $obj; + } + return $obj_array[0]; + } + + /** + * retrieve objects from the database + * + * @param object $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the ID as key for the array? + * @param bool $as_object return an array of objects? + * + * @return array + */ + function getObjects($criteria=null, $id_as_key=false, $as_object=true){ + $ret = array(); + $limit = $start = 0; + $sql = 'SELECT * FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->getSort() != '') { + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + return $this->convertResultSet($result, $id_as_key, $as_object); + } + + /** + * Convert a database resultset to a returnable array + * + * @param object $result database resultset + * @param bool $id_as_key - should NOT be used with joint keys + * @param bool $as_object + * + * @return array + */ + function convertResultSet($result, $id_as_key = false, $as_object = true) { + $ret = array(); + while ($myrow = $this->db->fetchArray($result)) { + $obj =& $this->create(false); + $obj->assignVars($myrow); + if (!$id_as_key) { + if ($as_object) { + $ret[] =& $obj; + } else { + $row = array(); + $vars = $obj->getVars(); + foreach (array_keys($vars) as $i) { + $row[$i] = $obj->getVar($i); + } + $ret[] = $row; + } + } else { + if ($as_object) { + $ret[$myrow[$this->keyName]] =& $obj; + } else { + $row = array(); + $vars = $obj->getVars(); + foreach (array_keys($vars) as $i) { + $row[$i] = $obj->getVar($i); + } + $ret[$myrow[$this->keyName]] = $row; + } + } + unset($obj); + } + return $ret; + } + + /** + * Retrieve a list of objects as arrays - DON'T USE WITH JOINT KEYS + * + * @param object $criteria {@link CriteriaElement} conditions to be met + * @param int $limit Max number of objects to fetch + * @param int $start Which record to start at + * + * @return array + */ + function getList($criteria = null, $limit = 0, $start = 0) { + $ret = array(); + if ($criteria == null) { + $criteria = new CriteriaCompo(); + } + + if ($criteria->getSort() == '') { + $criteria->setSort($this->identifierName); + } + + $sql = 'SELECT '.$this->keyName; + if(!empty($this->identifierName)){ + $sql .= ', '.$this->identifierName; + } + $sql .= ' FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->getSort() != '') { + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + $myts =& MyTextSanitizer::getInstance(); + while ($myrow = $this->db->fetchArray($result)) { + //identifiers should be textboxes, so sanitize them like that + $ret[$myrow[$this->keyName]] = empty($this->identifierName)?1:$myts->htmlSpecialChars($myrow[$this->identifierName]); + } + return $ret; + } + + /** + * count objects matching a condition + * + * @param object $criteria {@link CriteriaElement} to match + * @return int count of objects + */ + function getCount($criteria=null){ + $field = ""; + $groupby = false; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + if ($criteria->groupby != "") { + $groupby = true; + $field = $criteria->groupby.", "; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used + } + } + $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + if ($criteria->groupby != "") { + $sql .= $criteria->getGroupby(); + } + } + $result = $this->db->query($sql); + if (!$result) { + return 0; + } + if ($groupby == false) { + list($count) = $this->db->fetchRow($result); + return $count; + } else { + $ret = array(); + while (list($id, $count) = $this->db->fetchRow($result)) { + $ret[$id] = $count; + } + return $ret; + } + } + + /** + * delete an object from the database + * + * @param object $obj reference to the object to delete + * @param bool $force + * @return bool FALSE if failed. + */ + function delete(&$obj, $force = false){ + if (is_array($this->keyName)) { + $clause = array(); + for ($i = 0; $i < count($this->keyName); $i++) { + $clause[] = $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]); + } + $whereclause = implode(" AND ", $clause); + } else { + $whereclause = $this->keyName." = ".$obj->getVar($this->keyName); + } + $sql = "DELETE FROM ".$this->table." WHERE ".$whereclause; + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } + + /** + * insert a new object in the database + * + * @param object $obj reference to the object + * @param bool $force whether to force the query execution despite security settings + * @param bool $checkObject check if the object is dirty and clean the attributes + * @return bool FALSE if failed, TRUE if already present and unchanged or successful + */ + + function insert(&$obj, $force=false, $checkObject=true){ + if ($checkObject != false) { + if (!is_object($obj)) { + var_dump($obj); + return false; + } + /** + * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5 + */ + if (!is_a($obj, $this->className)) { + $obj->setErrors(get_class($obj)." Differs from ".$this->className); + return false; + } + if (!$obj->isDirty()) { + $obj->setErrors("Not dirty"); //will usually not be outputted as errors are not displayed when the method returns true, but it can be helpful when troubleshooting code - Mith + return true; + } + } + if (!$obj->cleanVars()) { + return false; + } + + foreach ($obj->cleanVars as $k => $v) { + if ($obj->vars[$k]['data_type'] == XOBJ_DTYPE_INT) { + $cleanvars[$k] = intval($v); + } elseif ( is_array( $v ) ) { + $cleanvars[ $k ] = $this->db->quoteString( implode( ',', $v ) ); + } else { + $cleanvars[$k] = $this->db->quoteString($v); + } + } + if ($obj->isNew()) { + if (!is_array($this->keyName)) { + if ($cleanvars[$this->keyName] < 1) { + $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq'); + } + } + $sql = "INSERT INTO ".$this->table." (".implode(',', array_keys($cleanvars)).") VALUES (".implode(',', array_values($cleanvars)) .")"; + } else { + $sql = "UPDATE ".$this->table." SET"; + foreach ($cleanvars as $key => $value) { + if ((!is_array($this->keyName) && $key == $this->keyName) || (is_array($this->keyName) && in_array($key, $this->keyName))) { + continue; + } + if (isset($notfirst) ) { + $sql .= ","; + } + $sql .= " ".$key." = ".$value; + $notfirst = true; + } + if (is_array($this->keyName)) { + $whereclause = ""; + for ($i = 0; $i < count($this->keyName); $i++) { + if ($i > 0) { + $whereclause .= " AND "; + } + $whereclause .= $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]); + } + } else { + $whereclause = $this->keyName." = ".$obj->getVar($this->keyName); + } + $sql .= " WHERE ".$whereclause; + } + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + if ($obj->isNew() && !is_array($this->keyName)) { + $obj->assignVar($this->keyName, $this->db->getInsertId()); + } + return true; + } + + /** + * Change a value for objects with a certain criteria + * + * @param string $fieldname Name of the field + * @param string $fieldvalue Value to write + * @param object $criteria {@link CriteriaElement} + * @return bool + */ + function updateAll($fieldname, $fieldvalue, $criteria = null, $force = false){ + $set_clause = $fieldname . ' = '; + if ( is_numeric( $fieldvalue ) ) { + $set_clause .= $fieldvalue; + } elseif ( is_array( $fieldvalue ) ) { + $set_clause .= $this->db->quoteString( implode( ',', $fieldvalue ) ); + } else { + $set_clause .= $this->db->quoteString( $fieldvalue ); + } + $sql = 'UPDATE '.$this->table.' SET '.$set_clause; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + } + if (false != $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } + + /** + * delete all objects meeting the conditions + * + * @param object $criteria {@link CriteriaElement} with conditions to meet + * @return bool + */ + function deleteAll($criteria = null){ + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql = 'DELETE FROM '.$this->table; + $sql .= ' '.$criteria->renderWhere(); + if (!$this->db->queryF($sql)) { + return false; + } + $rows = $this->db->getAffectedRows(); + return $rows > 0 ? $rows : true; + } + return false; + } +} +?> \ No newline at end of file Added: XoopsModules/translation/releases/1.01/translation/header.php =================================================================== --- XoopsModules/translation/releases/1.01/translation/header.php (rev 0) +++ XoopsModules/translation/releases/1.01/translation/header.php 2012-02-15 14:01:16 UTC (rev 8999) @@ -0,0 +1,28 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * TRANSLATION - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (web...@tx...) + * + * 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 txmod (http://www.txmodxoops.org) + * @license GNU GPL + * @package Translation + * @author txmod (web...@tx...) + * + * Version : 1.00: + * **************************************************************************** + */ + +include "../../mainfile.php"; +include XOOPS_ROOT_PATH."/modules/translation/include/configs.php"; +include XOOPS_ROOT_PATH."/modules/translation/include/functions.php"; +?> \ No newline at end of file Added: XoopsModules/translation/releases/1.01/translation/images/deco/about.png =================================================================== (Binary files differ) Property changes on: XoopsModules/translation/releases/1.01/translation/images/deco/about.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/translation/releases/1.01/translation/images/deco/arrow.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/translation/releases/1.01/translation/images/deco/arrow.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/translation/releases/1.01/translation/images/deco/delete.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/translation/releases/1.01/translation/images/deco/delete.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/translation/releases/1.01/translation/images/deco/edit.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/translation/releases/1.01/translation/images/deco/edit.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/translation/releases/1.01/translation/images/deco/index.html =================================================================== --- XoopsModules/translation/releases/1.01/translation/images/deco/index.html (rev 0) +++ XoopsModules/translation/releases/1.01/translation/images/deco/index.html 2012-02-15 14:01:16 UTC (rev 8999) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/translation/releases/1.01/translation/images/deco/index.png =================================================================== (Binary files differ) Property changes on: XoopsModules/translation/releases/1.01/translation/images/deco/index.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/translation/releases/1.01/translation/images/deco/off.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/translation/releases/1.01/translation/images/deco/off.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/translation/releases/1.01/translation/images/deco/on.gif =================================================================== (Binary files differ) Property changes on: XoopsModules/translation/releases/1.01/translation/images/deco/on.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/translation/releases/1.01/translation/images/deco/permissions.png =================================================================== (Binary files differ) Property changes on: XoopsModules/translation/releases/1.01/translation/images/deco/permissions.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/translation/releases/1.01/translation/images/deco/pref.png =================================================================== (Binary files differ) Property changes on: XoopsModules/translation/releases/1.01/translation/images/deco/pref.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/translation/releases/1.01/translation/images/deco/traslator.png =================================================================== (Binary files differ) Property changes on: XoopsModules/translation/releases/1.01/translation/images/deco/traslator.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/translation/releases/1.01/translation/images/deco/update.png =================================================================== (Binary files differ) Property changes on: XoopsModules/translation/releases/1.01/translation/images/deco/update.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/translation/releases/1.01/translation/images/index.html =================================================================== --- XoopsModules/translation/releases/1.01/translation/images/index.html (rev 0) +++ XoopsModules/translation/releases/1.01/translation/images/index.html 2012-02-15 14:01:16 UTC (rev 8999) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/translation/releases/1.01/translation/images/menu/bg.png =================================================================== (Binary files differ) Property changes on: XoopsModules/translation/releases/1.01/translation/images/menu/bg.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/translation/releases/1.01/translation/images/menu/index.html =================================================================== --- XoopsModules/translation/releases/1.01/translation/images/menu/index.html (rev 0) +++ XoopsModules/translation/releases/1.01/translation/images/menu/index.html 2012-02-15 14:01:16 UTC (rev 8999) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/translation/releases/1.01/translation/images/menu/left_both.png =================================================================== (Binary files differ) Property changes on: XoopsModules/translation/releases/1.01/translation/images/menu/left_both.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/translation/releases/1.01/translation/images/menu/right_both.png =================================================================== (Binary files differ) Property changes on: XoopsModules/translation/releases/1.01/translation/images/menu/right_both.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/translation/releases/1.01/translation/images/translation_logo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/translation/releases/1.01/translation/images/translation_logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/translation/releases/1.01/translation/images/translation_slogo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/translation/releases/1.01/translation/images/translation_slogo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/translation/releases/1.01/translation/images/txmod_logo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/translation/releases/1.01/translation/images/txmod_logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/translation/releases/1.01/translation/include/configs.php =================================================================== --- XoopsModules/translation/releases/1.01/translation/include/configs.php (rev 0) +++ XoopsModules/translation/releases/1.01/translation/include/configs.php 2012-02-15 14:01:16 UTC (rev 8999) @@ -0,0 +1,52 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * TRANSLATION - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (web...@tx...) + * + * 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 txmod (http://www.txmodxoops.org) + * @license GNU GPL + * @package Translation + * @author txmod (web...@tx...) + * + * Version : 1.00: + * **************************************************************************** + */ + + +if( ! defined( "XOOPS_ROOT_PATH" ) ) exit ; + +$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ; +if( ! preg_match( "/^(\D+)(\d*)$/" , $mydirname , $regs ) ) echo ( "invalid dirname: " . htmlspecialchars( $mydirname ) ) ; +$mydirnumber = $regs[2] === "" ? "" : intval( $regs[2] ) ; + +global $xoopsConfig , $xoopsDB , $xoopsUser, $xoopsModule; + +// module information +$mod_url = XOOPS_URL . "/modules/$mydirname"; +$mod_path = XOOPS_ROOT_PATH . "/modules/$mydirname"; +$mod_img = XOOPS_URL . "/modules/$mydirname/images/translation_logo.png"; +$mod_name = $xoopsModule->getVar('name'); +$mod_admin = "<a href='".XOOPS_URL."/modules/$mydirname/admin/index.php'>"._MD_TRANSLATION_ADMIN."</a>"; +$mod_copyright = "<a href='http://www.txmodxoops.org/' target='_new' title='Powered by TXMod for Xoops'> + <img src='$mod_url/images/txmod_logo.png' alt='".$mod_name."' /></a>"; + +// global language file +$language = $xoopsConfig['language'] ; +if ( file_exists( "$mod_path/language/$language/main.php" ) ) { + include_once "$mod_path/language/$language/main.php" ; +} else { + include_once "$mod_path/language/english/main.php" ; + $language = "english" ; +} + +?> \ No newline at end of file Added: XoopsModules/translation/releases/1.01/translation/include/functions.php =================================================================== --- XoopsModules/translation/releases/1.01/translation/include/functions.php (rev 0) +++ XoopsModules/translation/releases/1.01/translation/include/functions.php 2012-02-15 14:01:16 UTC (rev 8999) @@ -0,0 +1,44 @@ +<?php +/** + * **************************************************************************** + * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net" + * **************************************************************************** + * TRANSLATION - MODULE FOR XOOPS AND IMPRESS CMS + * Copyright (c) txmod (web...@tx...) + * + * 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 credi... [truncated message content] |
From: <wis...@us...> - 2012-02-21 14:30:41
|
Revision: 9040 http://xoops.svn.sourceforge.net/xoops/?rev=9040&view=rev Author: wishcraft Date: 2012-02-21 14:30:29 +0000 (Tue, 21 Feb 2012) Log Message: ----------- samPHPweb - SAM 1.02 - See http://spacialaudio.com for SAM Broadcast the PC Component of this XOOPS Module Added Paths: ----------- XoopsModules/sam/ XoopsModules/sam/releases/ XoopsModules/sam/releases/1.02/ XoopsModules/sam/releases/1.02/modules/ XoopsModules/sam/releases/1.02/modules/sam/ XoopsModules/sam/releases/1.02/modules/sam/admin/ XoopsModules/sam/releases/1.02/modules/sam/admin/about.php XoopsModules/sam/releases/1.02/modules/sam/admin/header.php XoopsModules/sam/releases/1.02/modules/sam/admin/index.php XoopsModules/sam/releases/1.02/modules/sam/admin/menu.php XoopsModules/sam/releases/1.02/modules/sam/blocks/ XoopsModules/sam/releases/1.02/modules/sam/blocks/index.html XoopsModules/sam/releases/1.02/modules/sam/blocks/sam_block_partnerlinks.php XoopsModules/sam/releases/1.02/modules/sam/class/ XoopsModules/sam/releases/1.02/modules/sam/class/adz.php XoopsModules/sam/releases/1.02/modules/sam/class/category.php XoopsModules/sam/releases/1.02/modules/sam/class/categorylist.php XoopsModules/sam/releases/1.02/modules/sam/class/database/ XoopsModules/sam/releases/1.02/modules/sam/class/database/database.php XoopsModules/sam/releases/1.02/modules/sam/class/database/databasefactory.php XoopsModules/sam/releases/1.02/modules/sam/class/database/index.html XoopsModules/sam/releases/1.02/modules/sam/class/database/mysqldatabase.php XoopsModules/sam/releases/1.02/modules/sam/class/disk.php XoopsModules/sam/releases/1.02/modules/sam/class/event.php XoopsModules/sam/releases/1.02/modules/sam/class/eventtime.php XoopsModules/sam/releases/1.02/modules/sam/class/fixedlist.php XoopsModules/sam/releases/1.02/modules/sam/class/fixedlist_item.php XoopsModules/sam/releases/1.02/modules/sam/class/historylist.php XoopsModules/sam/releases/1.02/modules/sam/class/index.html XoopsModules/sam/releases/1.02/modules/sam/class/model/ XoopsModules/sam/releases/1.02/modules/sam/class/model/index.html XoopsModules/sam/releases/1.02/modules/sam/class/model/joint.php XoopsModules/sam/releases/1.02/modules/sam/class/model/read.php XoopsModules/sam/releases/1.02/modules/sam/class/model/sammodel.php XoopsModules/sam/releases/1.02/modules/sam/class/model/stats.php XoopsModules/sam/releases/1.02/modules/sam/class/model/sync.php XoopsModules/sam/releases/1.02/modules/sam/class/model/write.php XoopsModules/sam/releases/1.02/modules/sam/class/object.php XoopsModules/sam/releases/1.02/modules/sam/class/queuelist.php XoopsModules/sam/releases/1.02/modules/sam/class/requestlist.php XoopsModules/sam/releases/1.02/modules/sam/class/songlist.php XoopsModules/sam/releases/1.02/modules/sam/css/ XoopsModules/sam/releases/1.02/modules/sam/css/request.css XoopsModules/sam/releases/1.02/modules/sam/css/request.error.css XoopsModules/sam/releases/1.02/modules/sam/css/songinfo.css XoopsModules/sam/releases/1.02/modules/sam/css/style.css XoopsModules/sam/releases/1.02/modules/sam/docs/ XoopsModules/sam/releases/1.02/modules/sam/docs/changelog.txt XoopsModules/sam/releases/1.02/modules/sam/docs/credits.txt XoopsModules/sam/releases/1.02/modules/sam/docs/index.html XoopsModules/sam/releases/1.02/modules/sam/docs/install.txt XoopsModules/sam/releases/1.02/modules/sam/docs/lang_diff.txt XoopsModules/sam/releases/1.02/modules/sam/docs/licence.txt XoopsModules/sam/releases/1.02/modules/sam/docs/readme.txt XoopsModules/sam/releases/1.02/modules/sam/images/ XoopsModules/sam/releases/1.02/modules/sam/images/buy.png XoopsModules/sam/releases/1.02/modules/sam/images/home.png XoopsModules/sam/releases/1.02/modules/sam/images/index.html XoopsModules/sam/releases/1.02/modules/sam/images/info.png XoopsModules/sam/releases/1.02/modules/sam/images/logo.png XoopsModules/sam/releases/1.02/modules/sam/images/menu/ XoopsModules/sam/releases/1.02/modules/sam/images/menu/email.png XoopsModules/sam/releases/1.02/modules/sam/images/menu/play.png XoopsModules/sam/releases/1.02/modules/sam/images/menu/speaker.png XoopsModules/sam/releases/1.02/modules/sam/images/menu/tb-file-list.png XoopsModules/sam/releases/1.02/modules/sam/images/request.png XoopsModules/sam/releases/1.02/modules/sam/images/sam_slogo.png XoopsModules/sam/releases/1.02/modules/sam/include/ XoopsModules/sam/releases/1.02/modules/sam/include/code.playing.php XoopsModules/sam/releases/1.02/modules/sam/include/code.playlist.php XoopsModules/sam/releases/1.02/modules/sam/include/code.request.php XoopsModules/sam/releases/1.02/modules/sam/include/code.songcheck.php XoopsModules/sam/releases/1.02/modules/sam/include/code.songinfo.php XoopsModules/sam/releases/1.02/modules/sam/include/header.php XoopsModules/sam/releases/1.02/modules/sam/include/index.html XoopsModules/sam/releases/1.02/modules/sam/include/xml.php XoopsModules/sam/releases/1.02/modules/sam/index.php XoopsModules/sam/releases/1.02/modules/sam/js/ XoopsModules/sam/releases/1.02/modules/sam/js/common.js XoopsModules/sam/releases/1.02/modules/sam/js/jquery.corner.js XoopsModules/sam/releases/1.02/modules/sam/language/ XoopsModules/sam/releases/1.02/modules/sam/language/english/ XoopsModules/sam/releases/1.02/modules/sam/language/english/admin.php XoopsModules/sam/releases/1.02/modules/sam/language/english/blocks.php XoopsModules/sam/releases/1.02/modules/sam/language/english/help/ XoopsModules/sam/releases/1.02/modules/sam/language/english/help/help.html XoopsModules/sam/releases/1.02/modules/sam/language/english/help/index.html XoopsModules/sam/releases/1.02/modules/sam/language/english/main.php XoopsModules/sam/releases/1.02/modules/sam/language/english/modinfo.php XoopsModules/sam/releases/1.02/modules/sam/playing.php XoopsModules/sam/releases/1.02/modules/sam/playlist.php XoopsModules/sam/releases/1.02/modules/sam/request.php XoopsModules/sam/releases/1.02/modules/sam/songcheck.js.php XoopsModules/sam/releases/1.02/modules/sam/songinfo.php XoopsModules/sam/releases/1.02/modules/sam/sql/ XoopsModules/sam/releases/1.02/modules/sam/sql/index.html XoopsModules/sam/releases/1.02/modules/sam/templates/ XoopsModules/sam/releases/1.02/modules/sam/templates/blocks/ XoopsModules/sam/releases/1.02/modules/sam/templates/blocks/index.html XoopsModules/sam/releases/1.02/modules/sam/templates/blocks/sam_block_partnerlinks.html XoopsModules/sam/releases/1.02/modules/sam/templates/index.html XoopsModules/sam/releases/1.02/modules/sam/templates/sam_error.html XoopsModules/sam/releases/1.02/modules/sam/templates/sam_footer.html XoopsModules/sam/releases/1.02/modules/sam/templates/sam_header.html XoopsModules/sam/releases/1.02/modules/sam/templates/sam_playing.html XoopsModules/sam/releases/1.02/modules/sam/templates/sam_playlist.html XoopsModules/sam/releases/1.02/modules/sam/templates/sam_request.html XoopsModules/sam/releases/1.02/modules/sam/templates/sam_request_error.html XoopsModules/sam/releases/1.02/modules/sam/templates/sam_songcheck.html XoopsModules/sam/releases/1.02/modules/sam/templates/sam_songinfo.html XoopsModules/sam/releases/1.02/modules/sam/xoops_version.php XoopsModules/sam/releases/1.02/uploads/ XoopsModules/sam/releases/1.02/uploads/sam/ XoopsModules/sam/releases/1.02/uploads/sam/na.png XoopsModules/sam/trunk/ XoopsModules/sam/trunk/modules/ XoopsModules/sam/trunk/modules/sam/ XoopsModules/sam/trunk/modules/sam/admin/ XoopsModules/sam/trunk/modules/sam/admin/about.php XoopsModules/sam/trunk/modules/sam/admin/header.php XoopsModules/sam/trunk/modules/sam/admin/index.php XoopsModules/sam/trunk/modules/sam/admin/menu.php XoopsModules/sam/trunk/modules/sam/blocks/ XoopsModules/sam/trunk/modules/sam/blocks/index.html XoopsModules/sam/trunk/modules/sam/blocks/sam_block_partnerlinks.php XoopsModules/sam/trunk/modules/sam/class/ XoopsModules/sam/trunk/modules/sam/class/adz.php XoopsModules/sam/trunk/modules/sam/class/category.php XoopsModules/sam/trunk/modules/sam/class/categorylist.php XoopsModules/sam/trunk/modules/sam/class/database/ XoopsModules/sam/trunk/modules/sam/class/database/database.php XoopsModules/sam/trunk/modules/sam/class/database/databasefactory.php XoopsModules/sam/trunk/modules/sam/class/database/index.html XoopsModules/sam/trunk/modules/sam/class/database/mysqldatabase.php XoopsModules/sam/trunk/modules/sam/class/disk.php XoopsModules/sam/trunk/modules/sam/class/event.php XoopsModules/sam/trunk/modules/sam/class/eventtime.php XoopsModules/sam/trunk/modules/sam/class/fixedlist.php XoopsModules/sam/trunk/modules/sam/class/fixedlist_item.php XoopsModules/sam/trunk/modules/sam/class/historylist.php XoopsModules/sam/trunk/modules/sam/class/index.html XoopsModules/sam/trunk/modules/sam/class/model/ XoopsModules/sam/trunk/modules/sam/class/model/index.html XoopsModules/sam/trunk/modules/sam/class/model/joint.php XoopsModules/sam/trunk/modules/sam/class/model/read.php XoopsModules/sam/trunk/modules/sam/class/model/sammodel.php XoopsModules/sam/trunk/modules/sam/class/model/stats.php XoopsModules/sam/trunk/modules/sam/class/model/sync.php XoopsModules/sam/trunk/modules/sam/class/model/write.php XoopsModules/sam/trunk/modules/sam/class/object.php XoopsModules/sam/trunk/modules/sam/class/queuelist.php XoopsModules/sam/trunk/modules/sam/class/requestlist.php XoopsModules/sam/trunk/modules/sam/class/songlist.php XoopsModules/sam/trunk/modules/sam/css/ XoopsModules/sam/trunk/modules/sam/css/request.css XoopsModules/sam/trunk/modules/sam/css/request.error.css XoopsModules/sam/trunk/modules/sam/css/songinfo.css XoopsModules/sam/trunk/modules/sam/css/style.css XoopsModules/sam/trunk/modules/sam/docs/ XoopsModules/sam/trunk/modules/sam/docs/changelog.txt XoopsModules/sam/trunk/modules/sam/docs/credits.txt XoopsModules/sam/trunk/modules/sam/docs/index.html XoopsModules/sam/trunk/modules/sam/docs/install.txt XoopsModules/sam/trunk/modules/sam/docs/lang_diff.txt XoopsModules/sam/trunk/modules/sam/docs/licence.txt XoopsModules/sam/trunk/modules/sam/docs/readme.txt XoopsModules/sam/trunk/modules/sam/images/ XoopsModules/sam/trunk/modules/sam/images/buy.png XoopsModules/sam/trunk/modules/sam/images/home.png XoopsModules/sam/trunk/modules/sam/images/index.html XoopsModules/sam/trunk/modules/sam/images/info.png XoopsModules/sam/trunk/modules/sam/images/logo.png XoopsModules/sam/trunk/modules/sam/images/menu/ XoopsModules/sam/trunk/modules/sam/images/menu/email.png XoopsModules/sam/trunk/modules/sam/images/menu/play.png XoopsModules/sam/trunk/modules/sam/images/menu/speaker.png XoopsModules/sam/trunk/modules/sam/images/menu/tb-file-list.png XoopsModules/sam/trunk/modules/sam/images/request.png XoopsModules/sam/trunk/modules/sam/images/sam_slogo.png XoopsModules/sam/trunk/modules/sam/include/ XoopsModules/sam/trunk/modules/sam/include/code.playing.php XoopsModules/sam/trunk/modules/sam/include/code.playlist.php XoopsModules/sam/trunk/modules/sam/include/code.request.php XoopsModules/sam/trunk/modules/sam/include/code.songcheck.php XoopsModules/sam/trunk/modules/sam/include/code.songinfo.php XoopsModules/sam/trunk/modules/sam/include/header.php XoopsModules/sam/trunk/modules/sam/include/index.html XoopsModules/sam/trunk/modules/sam/include/xml.php XoopsModules/sam/trunk/modules/sam/index.php XoopsModules/sam/trunk/modules/sam/js/ XoopsModules/sam/trunk/modules/sam/js/common.js XoopsModules/sam/trunk/modules/sam/js/jquery.corner.js XoopsModules/sam/trunk/modules/sam/language/ XoopsModules/sam/trunk/modules/sam/language/english/ XoopsModules/sam/trunk/modules/sam/language/english/admin.php XoopsModules/sam/trunk/modules/sam/language/english/blocks.php XoopsModules/sam/trunk/modules/sam/language/english/help/ XoopsModules/sam/trunk/modules/sam/language/english/help/help.html XoopsModules/sam/trunk/modules/sam/language/english/help/index.html XoopsModules/sam/trunk/modules/sam/language/english/main.php XoopsModules/sam/trunk/modules/sam/language/english/modinfo.php XoopsModules/sam/trunk/modules/sam/playing.php XoopsModules/sam/trunk/modules/sam/playlist.php XoopsModules/sam/trunk/modules/sam/request.php XoopsModules/sam/trunk/modules/sam/songcheck.js.php XoopsModules/sam/trunk/modules/sam/songinfo.php XoopsModules/sam/trunk/modules/sam/sql/ XoopsModules/sam/trunk/modules/sam/sql/index.html XoopsModules/sam/trunk/modules/sam/templates/ XoopsModules/sam/trunk/modules/sam/templates/blocks/ XoopsModules/sam/trunk/modules/sam/templates/blocks/index.html XoopsModules/sam/trunk/modules/sam/templates/blocks/sam_block_partnerlinks.html XoopsModules/sam/trunk/modules/sam/templates/index.html XoopsModules/sam/trunk/modules/sam/templates/sam_error.html XoopsModules/sam/trunk/modules/sam/templates/sam_footer.html XoopsModules/sam/trunk/modules/sam/templates/sam_header.html XoopsModules/sam/trunk/modules/sam/templates/sam_playing.html XoopsModules/sam/trunk/modules/sam/templates/sam_playlist.html XoopsModules/sam/trunk/modules/sam/templates/sam_request.html XoopsModules/sam/trunk/modules/sam/templates/sam_request_error.html XoopsModules/sam/trunk/modules/sam/templates/sam_songcheck.html XoopsModules/sam/trunk/modules/sam/templates/sam_songinfo.html XoopsModules/sam/trunk/modules/sam/xoops_version.php XoopsModules/sam/trunk/uploads/ XoopsModules/sam/trunk/uploads/sam/ XoopsModules/sam/trunk/uploads/sam/na.png Added: XoopsModules/sam/releases/1.02/modules/sam/admin/about.php =================================================================== --- XoopsModules/sam/releases/1.02/modules/sam/admin/about.php (rev 0) +++ XoopsModules/sam/releases/1.02/modules/sam/admin/about.php 2012-02-21 14:30:29 UTC (rev 9040) @@ -0,0 +1,76 @@ +<?php +// $Id: about.php 5204 2010-09-06 20:10:52Z mageg $ +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +// Author: XOOPS Foundation // +// URL: http://www.xoops.org/ // +// Project: The XOOPS Project // +// ------------------------------------------------------------------------- // + + include ('header.php'); + xoops_loadLanguage('admin', 'sam'); + + xoops_cp_header(); + + $aboutAdmin = new ModuleAdmin(); + echo $aboutAdmin->addNavigation('admin/about.php'); + + $paypalitemno='SAM175'; + $about = $aboutAdmin->renderabout($paypalitemno, false); + $donationform = array( 0 => '<form name="donation" id="donation" action="http://www.chronolabs.coop/modules/xpayment/" method="post" onsubmit="return xoopsFormValidate_donation();">', + 1 => '<table class="outer" cellspacing="1" width="100%"><tbody><tr><th colspan="2">'.constant('_AM_SAM_ABOUT_MAKEDONATE').'</th></tr><tr align="left" valign="top"><td class="head"><div class="xoops-form-element-caption-required"><span class="caption-text">Donation Amount</span><span class="caption-marker">*</span></div></td><td class="even"><select size="1" name="item[A][amount]" id="item[A][amount]" title="Donation Amount"><option value="5">5.00 AUD</option><option value="10">10.00 AUD</option><option value="20">20.00 AUD</option><option value="40">40.00 AUD</option><option value="60">60.00 AUD</option><option value="80">80.00 AUD</option><option value="90">90.00 AUD</option><option value="100">100.00 AUD</option><option value="200">200.00 AUD</option></select></td></tr><tr align="left" valign="top"><td class="head"></td><td class="even"><input class="formButton" name="submit" id="submit" value="'._SUBMIT.'" title="'._SUBMIT.'" type="submit"></td></tr></tbody></table>', + 2 => '<input name="op" id="op" value="createinvoice" type="hidden"><input name="plugin" id="plugin" value="donations" type="hidden"><input name="donation" id="donation" value="1" type="hidden"><input name="drawfor" id="drawfor" value="Chronolabs Co-Operative" type="hidden"><input name="drawto" id="drawto" value="%s" type="hidden"><input name="drawto_email" id="drawto_email" value="%s" type="hidden"><input name="key" id="key" value="%s" type="hidden"><input name="currency" id="currency" value="AUD" type="hidden"><input name="weight_unit" id="weight_unit" value="kgs" type="hidden"><input name="item[A][cat]" id="item[A][cat]" value="XDN%s" type="hidden"><input name="item[A][name]" id="item[A][name]" value="Donation for %s" type="hidden"><input name="item[A][quantity]" id="item[A][quantity]" value="1" type="hidden"><input name="item[A][shipping]" id="item[A][shipping]" value="0" type="hidden"><input name="item[A][handling]" id="item[A][handling]" value="0" type="hidden"><input name="item[A][weight]" id="item[A][weight]" value="0" type="hidden"><input name="item[A][tax]" id="item[A][tax]" value="0" type="hidden"><input name="return" id="return" value="http://www.chronolabs.coop/modules/donations/success.php" type="hidden"><input name="cancel" id="cancel" value="http://www.chronolabs.coop/modules/donations/success.php" type="hidden"></form>', 'D'=>'', + 3 => '', + 4 => '<!-- Start Form Validation JavaScript //--> +<script type="text/javascript"> +<!--// +function xoopsFormValidate_donation() { var myform = window.document.donation; +var hasSelected = false; var selectBox = myform.item[A][amount];for (i = 0; i < selectBox.options.length; i++ ) { if (selectBox.options[i].selected == true && selectBox.options[i].value != \'\') { hasSelected = true; break; } }if (!hasSelected) { window.alert("Please enter Donation Amount"); selectBox.focus(); return false; }return true; +} +//--></script> +<!-- End Form Validation JavaScript //-->'); + $paypalform = array( 0 => '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">', + 1 => '<input name="cmd" value="_s-xclick" type="hidden">', + 2 => '<input name="hosted_button_id" value="%s" type="hidden">', + 3 => '<img alt="" src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" height="1" border="0" width="1">', + 4 => '<input src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" border="0" type="image">', + 5 => '</form>'); + for($key=0;$key<=4;$key++) { + switch ($key) { + case 2: + $donationform[$key] = sprintf($donationform[$key], $GLOBALS['xoopsConfig']['sitename'] . ' - ' . (strlen($GLOBALS['xoopsUser']->getVar('name'))>0?$GLOBALS['xoopsUser']->getVar('name'). ' ['.$GLOBALS['xoopsUser']->getVar('uname').']':$GLOBALS['xoopsUser']->getVar('uname')), $GLOBALS['xoopsUser']->getVar('email'), XOOPS_LICENSE_KEY, strtoupper($GLOBALS['samModule']->getVar('dirname')), strtoupper($GLOBALS['samModule']->getVar('dirname')). ' '.$GLOBALS['samModule']->getVar('name')); + break; + } + } + + $istart = strpos($about, ($paypalform[0]), 1); + $iend = strpos($about, ($paypalform[5]), $istart+1)+strlen($paypalform[5])-1; + echo (substr($about, 0, $istart-1)); + echo implode("\n", $donationform); + echo (substr($about, $iend+1, strlen($about)-$iend-1)); + + xoops_cp_footer(); + +?> \ No newline at end of file Added: XoopsModules/sam/releases/1.02/modules/sam/admin/header.php =================================================================== --- XoopsModules/sam/releases/1.02/modules/sam/admin/header.php (rev 0) +++ XoopsModules/sam/releases/1.02/modules/sam/admin/header.php 2012-02-21 14:30:29 UTC (rev 9040) @@ -0,0 +1,54 @@ +<?php + + require_once (dirname(dirname(dirname(dirname(__FILE__)))).'/include/cp_header.php'); + + if (!defined('_CHARSET')) + define ("_CHARSET","UTF-8"); + if (!defined('_CHARSET_ISO')) + define ("_CHARSET_ISO","ISO-8859-1"); + + $GLOBALS['myts'] = MyTextSanitizer::getInstance(); + + $module_handler = xoops_gethandler('module'); + $config_handler = xoops_gethandler('config'); + $GLOBALS['samModule'] = $module_handler->getByDirname('sam'); + $GLOBALS['samModuleConfig'] = $config_handler->getConfigList($GLOBALS['samModule']->getVar('mid')); + + xoops_load('pagenav'); + xoops_load('xoopslists'); + xoops_load('xoopsformloader'); + + include_once $GLOBALS['xoops']->path('class'.DS.'xoopsmailer.php'); + include_once $GLOBALS['xoops']->path('class'.DS.'xoopstree.php'); + + if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))){ + include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'); + }else{ + echo xoops_error("Error: You don't use the Frameworks \"admin module\". Please install this Frameworks"); + } + + $GLOBALS['samImageIcon'] = XOOPS_URL .'/'. $GLOBALS['samModule']->getInfo('icons16'); + $GLOBALS['samImageAdmin'] = XOOPS_URL .'/'. $GLOBALS['samModule']->getInfo('icons32'); + + if ($GLOBALS['xoopsUser']) { + $moduleperm_handler =& xoops_gethandler('groupperm'); + if (!$moduleperm_handler->checkRight('module_admin', $GLOBALS['samModule']->getVar( 'mid' ), $GLOBALS['xoopsUser']->getGroups())) { + redirect_header(XOOPS_URL, 1, _NOPERM); + exit(); + } + } else { + redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); + exit(); + } + + if (!isset($GLOBALS['xoopsTpl']) || !is_object($GLOBALS['xoopsTpl'])) { + include_once(XOOPS_ROOT_PATH."/class/template.php"); + $GLOBALS['xoopsTpl'] = new XoopsTpl(); + } + + $GLOBALS['xoopsTpl']->assign('pathImageIcon', $GLOBALS['samImageIcon']); + $GLOBALS['xoopsTpl']->assign('pathImageAdmin', $GLOBALS['samImageAdmin']); + + error_reporting(E_ALL); + +?> \ No newline at end of file Added: XoopsModules/sam/releases/1.02/modules/sam/admin/index.php =================================================================== --- XoopsModules/sam/releases/1.02/modules/sam/admin/index.php (rev 0) +++ XoopsModules/sam/releases/1.02/modules/sam/admin/index.php 2012-02-21 14:30:29 UTC (rev 9040) @@ -0,0 +1,70 @@ +<?php +// $Id: directory.php 5204 2010-09-06 20:10:52Z mageg $ +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +// Author: XOOPS Foundation // +// URL: http://www.xoops.org/ // +// Project: The XOOPS Project // +// ------------------------------------------------------------------------- // + + include ('header.php'); + xoops_loadLanguage('admin', 'sam'); + + xoops_cp_header(); + + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation('admin/index.php'); + + $indexAdmin = new ModuleAdmin(); + + if (empty($GLOBALS['samModuleConfig']['db_type'])||empty($GLOBALS['samModuleConfig']['db_host'])||empty($GLOBALS['samModuleConfig']['db_name'])||empty($GLOBALS['samModuleConfig']['db_user'])||empty($GLOBALS['samModuleConfig']['db_pass'])||empty($GLOBALS['samModuleConfig']['db_charset'])||empty($GLOBALS['samModuleConfig']['sam_host'])||empty($GLOBALS['samModuleConfig']['sam_port'])) { + $indexAdmin->addInfoBox(_AM_SAM_PREF_NEEDTOBESET); + $indexAdmin->addInfoBoxLine(_AM_SAM_PREF_NEEDTOBESET, "<label>"._AM_SAM_PREF_DB_TYPE."</label>", empty($GLOBALS['samModuleConfig']['db_type'])?_NO:_YES, empty($GLOBALS['samModuleConfig']['db_type'])?'Red':'Green'); + $indexAdmin->addInfoBoxLine(_AM_SAM_PREF_NEEDTOBESET, "<label>"._AM_SAM_PREF_DB_HOST."</label>", empty($GLOBALS['samModuleConfig']['db_host'])?_NO:_YES, empty($GLOBALS['samModuleConfig']['db_host'])?'Red':'Green'); + $indexAdmin->addInfoBoxLine(_AM_SAM_PREF_NEEDTOBESET, "<label>"._AM_SAM_PREF_DB_NAME."</label>", empty($GLOBALS['samModuleConfig']['db_name'])?_NO:_YES, empty($GLOBALS['samModuleConfig']['db_name'])?'Red':'Green'); + $indexAdmin->addInfoBoxLine(_AM_SAM_PREF_NEEDTOBESET, "<label>"._AM_SAM_PREF_DB_USER."</label>", empty($GLOBALS['samModuleConfig']['db_user'])?_NO:_YES, empty($GLOBALS['samModuleConfig']['db_user'])?'Red':'Green'); + $indexAdmin->addInfoBoxLine(_AM_SAM_PREF_NEEDTOBESET, "<label>"._AM_SAM_PREF_DB_PASS."</label>", empty($GLOBALS['samModuleConfig']['db_pass'])?_NO:_YES, empty($GLOBALS['samModuleConfig']['db_pass'])?'Red':'Green'); + $indexAdmin->addInfoBoxLine(_AM_SAM_PREF_NEEDTOBESET, "<label>"._AM_SAM_PREF_DB_CHARSET."</label>", empty($GLOBALS['samModuleConfig']['db_charset'])?_NO:_YES, empty($GLOBALS['samModuleConfig']['db_charset'])?'Red':'Green'); + $indexAdmin->addInfoBoxLine(_AM_SAM_PREF_NEEDTOBESET, "<label>"._AM_SAM_PREF_SAM_HOST."</label>", empty($GLOBALS['samModuleConfig']['sam_host'])?_NO:_YES, empty($GLOBALS['samModuleConfig']['sam_host'])?'Red':'Green'); + $indexAdmin->addInfoBoxLine(_AM_SAM_PREF_NEEDTOBESET, "<label>"._AM_SAM_PREF_SAM_PORT."</label>", empty($GLOBALS['samModuleConfig']['sam_port'])?_NO:_YES, empty($GLOBALS['samModuleConfig']['sam_port'])?'Red':'Green'); + } else { + $songlist_handler = xoops_getmodulehandler('songlist', 'sam'); + $requestlist_handler = xoops_getmodulehandler('requestlist', 'sam'); + $indexAdmin->addInfoBox(_AM_SAM_COUNTS); + $indexAdmin->addInfoBoxLine(_AM_SAM_COUNTS, "<label>"._AM_SAM_THEREARE_SONGS."</label>", $songlist_handler->getCount(NULL), 'Green'); + $indexAdmin->addInfoBoxLine(_AM_SAM_COUNTS, "<label>"._AM_SAM_THEREARE_BROADCAST_SONGS."</label>", $songlist_handler->getCount(new Criteria('`songrights`', 'broadcast')), 'Green'); + $indexAdmin->addInfoBoxLine(_AM_SAM_COUNTS, "<label>"._AM_SAM_THEREARE_DOWNLOAD_SONGS."</label>", $songlist_handler->getCount(new Criteria('`songrights`', 'download')), 'Green'); + $indexAdmin->addInfoBoxLine(_AM_SAM_COUNTS, "<label>"._AM_SAM_THEREARE_ONDEMAND_SONGS."</label>", $songlist_handler->getCount(new Criteria('`songrights`', 'on-demand')), 'Green'); + $indexAdmin->addInfoBoxLine(_AM_SAM_COUNTS, "<label>"._AM_SAM_THEREARE_ROAYALTYFREE_SONGS."</label>", $songlist_handler->getCount(new Criteria('`songrights`', 'royaltyfree')), 'Green'); + $indexAdmin->addInfoBoxLine(_AM_SAM_COUNTS, "<label>"._AM_SAM_THEREARE_REQUESTS."</label>", $requestlist_handler->getCount(NULL), 'Orange'); + $indexAdmin->addInfoBoxLine(_AM_SAM_COUNTS, "<label>"._AM_SAM_THEREARE_NEW_REQUESTS."</label>", $requestlist_handler->getCount(new Criteria('`status`', 'new')), 'Orange'); + $indexAdmin->addInfoBoxLine(_AM_SAM_COUNTS, "<label>"._AM_SAM_THEREARE_PENDING_REQUESTS."</label>", $requestlist_handler->getCount(new Criteria('`status`', 'pending')), 'Orange'); + $indexAdmin->addInfoBoxLine(_AM_SAM_COUNTS, "<label>"._AM_SAM_THEREARE_IGNORED_REQUESTS."</label>", $requestlist_handler->getCount(new Criteria('`status`', 'ignored')), 'Orange'); + $indexAdmin->addInfoBoxLine(_AM_SAM_COUNTS, "<label>"._AM_SAM_THEREARE_PLAYED_REQUESTS."</label>", $requestlist_handler->getCount(new Criteria('`status`', 'played')), 'Orange'); + } + echo $indexAdmin->renderIndex(); + xoops_cp_footer(); + +?> \ No newline at end of file Added: XoopsModules/sam/releases/1.02/modules/sam/admin/menu.php =================================================================== --- XoopsModules/sam/releases/1.02/modules/sam/admin/menu.php (rev 0) +++ XoopsModules/sam/releases/1.02/modules/sam/admin/menu.php 2012-02-21 14:30:29 UTC (rev 9040) @@ -0,0 +1,32 @@ +<?php +/** + * Extended User Profile + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package profile + * @since 2.3.0 + * @author Jan Pedersen + * @author Taiwen Jiang <ph...@us...> + * @version $Id: menu.php 2021 2008-08-31 02:02:45Z phppp $ + */ +$module_handler = xoops_gethandler('module'); +$GLOBALS['profileModule'] = $module_handler->getByDirname('sam'); +$adminmenu = array(); +$adminmenu[0]['title'] = _MI_SAM_DASHBOARD; +$adminmenu[0]['icon'] = '../../'.$GLOBALS['profileModule']->getInfo('icons32').'/about.png'; +$adminmenu[0]['image'] = '../../'.$GLOBALS['profileModule']->getInfo('icons32').'/about.png'; +$adminmenu[0]['link'] = "admin/index.php"; +$adminmenu[1]['title'] = _MI_SAM_ABOUT; +$adminmenu[1]['icon'] = '../../'.$GLOBALS['profileModule']->getInfo('icons32').'/about.png'; +$adminmenu[1]['image'] = '../../'.$GLOBALS['profileModule']->getInfo('icons32').'/about.png'; +$adminmenu[1]['link'] = "admin/about.php"; + +?> \ No newline at end of file Added: XoopsModules/sam/releases/1.02/modules/sam/blocks/index.html =================================================================== --- XoopsModules/sam/releases/1.02/modules/sam/blocks/index.html (rev 0) +++ XoopsModules/sam/releases/1.02/modules/sam/blocks/index.html 2012-02-21 14:30:29 UTC (rev 9040) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/sam/releases/1.02/modules/sam/blocks/sam_block_partnerlinks.php =================================================================== --- XoopsModules/sam/releases/1.02/modules/sam/blocks/sam_block_partnerlinks.php (rev 0) +++ XoopsModules/sam/releases/1.02/modules/sam/blocks/sam_block_partnerlinks.php 2012-02-21 14:30:29 UTC (rev 9040) @@ -0,0 +1,34 @@ +<?php + + +function b_sam_block_partnerlinks_show( $options ) +{ + xoops_loadLanguage('blocks', 'sam'); + xoops_loadLanguage('modinfo', 'sam'); + + $config_handler = xoops_gethandler('config'); + $module_handler = xoops_gethandler('module'); + $GLOBALS['samModule'] = $module_handler->getByDirname('sam'); + $GLOBALS['samModuleConfig'] = $config_handler->getConfigList($_Mod->getVar('mid')); + + $block = array(); + $block = $GLOBALS['samModuleConfig']; + $block['username'] = $options[0]; + + $GLOBALS['xoTheme']->addScript(sprintf(_BL_SAM_ADDTHIS_JAVASCRIPT, $options[0]), array('type'=>'text/javascript')); + + return $block; +} + + +function b_sam_block_partnerlinks_edit( $options ) +{ + xoops_load('XoopsFormLoader'); + xoops_loadLanguage('blocks', 'uitabs'); + + $username = new XoopsFormText('', 'options[0]', 25, 40, $options[0]); + + $form = _BL_SAM_ADDTHIS_USERNAME.$username->render()."<br/>"; + return $form ; +} +?> \ No newline at end of file Added: XoopsModules/sam/releases/1.02/modules/sam/class/adz.php =================================================================== --- XoopsModules/sam/releases/1.02/modules/sam/class/adz.php (rev 0) +++ XoopsModules/sam/releases/1.02/modules/sam/class/adz.php 2012-02-21 14:30:29 UTC (rev 9040) @@ -0,0 +1,83 @@ +<?php +// $Autho: wishcraft $ + +if (!defined('XOOPS_ROOT_PATH')) { + exit(); +} + +include_once dirname(__FILE__).'/object.php'; +/** + * Class for compunds + * @author Simon Roberts <si...@xo...> + * @copyright copyright (c) 2009-2003 XOOPS.org + * @package kernel + */ +class SamAdz extends SamObject +{ + + function SamAdz($id = null) + { + $this->initVar('ID', XOBJ_DTYPE_INT, null, false); + $this->initVar('PROVIDERID', XOBJ_DTYPE_INT, null, false); + $this->initVar('CAMPAIGNID', XOBJ_DTYPE_INT, null, false); + $this->initVar('CATEGORYID', XOBJ_DTYPE_INT, null, false); + $this->initVar('DATE_START', XOBJ_DTYPE_TXTBOX, null, false, 10); + $this->initVar('DATE_END', XOBJ_DTYPE_TXTBOX, null, false, 10); + $this->initVar('SONGTYPE', XOBJ_DTYPE_TXTBOX, "A", false, 1); + $this->initVar('LOCALFILENAME', XOBJ_DTYPE_TXTBOX, null, false, 200); + $this->initVar('LOCALSTATUS', XOBJ_DTYPE_TXTBOX, 'download', false, 10); + $this->initVar('DOWNLOAD_URL', XOBJ_DTYPE_TXTBOX, null, false, 200); + $this->initVar('LASTUPDATE', XOBJ_DTYPE_TXTBOX, null, false, 19); + $this->initVar('DESCRIPTION', XOBJ_DTYPE_TXTBOX, null, false, 100); + $this->initVar('DATE_END', XOBJ_DTYPE_TXTBOX, null, false, 10); + $this->initVar('CAMPAIGNACTIVE', XOBJ_DTYPE_TXTBOX, 'yes', false, 3); + $this->initVar('STATUS', XOBJ_DTYPE_TXTBOX, 'active', false, 10); + $this->initVar('WEIGHT', XOBJ_DTYPE_DECIMAL, null, false); + $this->initVar('GLOBALWEIGHT', XOBJ_DTYPE_DECIMAL, null, false); + $this->initVar('DURATION', XOBJ_DTYPE_INT, null, false); + $this->initVar('FILESIZE', XOBJ_DTYPE_INT, null, false); + $this->initVar('DATE_PLAYED', XOBJ_DTYPE_TXTBOX, null, false, 19); + $this->initVar('DATE_CATEGORY_PLAYED', XOBJ_DTYPE_TXTBOX, null, false, 19); + $this->initVar('DATE_CAMPAIGN_PLAYED', XOBJ_DTYPE_TXTBOX, null, false, 19); + $this->initVar('DATE_VALID', XOBJ_DTYPE_TXTBOX, null, false, 19); + $this->initVar('SPINS', XOBJ_DTYPE_INT, null, false); + $this->initVar('PERFORMANCES', XOBJ_DTYPE_INT, null, false); + $this->initVar('SPINS_MAX', XOBJ_DTYPE_INT, null, false); + $this->initVar('cap_day', XOBJ_DTYPE_INT, null, false); + $this->initVar('cap_day_cnt', XOBJ_DTYPE_INT, null, false); + $this->initVar('DAYS', XOBJ_DTYPE_TXTBOX, null, false, 100); + $this->initVar('HOURS', XOBJ_DTYPE_TXTBOX, null, false, 100); + $this->initVar('BLOCKED', XOBJ_DTYPE_TXTBOX, null, false, 3); + $this->initVar('LOCALWEIGHT', XOBJ_DTYPE_DECIMAL, null, false); + $this->initVar('LOCALBALANCE', XOBJ_DTYPE_DECIMAL, null, false); + $this->initVar('SORTID', XOBJ_DTYPE_DECIMAL, null, false); + $this->initVar('EXTERNALID', XOBJ_DTYPE_INT, null, false); + $this->initVar('SYNCINFO', XOBJ_DTYPE_TXTBOX, null, false, 200); + $this->initVar('PROGRESS', XOBJ_DTYPE_DECIMAL, null, false); + $this->initVar('timematrix', XOBJ_DTYPE_OTHER, null, false); + $this->initVar('min_separation', XOBJ_DTYPE_INT, null, false); + $this->initVar('min_separation_campaign', XOBJ_DTYPE_INT, null, false); + + } + +} + + +/** +* XOOPS policies handler class. +* This class is responsible for providing data access mechanisms to the data source +* of XOOPS user class objects. +* +* @author Simon Roberts <si...@ch...> +* @package kernel +*/ +class SamAdzHandler extends SamPersistableObjectHandler +{ + function __construct(&$db) + { + $this->db = $db =& SamDatabaseFactory::getDatabaseConnection(); + parent::__construct($db, "adz", 'SamAdz', "ID", "PROVIDERID"); + } +} + +?> \ No newline at end of file Added: XoopsModules/sam/releases/1.02/modules/sam/class/category.php =================================================================== --- XoopsModules/sam/releases/1.02/modules/sam/class/category.php (rev 0) +++ XoopsModules/sam/releases/1.02/modules/sam/class/category.php 2012-02-21 14:30:29 UTC (rev 9040) @@ -0,0 +1,48 @@ +<?php +// $Autho: wishcraft $ + +if (!defined('XOOPS_ROOT_PATH')) { + exit(); +} + +include_once dirname(__FILE__).'/object.php'; +/** + * Class for compunds + * @author Simon Roberts <si...@xo...> + * @copyright copyright (c) 2009-2003 XOOPS.org + * @package kernel + */ +class SamCategory extends SamObject +{ + + function SamCategory($id = null) + { + $this->initVar('ID', XOBJ_DTYPE_INT, null, false); + $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, false, 100); + $this->initVar('parentID', XOBJ_DTYPE_INT, null, false); + $this->initVar('levelindex', XOBJ_DTYPE_INT, null, false); + $this->initVar('itemindex', XOBJ_DTYPE_INT, null, false); + + } + +} + + +/** +* XOOPS policies handler class. +* This class is responsible for providing data access mechanisms to the data source +* of XOOPS user class objects. +* +* @author Simon Roberts <si...@ch...> +* @package kernel +*/ +class SamCategoryHandler extends SamPersistableObjectHandler +{ + function __construct(&$db) + { + $this->db = $db =& SamDatabaseFactory::getDatabaseConnection(); + parent::__construct($db, "category", 'SamCategory', "ID", "name"); + } +} + +?> \ No newline at end of file Added: XoopsModules/sam/releases/1.02/modules/sam/class/categorylist.php =================================================================== --- XoopsModules/sam/releases/1.02/modules/sam/class/categorylist.php (rev 0) +++ XoopsModules/sam/releases/1.02/modules/sam/class/categorylist.php 2012-02-21 14:30:29 UTC (rev 9040) @@ -0,0 +1,47 @@ +<?php +// $Autho: wishcraft $ + +if (!defined('XOOPS_ROOT_PATH')) { + exit(); +} + +include_once dirname(__FILE__).'/object.php'; +/** + * Class for compunds + * @author Simon Roberts <si...@xo...> + * @copyright copyright (c) 2009-2003 XOOPS.org + * @package kernel + */ +class SamCategorylist extends SamObject +{ + + function SamCategorylist($id = null) + { + $this->initVar('ID', XOBJ_DTYPE_INT, null, false); + $this->initVar('songID', XOBJ_DTYPE_INT, null, false); + $this->initVar('categoryID', XOBJ_DTYPE_INT, null, false); + $this->initVar('sortID', XOBJ_DTYPE_DECIMAL, null, false); + + } + +} + + +/** +* XOOPS policies handler class. +* This class is responsible for providing data access mechanisms to the data source +* of XOOPS user class objects. +* +* @author Simon Roberts <si...@ch...> +* @package kernel +*/ +class SamCategorylistHandler extends SamPersistableObjectHandler +{ + function __construct(&$db) + { + $this->db = $db =& SamDatabaseFactory::getDatabaseConnection(); + parent::__construct($db, "categorylist", 'SamCategorylist', "ID", "sortID"); + } +} + +?> \ No newline at end of file Added: XoopsModules/sam/releases/1.02/modules/sam/class/database/database.php =================================================================== --- XoopsModules/sam/releases/1.02/modules/sam/class/database/database.php (rev 0) +++ XoopsModules/sam/releases/1.02/modules/sam/class/database/database.php 2012-02-21 14:30:29 UTC (rev 9040) @@ -0,0 +1,114 @@ +<?php +/** + * Abstract base class for XOOPS Database access classes + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package kernel + * @subpackage database + * @since 1.0.0 + * @author Kazumi Ono <on...@xo...> + * @version $Id: database.php 8066 2011-11-06 05:09:33Z beckmi $ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +/** + * make sure this is only included once! + */ +if (defined('SAM_C_DATABASE_INCLUDED')) { + return; +} + +define('SAM_C_DATABASE_INCLUDED', 1); + +/** + * Abstract base class for Database access classes + * + * @abstract + * @author Kazumi Ono <on...@xo...> + * @package kernel + * @subpackage database + */ +class SamDatabase +{ + /** + * Prefix for tables in the database + * + * @var string + */ + var $prefix = ''; + + /** + * reference to a {@link SamLogger} object + * + * @see SamLogger + * @var object SamLogger + */ + var $logger; + + /** + * If statements that modify the database are selected + * + * @var boolean + */ + var $allowWebChanges = false; + + /** + * constructor + * + * will always fail, because this is an abstract class! + */ + function SamDatabase() + { + // exit('Cannot instantiate this class directly'); + } + + /** + * assign a {@link SamLogger} object to the database + * + * @see SamLogger + * @param object $logger reference to a {@link SamLogger} object + */ + + function setLogger(&$logger) + { + $this->logger = &$logger; + } + + /** + * set the prefix for tables in the database + * + * @param string $value table prefix + */ + function setPrefix($value) + { + $this->prefix = $value; + } + + /** + * attach the prefix.'_' to a given tablename + * + * if tablename is empty, only prefix will be returned + * + * @param string $tablename tablename + * @return string prefixed tablename, just prefix if tablename is empty + */ + function prefix($tablename = '') + { + if ($tablename != '') { + return $this->prefix . '_' . $tablename; + } else { + return $this->prefix; + } + } +} + +?> \ No newline at end of file Added: XoopsModules/sam/releases/1.02/modules/sam/class/database/databasefactory.php =================================================================== --- XoopsModules/sam/releases/1.02/modules/sam/class/database/databasefactory.php (rev 0) +++ XoopsModules/sam/releases/1.02/modules/sam/class/database/databasefactory.php 2012-02-21 14:30:29 UTC (rev 9040) @@ -0,0 +1,108 @@ +<?php +/** + * Factory Class for XOOPS Database + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package kernel + * @subpackage database + * @version $Id: databasefactory.php 8066 2011-11-06 05:09:33Z beckmi $ + */ +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +/** + * SamDatabaseFactory + * + * @package Kernel + * @author Kazumi Ono <on...@xo...> + * @access public + */ +class SamDatabaseFactory +{ + /** + * SamDatabaseFactory::SamDatabaseFactory() + */ + function SamDatabaseFactory() + { + if (!isset($GLOBALS['samModuleConfig'])||!is_array($GLOBALS['samModuleConfig'])) { + $config_handler = xoops_gethandler('config'); + $module_handler = xoops_gethandler('module'); + $GLOBALS['samModule'] = $module_handler->getDirname('sam'); + $GLOBALS['samModuleConfig'] = $config_handler->getConfigList($GLOBALS['samModule']->getVar('mid')); + } + } + + /** + * Get a reference to the only instance of database class and connects to DB + * + * if the class has not been instantiated yet, this will also take + * care of that + * + * @static + * @staticvar object The only instance of database class + * @return object Reference to the only instance of database class + */ + function &getDatabaseConnection() + { + + static $instance; + if (!isset($instance)) { + if (file_exists($file = XOOPS_ROOT_PATH . '/modules/sam/class/database/' . $GLOBALS['samModuleConfig']['db_type'] . 'database.php')) { + require_once $file; + if (!$GLOBALS['samModuleConfig']['db_proxy']) { + $class = 'Sam' . ucfirst($GLOBALS['samModuleConfig']['db_type']) . 'DatabaseSafe'; + } else { + $class = 'Sam' . ucfirst($GLOBALS['samModuleConfig']['db_type']) . 'DatabaseProxy'; + } + $xoopsPreload =& XoopsPreload::getInstance(); + $xoopsPreload->triggerEvent('sam.class.database.databasefactory.connection', array(&$class)); + $instance = new $class(); + $instance->setLogger(XoopsLogger::getInstance()); + $instance->setPrefix($GLOBALS['samModuleConfig']['db_prefix']); + if (!$instance->connect()) { + trigger_error('notrace:Unable to connect to SAM database, please check database settings for the SAM Module in the module preferences!', E_USER_ERROR); + } + } else { + trigger_error('notrace:Failed to load database of type: ' . $GLOBALS['samModuleConfig']['db_type'] . ' in file: ' . __FILE__ . ' at line ' . __LINE__, E_USER_WARNING); + } + } + return $instance; + } + + /** + * Gets a reference to the only instance of database class. Currently + * only being used within the installer. + * + * @static + * @staticvar object The only instance of database class + * @return object Reference to the only instance of database class + */ + function &getDatabase() + { + static $database; + if (!isset($database)) { + if (file_exists($file = XOOPS_ROOT_PATH . '/modules/sam/class/database/' . $GLOBALS['samModuleConfig']['db_type'] . 'database.php')) { + include_once $file; + if (!$GLOBALS['samModuleConfig']['db_proxy']) { + $class = 'Sam' . ucfirst($GLOBALS['samModuleConfig']['db_type']) . 'DatabaseSafe'; + } else { + $class = 'Sam' . ucfirst($GLOBALS['samModuleConfig']['db_type']) . 'DatabaseProxy'; + } + unset($database); + $database = new $class(); + } else { + trigger_error('notrace:Failed to load database of type: ' . $GLOBALS['samModuleConfig']['db_type'] . ' in file: ' . __FILE__ . ' at line ' . __LINE__, E_USER_WARNING); + } + } + return $database; + } +} + +?> \ No newline at end of file Added: XoopsModules/sam/releases/1.02/modules/sam/class/database/index.html =================================================================== --- XoopsModules/sam/releases/1.02/modules/sam/class/database/index.html (rev 0) +++ XoopsModules/sam/releases/1.02/modules/sam/class/database/index.html 2012-02-21 14:30:29 UTC (rev 9040) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/sam/releases/1.02/modules/sam/class/database/mysqldatabase.php =================================================================== --- XoopsModules/sam/releases/1.02/modules/sam/class/database/mysqldatabase.php (rev 0) +++ XoopsModules/sam/releases/1.02/modules/sam/class/database/mysqldatabase.php 2012-02-21 14:30:29 UTC (rev 9040) @@ -0,0 +1,404 @@ +<?php +/** + * MySQL access + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package kernel + * @subpackage database + * @since 1.0.0 + * @author Kazumi Ono <on...@xo...> + * @version $Id: mysqldatabase.php 8066 2011-11-06 05:09:33Z beckmi $ + */ +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +/** + * + * @package kernel + * @subpackage database + * @author Kazumi Ono <on...@xo...> + * @copyright copyright (c) 2000-2003 XOOPS.org + */ + +/** + * base class + */ +include_once XOOPS_ROOT_PATH . '/modules/sam/class/database/database.php'; +// xoops_load( 'xoopsdatabase' ); +/** + * connection to a mysql database + * + * @abstract + * @author Kazumi Ono <on...@xo...> + * @copyright copyright (c) 2000-2003 XOOPS.org + * @package kernel + * @subpackage database + */ +class SamMySQLDatabase extends SamDatabase +{ + /** + * Database connection + * + * @var resource + */ + var $conn; + + /** + * connect to the database + * + * @param bool $selectdb select the database now? + * @return bool successful? + */ + function connect($selectdb = true) + { + static $db_charset_set; + + if (!extension_loaded('mysql')) { + trigger_error('notrace:mysql extension not loaded', E_USER_ERROR); + return false; + } + + $this->allowWebChanges = ($_SERVER['REQUEST_METHOD'] != 'GET'); + if (XOOPS_DB_PCONNECT == 1) { + $this->conn = @mysql_pconnect($GLOBALS['samModuleConfig']['db_host'], $GLOBALS['samModuleConfig']['db_user'], $GLOBALS['samModuleConfig']['db_pass']); + } else { + $this->conn = @mysql_connect($GLOBALS['samModuleConfig']['db_host'], $GLOBALS['samModuleConfig']['db_user'], $GLOBALS['samModuleConfig']['db_pass']); + } + + if (!$this->conn) { + $this->logger->addQuery('', $this->error(), $this->errno()); + return false; + } + if ($selectdb != false) { + if (!mysql_select_db($GLOBALS['samModuleConfig']['db_name'])) { + $this->logger->addQuery('', $this->error(), $this->errno()); + return false; + } + } + if (!isset($db_charset_set) && defined('XOOPS_DB_CHARSET') && XOOPS_DB_CHARSET) { + $this->queryF("SET NAMES '" . $GLOBALS['samModuleConfig']['db_charset'] . "'"); + } + $db_charset_set = 1; + $this->queryF("SET SQL_BIG_SELECTS = 1"); + return true; + } + + /** + * generate an ID for a new row + * + * This is for compatibility only. Will always return 0, because MySQL supports + * autoincrement for primary keys. + * + * @param string $sequence name of the sequence from which to get the next ID + * @return int always 0, because mysql has support for autoincrement + */ + function genId($sequence) + { + return 0; // will use auto_increment + } + + /** + * Get a result row as an enumerated array + * + * @param resource $result + * @return array + */ + function fetchRow($result) + { + return @mysql_fetch_row($result); + } + + /** + * Fetch a result row as an associative array + * + * @return array + */ + function fetchArray($result) + { + return @mysql_fetch_assoc($result); + } + + /** + * Fetch a result row as an associative array + * + * @return array + */ + function fetchBoth($result) + { + return @mysql_fetch_array($result, MYSQL_BOTH); + } + + /** + * SamMySQLDatabase::fetchObjected() + * + * @param mixed $result + * @return + */ + function fetchObject($result) + { + return @mysql_fetch_object($result); + } + + /** + * Get the ID generated from the previous INSERT operation + * + * @return int + */ + function getInsertId() + { + return mysql_insert_id($this->conn); + } + + /** + * Get number of rows in result + * + * @param resource $ query result + * @return int + */ + function getRowsNum($result) + { + return @mysql_num_rows($result); + } + + /** + * Get number of affected rows + * + * @return int + */ + function getAffectedRows() + { + return mysql_affected_rows($this->conn); + } + + /** + * Close MySQL connection + */ + function close() + { + mysql_close($this->conn); + } + + /** + * will free all memory associated with the result identifier result. + * + * @param resource $ query result + * @return bool TRUE on success or FALSE on failure. + */ + function freeRecordSet($result) + { + return mysql_free_result($result); + } + + /** + * Returns the text of the error message from previous MySQL operation + * + * @return bool Returns the error text from the last MySQL function, or '' (the empty string) if no error occurred. + */ + function error() + { + return @mysql_error(); + } + + /** + * Returns the numerical value of the error message from previous MySQL operation + * + * @return int Returns the error number from the last MySQL function, or 0 (zero) if no error occurred. + */ + function errno() + { + return @mysql_errno(); + } + + /** + * Returns escaped string text with single quotes around it to be safely stored in database + * + * @param string $str unescaped string text + * @return string escaped string text with single quotes around + */ + function quoteString($str) + { + return $this->quote($str); + } + + /** + * Quotes a string for use in a query. + */ + function quote($string) + { + return "'" . str_replace("\\\"", '"', str_replace("\\"", '"', mysql_real_escape_string($string, $this->conn))) . "'"; + } + + /** + * perform a query on the database + * + * @param string $sql a valid MySQL query + * @param int $limit number of records to return + * @param int $start offset of first record to return + * @return resource query result or FALSE if successful + * or TRUE if successful and no result + */ + function queryF($sql, $limit = 0, $start = 0) + { + if (!empty($limit)) { + if (empty($start)) { + $start = 0; + } + $sql = $sql . ' LIMIT ' . (int) $start . ', ' . (int) $limit; + } + $this->logger->startTime('query_time'); + $result = mysql_query($sql, $this->conn); + $this->logger->stopTime('query_time'); + $query_time = $this->logger->dumpTime('query_time', true); + if ($result) { + $this->logger->addQuery($sql, null, null, $query_time); + return $result; + } else { + $this->logger->addQuery($sql, $this->error(), $this->errno(), $query_time); + return false; + } + } + + /** + * perform a query + * + * This method is empty and does nothing! It should therefore only be + * used if nothing is exactly what you want done! ;-) + * + * @param string $sql a valid MySQL query + * @param int $limit number of records to return + * @param int $start offset of first record to return + * @abstract + */ + function query($sql, $limit = 0, $start = 0) + { + } + + /** + * perform queries from SQL dump file in a batch + * + * @param string $file file path to an SQL dump file + * @return bool FALSE if failed reading SQL file or TRUE if the file has been read and queries executed + */ + function queryFromFile($file) + { + if (false !== ($fp = fopen($file, 'r'))) { + include_once XOOPS_ROOT_PATH . '/class/database/sqlutility.php'; + $sql_queries = trim(fread($fp, filesize($file))); + SqlUtility::splitMySqlFile($pieces, $sql_queries); + foreach ($pieces as $query) { + // [0] contains the prefixed query + // [4] contains unprefixed table name + $prefixed_query = SqlUtility::prefixQuery(trim($query), $this->prefix()); + if ($prefixed_query != false) { + $this->query($prefixed_query[0]); + } + } + return true; + } + return false; + } + + /** + * Get field name + * + * @param resource $result query result + * @param int $ numerical field index + * @return string + */ + function getFieldName($result, $offset) + { + return mysql_field_name($result, $offset); + } + + /** + * Get field type + * + * @param resource $result query result + * @param int $offset numerical field index + * @return string + */ +... [truncated message content] |
From: <be...@us...> - 2012-02-22 11:34:17
|
Revision: 9047 http://xoops.svn.sourceforge.net/xoops/?rev=9047&view=rev Author: beckmi Date: 2012-02-22 11:34:02 +0000 (Wed, 22 Feb 2012) Log Message: ----------- Adding Defacer Added Paths: ----------- XoopsModules/defacer/ XoopsModules/defacer/branches/ XoopsModules/defacer/branches/mamba/ XoopsModules/defacer/branches/mamba/defacer/ XoopsModules/defacer/branches/mamba/defacer/admin/ XoopsModules/defacer/branches/mamba/defacer/admin/admin_about.php XoopsModules/defacer/branches/mamba/defacer/admin/admin_functions.php XoopsModules/defacer/branches/mamba/defacer/admin/admin_header.php XoopsModules/defacer/branches/mamba/defacer/admin/admin_meta.php XoopsModules/defacer/branches/mamba/defacer/admin/admin_page.php XoopsModules/defacer/branches/mamba/defacer/admin/admin_permission.php XoopsModules/defacer/branches/mamba/defacer/admin/admin_theme.php XoopsModules/defacer/branches/mamba/defacer/admin/index.html XoopsModules/defacer/branches/mamba/defacer/admin/index.php XoopsModules/defacer/branches/mamba/defacer/admin/menu.php XoopsModules/defacer/branches/mamba/defacer/changelog.txt XoopsModules/defacer/branches/mamba/defacer/class/ XoopsModules/defacer/branches/mamba/defacer/class/about.php XoopsModules/defacer/branches/mamba/defacer/class/defacer.php XoopsModules/defacer/branches/mamba/defacer/class/index.html XoopsModules/defacer/branches/mamba/defacer/class/meta.php XoopsModules/defacer/branches/mamba/defacer/class/object.php XoopsModules/defacer/branches/mamba/defacer/class/page.php XoopsModules/defacer/branches/mamba/defacer/class/permission.php XoopsModules/defacer/branches/mamba/defacer/class/theme.php XoopsModules/defacer/branches/mamba/defacer/images/ XoopsModules/defacer/branches/mamba/defacer/images/0.png XoopsModules/defacer/branches/mamba/defacer/images/1.png XoopsModules/defacer/branches/mamba/defacer/images/bg.png XoopsModules/defacer/branches/mamba/defacer/images/defacer_slogo.png XoopsModules/defacer/branches/mamba/defacer/images/delete_big.png XoopsModules/defacer/branches/mamba/defacer/images/delete_big_off.png XoopsModules/defacer/branches/mamba/defacer/images/delete_med.png XoopsModules/defacer/branches/mamba/defacer/images/edit_big.png XoopsModules/defacer/branches/mamba/defacer/images/edit_big_off.png XoopsModules/defacer/branches/mamba/defacer/images/edit_med.png XoopsModules/defacer/branches/mamba/defacer/images/icon_big.png XoopsModules/defacer/branches/mamba/defacer/images/icon_small.png XoopsModules/defacer/branches/mamba/defacer/images/index.html XoopsModules/defacer/branches/mamba/defacer/images/left_both.png XoopsModules/defacer/branches/mamba/defacer/images/metas_big.png XoopsModules/defacer/branches/mamba/defacer/images/metas_small.png XoopsModules/defacer/branches/mamba/defacer/images/pages_big.png XoopsModules/defacer/branches/mamba/defacer/images/pages_small.png XoopsModules/defacer/branches/mamba/defacer/images/permissions_big.png XoopsModules/defacer/branches/mamba/defacer/images/permissions_small.png XoopsModules/defacer/branches/mamba/defacer/images/right_both.png XoopsModules/defacer/branches/mamba/defacer/images/themes_big.png XoopsModules/defacer/branches/mamba/defacer/images/themes_small.png XoopsModules/defacer/branches/mamba/defacer/images/view_big.png XoopsModules/defacer/branches/mamba/defacer/images/view_big_off.png XoopsModules/defacer/branches/mamba/defacer/include/ XoopsModules/defacer/branches/mamba/defacer/include/beforefooter.php XoopsModules/defacer/branches/mamba/defacer/include/beforeheader.php XoopsModules/defacer/branches/mamba/defacer/include/common.php XoopsModules/defacer/branches/mamba/defacer/include/functions.php XoopsModules/defacer/branches/mamba/defacer/include/index.html XoopsModules/defacer/branches/mamba/defacer/index.html XoopsModules/defacer/branches/mamba/defacer/js/ XoopsModules/defacer/branches/mamba/defacer/js/index.html XoopsModules/defacer/branches/mamba/defacer/js/jgrowl.css XoopsModules/defacer/branches/mamba/defacer/js/jgrowl.js XoopsModules/defacer/branches/mamba/defacer/language/ XoopsModules/defacer/branches/mamba/defacer/language/english/ XoopsModules/defacer/branches/mamba/defacer/language/english/about.php XoopsModules/defacer/branches/mamba/defacer/language/english/admin.php XoopsModules/defacer/branches/mamba/defacer/language/english/index.html XoopsModules/defacer/branches/mamba/defacer/language/english/modinfo.php XoopsModules/defacer/branches/mamba/defacer/language/index.html XoopsModules/defacer/branches/mamba/defacer/preload/ XoopsModules/defacer/branches/mamba/defacer/preload/defacer.php XoopsModules/defacer/branches/mamba/defacer/preloads/ XoopsModules/defacer/branches/mamba/defacer/preloads/core.php XoopsModules/defacer/branches/mamba/defacer/readme.txt XoopsModules/defacer/branches/mamba/defacer/sql/ XoopsModules/defacer/branches/mamba/defacer/sql/index.html XoopsModules/defacer/branches/mamba/defacer/sql/mysql.sql XoopsModules/defacer/branches/mamba/defacer/templates/ XoopsModules/defacer/branches/mamba/defacer/templates/defacer_admin_about.html XoopsModules/defacer/branches/mamba/defacer/templates/defacer_admin_meta.html XoopsModules/defacer/branches/mamba/defacer/templates/defacer_admin_page.html XoopsModules/defacer/branches/mamba/defacer/templates/defacer_admin_permission.html XoopsModules/defacer/branches/mamba/defacer/templates/defacer_admin_theme.html XoopsModules/defacer/branches/mamba/defacer/templates/index.html XoopsModules/defacer/branches/mamba/defacer/xoops_version.php XoopsModules/defacer/releases/ XoopsModules/defacer/trunk/ XoopsModules/defacer/trunk/defacer/ XoopsModules/defacer/trunk/defacer/admin/ XoopsModules/defacer/trunk/defacer/admin/admin_about.php XoopsModules/defacer/trunk/defacer/admin/admin_functions.php XoopsModules/defacer/trunk/defacer/admin/admin_header.php XoopsModules/defacer/trunk/defacer/admin/admin_meta.php XoopsModules/defacer/trunk/defacer/admin/admin_page.php XoopsModules/defacer/trunk/defacer/admin/admin_permission.php XoopsModules/defacer/trunk/defacer/admin/admin_theme.php XoopsModules/defacer/trunk/defacer/admin/index.html XoopsModules/defacer/trunk/defacer/admin/index.php XoopsModules/defacer/trunk/defacer/admin/menu.php XoopsModules/defacer/trunk/defacer/changelog.txt XoopsModules/defacer/trunk/defacer/class/ XoopsModules/defacer/trunk/defacer/class/about.php XoopsModules/defacer/trunk/defacer/class/defacer.php XoopsModules/defacer/trunk/defacer/class/index.html XoopsModules/defacer/trunk/defacer/class/meta.php XoopsModules/defacer/trunk/defacer/class/object.php XoopsModules/defacer/trunk/defacer/class/page.php XoopsModules/defacer/trunk/defacer/class/permission.php XoopsModules/defacer/trunk/defacer/class/theme.php XoopsModules/defacer/trunk/defacer/images/ XoopsModules/defacer/trunk/defacer/images/0.png XoopsModules/defacer/trunk/defacer/images/1.png XoopsModules/defacer/trunk/defacer/images/bg.png XoopsModules/defacer/trunk/defacer/images/defacer_slogo.png XoopsModules/defacer/trunk/defacer/images/delete_big.png XoopsModules/defacer/trunk/defacer/images/delete_big_off.png XoopsModules/defacer/trunk/defacer/images/delete_med.png XoopsModules/defacer/trunk/defacer/images/edit_big.png XoopsModules/defacer/trunk/defacer/images/edit_big_off.png XoopsModules/defacer/trunk/defacer/images/edit_med.png XoopsModules/defacer/trunk/defacer/images/icon_big.png XoopsModules/defacer/trunk/defacer/images/icon_small.png XoopsModules/defacer/trunk/defacer/images/index.html XoopsModules/defacer/trunk/defacer/images/left_both.png XoopsModules/defacer/trunk/defacer/images/metas_big.png XoopsModules/defacer/trunk/defacer/images/metas_small.png XoopsModules/defacer/trunk/defacer/images/pages_big.png XoopsModules/defacer/trunk/defacer/images/pages_small.png XoopsModules/defacer/trunk/defacer/images/permissions_big.png XoopsModules/defacer/trunk/defacer/images/permissions_small.png XoopsModules/defacer/trunk/defacer/images/right_both.png XoopsModules/defacer/trunk/defacer/images/themes_big.png XoopsModules/defacer/trunk/defacer/images/themes_small.png XoopsModules/defacer/trunk/defacer/images/view_big.png XoopsModules/defacer/trunk/defacer/images/view_big_off.png XoopsModules/defacer/trunk/defacer/include/ XoopsModules/defacer/trunk/defacer/include/beforefooter.php XoopsModules/defacer/trunk/defacer/include/beforeheader.php XoopsModules/defacer/trunk/defacer/include/common.php XoopsModules/defacer/trunk/defacer/include/functions.php XoopsModules/defacer/trunk/defacer/include/index.html XoopsModules/defacer/trunk/defacer/index.html XoopsModules/defacer/trunk/defacer/js/ XoopsModules/defacer/trunk/defacer/js/index.html XoopsModules/defacer/trunk/defacer/js/jgrowl.css XoopsModules/defacer/trunk/defacer/js/jgrowl.js XoopsModules/defacer/trunk/defacer/language/ XoopsModules/defacer/trunk/defacer/language/english/ XoopsModules/defacer/trunk/defacer/language/english/about.php XoopsModules/defacer/trunk/defacer/language/english/admin.php XoopsModules/defacer/trunk/defacer/language/english/index.html XoopsModules/defacer/trunk/defacer/language/english/modinfo.php XoopsModules/defacer/trunk/defacer/language/index.html XoopsModules/defacer/trunk/defacer/preload/ XoopsModules/defacer/trunk/defacer/preload/defacer.php XoopsModules/defacer/trunk/defacer/preloads/ XoopsModules/defacer/trunk/defacer/preloads/core.php XoopsModules/defacer/trunk/defacer/readme.txt XoopsModules/defacer/trunk/defacer/sql/ XoopsModules/defacer/trunk/defacer/sql/index.html XoopsModules/defacer/trunk/defacer/sql/mysql.sql XoopsModules/defacer/trunk/defacer/templates/ XoopsModules/defacer/trunk/defacer/templates/defacer_admin_about.html XoopsModules/defacer/trunk/defacer/templates/defacer_admin_meta.html XoopsModules/defacer/trunk/defacer/templates/defacer_admin_page.html XoopsModules/defacer/trunk/defacer/templates/defacer_admin_permission.html XoopsModules/defacer/trunk/defacer/templates/defacer_admin_theme.html XoopsModules/defacer/trunk/defacer/templates/index.html XoopsModules/defacer/trunk/defacer/xoops_version.php Added: XoopsModules/defacer/branches/mamba/defacer/admin/admin_about.php =================================================================== --- XoopsModules/defacer/branches/mamba/defacer/admin/admin_about.php (rev 0) +++ XoopsModules/defacer/branches/mamba/defacer/admin/admin_about.php 2012-02-22 11:34:02 UTC (rev 9047) @@ -0,0 +1,27 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Defacer + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: admin_about.php 0 2009-06-11 18:47:04Z trabis $ + */ + +include_once dirname(__FILE__) . '/admin_header.php'; +include_once dirname(dirname(__FILE__)) . '/class/about.php'; + +$aboutObj = new DefacerAbout(); +$aboutObj->render(); + +?> \ No newline at end of file Added: XoopsModules/defacer/branches/mamba/defacer/admin/admin_functions.php =================================================================== --- XoopsModules/defacer/branches/mamba/defacer/admin/admin_functions.php (rev 0) +++ XoopsModules/defacer/branches/mamba/defacer/admin/admin_functions.php 2012-02-22 11:34:02 UTC (rev 9047) @@ -0,0 +1,76 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Defacer + * @since 1.0 + * @author trabis <lus...@gm...> + * @author InstantZero <http://xoops.instant-zero.com/> + * @version $Id: admin_header.php 0 2009-06-11 18:47:04Z trabis $ + */ + +defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); + +include_once dirname(dirname(__FILE__)) . '/include/common.php'; + +function defacer_adminMenu($currentoption = 0, $breadcrumb = '') +{ + $defacer =& DefacerDefacer::getInstance(); + /* Nice buttons styles */ + echo " + <style type='text/css'> + #buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; } + #buttonbar { float:left; width:100%; background: #e7e7e7 url('" . XOOPS_URL . "/modules/" . $defacer->getModule()->dirname() . "/images/bg.png') repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; } + #buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; } + #buttonbar li { display:inline; margin:0; padding:0; } + #buttonbar a { float:left; background:url('" . XOOPS_URL . "/modules/" . $defacer->getModule()->dirname() . "/images/left_both.png') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; } + #buttonbar a span { float:left; display:block; background:url('" . XOOPS_URL . "/modules/" . $defacer->getModule()->dirname() . "/images/right_both.png') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; } + /* Commented Backslash Hack hides rule from IE5-Mac \*/ + #buttonbar a span {float:none;} + /* End IE5-Mac hack */ + #buttonbar a:hover span { color:#333; } + #buttonbar #current a { background-position:0 -150px; border-width:0; } + #buttonbar #current a span { background-position:100% -150px; padding-bottom:5px; color:#333; } + #buttonbar a:hover { background-position:0% -150px; } + #buttonbar a:hover span { background-position:100% -150px; } + </style> + "; + + $tblColors = array('', '', '', '', ''); + if($currentoption >= 0) { + $tblColors[$currentoption] = 'current'; + } + + if (file_exists($filename = XOOPS_ROOT_PATH . '/modules/' . $defacer->getModule()->dirname() . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/modinfo.php')) { + include_once $filename; + } else { + include_once XOOPS_ROOT_PATH . '/modules/' . $defacer->getModule()->dirname() . '/language/english/modinfo.php'; + } + + echo "<div id='buttontop'>"; + echo "<table style=\"width: 100%; padding: 0; \" cellspacing=\"0\"><tr>"; + echo "<td style=\"width: 60%; font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;\"><a class=\"nobutton\" href=\"../../system/admin.php?fct=preferences&op=showmod&mod=" . $defacer->getModule()->mid() . "\">" . _AM_DEFACER_GENERALSET . "</a>"; + echo "<td style=\"width: 40%; font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;\"><b>" . $defacer->getModule()->name() . " " . _AM_DEFACER_MODULEADMIN . "</b> " . $breadcrumb . "</td>"; + echo "</tr></table>"; + echo "</div>"; + + echo "<div id='buttonbar'>"; + echo "<ul>"; + echo "<li id='" . $tblColors[0] . "'><a href=\"admin_page.php\"\"><span>" . _MI_DEFACER_PAGEMANAGER . "</span></a></li>\n"; + echo "<li id='" . $tblColors[1] . "'><a href=\"admin_theme.php\"\"><span>" . _MI_DEFACER_THEMEMANAGER . "</span></a></li>\n"; + echo "<li id='" . $tblColors[2] . "'><a href=\"admin_meta.php\"\"><span>" . _MI_DEFACER_METAMANAGER . "</span></a></li>\n"; + echo "<li id='" . $tblColors[3] . "'><a href=\"admin_permission.php\"\"><span>" . _MI_DEFACER_PERMISSIONMANAGER . "</span></a></li>\n"; + echo "<li id='" . $tblColors[4] . "'><a href=\"admin_about.php\"\"><span>" . _MI_DEFACER_ABOUT . "</span></a></li>\n"; + echo "</ul></div><div> </div>"; +} +?> \ No newline at end of file Added: XoopsModules/defacer/branches/mamba/defacer/admin/admin_header.php =================================================================== --- XoopsModules/defacer/branches/mamba/defacer/admin/admin_header.php (rev 0) +++ XoopsModules/defacer/branches/mamba/defacer/admin/admin_header.php 2012-02-22 11:34:02 UTC (rev 9047) @@ -0,0 +1,31 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Defacer + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: admin_header.php 0 2009-06-11 18:47:04Z trabis $ + */ + +require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; +require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + +include_once dirname(dirname(__FILE__)) . '/include/common.php'; +include_once dirname(__FILE__) . '/admin_functions.php'; + +if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { + include_once XOOPS_ROOT_PATH . '/class/template.php'; + $xoopsTpl = new XoopsTpl(); +} +?> Added: XoopsModules/defacer/branches/mamba/defacer/admin/admin_meta.php =================================================================== --- XoopsModules/defacer/branches/mamba/defacer/admin/admin_meta.php (rev 0) +++ XoopsModules/defacer/branches/mamba/defacer/admin/admin_meta.php 2012-02-22 11:34:02 UTC (rev 9047) @@ -0,0 +1,233 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Defacer + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: admin_meta.php 0 2009-06-11 18:47:04Z trabis $ + */ + +require dirname(__FILE__) . '/admin_header.php'; + +$actions = array('list', 'add', 'edit', 'editok', 'del', 'delok'); +$op = isset($_REQUEST['op']) && in_array($_REQUEST['op'], $actions) ? $_REQUEST['op'] : 'list'; + +$itemid = isset($_REQUEST['itemid']) ? intval($_REQUEST['itemid']) : 0; +$limit = isset($_REQUEST['limit']) ? intval($_REQUEST['limit']) : 15; +$start = isset($_REQUEST['start']) ? intval($_REQUEST['start']) : 0; + +$itemid = isset($_REQUEST['meta_id']) ? intval($_REQUEST['meta_id']) : $itemid; + +switch ($op) { + case 'list': + xoops_cp_header(); + defacer_adminMenu(2); + echo defacer_index($start, $limit); + xoops_cp_footer(); + break; + case 'add': + defacer_add(); + break; + case 'edit': + xoops_cp_header(); + defacer_adminMenu(2); + echo defacer_form($itemid); + xoops_cp_footer(); + break; + case 'editok': + defacer_edit($itemid); + break; + case 'del': + defacer_confirmdel($itemid); + break; + case 'delok': + defacer_del($itemid); + break; +} + +function defacer_index($start = 0, $limit = 0) +{ + global $xoopsTpl; + + $defacer =& DefacerDefacer::getInstance(); + + $count = $defacer->getHandler('meta')->getCount(); + $xoopsTpl->assign('count', $count); + + $criteria = new CriteriaCompo(); + $criteria->setStart($start); + $criteria->setLimit($limit); + $objs = $defacer->getHandler('meta')->getObjects($criteria); + + if ($count > $limit) { + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $nav = new XoopsPageNav($count, $limit, $start, 'start', 'op=list'); + $xoopsTpl->assign('pagenav', '<div style="float:left; padding-top:2px;" align="center">' . $nav->renderNav() . '</div>'); + } + + foreach ($objs as $obj) { + $item = $obj->getValues(); + + $page = $defacer->getHandler('page')->get($obj->getVar('meta_id')); + $item['module'] = $page->getVar('name'); + $item['meta_title'] = $page->getVar('page_title'); + $item['meta_url'] = $page->getVar('page_url'); + $item['meta_status'] = $page->getVar('page_status'); + + if (substr($page->getVar('page_url'), -1) == '*') { + $item['meta_vurl'] = 0; + } else { + if ($page->getVar('page_moduleid') == 1){ + $item['meta_vurl'] = XOOPS_URL . '/' . $page->getVar('page_url'); + } else { + $item['meta_vurl'] = XOOPS_URL . '/modules/' . $page->getVar('dirname') . '/' . $page->getVar('page_url'); + } + } + + $xoopsTpl->append('items', $item); + } + + $xoopsTpl->assign('form', defacer_form()); + + return $xoopsTpl->fetch('db:defacer_admin_meta.html'); +} + +function defacer_add() +{ + $defacer =& DefacerDefacer::getInstance(); + + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header(basename(__FILE__), 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + } + + $obj = $defacer->getHandler('meta')->create(); + $obj->setVars($_POST); + + if (!$defacer->getHandler('meta')->insert($obj)) { + $msg = _AM_DEFACER_ERROR; + } else { + $msg = _AM_DEFACER_DBUPDATED; + } + + redirect_header(basename(__FILE__) , 2, $msg); +} + +function defacer_edit($itemid) +{ + $defacer =& DefacerDefacer::getInstance(); + + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header(basename(__FILE__), 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + } + + $obj = $defacer->getHandler('meta')->get($itemid); + $obj->setVars($_POST); + + if (!$defacer->getHandler('meta')->insert($obj)) { + $msg = _AM_DEFACER_ERROR; + } else { + $msg = _AM_DEFACER_DBUPDATED; + } + + redirect_header(basename(__FILE__), 2, $msg); +} + +function defacer_del($itemid) +{ + $defacer =& DefacerDefacer::getInstance(); + + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header(basename(__FILE__),1 , implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + } + + if ($itemid <= 0) { + redirect_header(basename(__FILE__), 1); + } + + $obj = $defacer->getHandler('meta')->get($itemid); + if (!is_object($obj)) { + redirect_header(basename(__FILE__), 1); + } + + if (!$defacer->getHandler('meta')->delete($obj)) { + xoops_cp_header(); + xoops_error(sprintf(_AM_DEFACER_ERROR, $obj->getVar('meta_id'))); + xoops_cp_footer(); + exit(); + } + + redirect_header(basename(__FILE__), 2, _AM_DEFACER_DBUPDATED); +} + +function defacer_confirmdel($itemid) +{ + xoops_cp_header(); + xoops_confirm(array('op' => 'delok', 'itemid' => $itemid), basename(__FILE__), _AM_DEFACER_RUDEL); + xoops_cp_footer(); +} + +function defacer_form($itemid = 0) +{ + $defacer =& DefacerDefacer::getInstance(); + $obj = $defacer->getHandler('meta')->get($itemid); + + if ($obj->isNew()) { + $ftitle = _EDIT; + } else { + $ftitle = _ADD; + } + + $form = new XoopsThemeForm($ftitle, 'meta_form', basename(__FILE__), 'post', true); + + $page_select = new XoopsFormSelect(_AM_DEFACER_PAGE, 'meta_id', $obj->getVar('meta_id', 'e')); + $page_select->customValidationCode[] = 'var value = document.getElementById(\'meta_id\').value; if (value == 0){alert("' . _AM_DEFACER_SELECTPAGE_ERR . '"); return false;}'; + + $criteria = new CriteriaCompo(new Criteria('page_status', 1)); + $criteria->setSort('name'); + $criteria->setOrder('ASC'); + $pageslist = $defacer->getHandler('page')->getList($criteria); + $list = array('0' => '--------------------------'); + $pageslist = $list + $pageslist; + $page_select->addOptionArray($pageslist); + $form->addElement($page_select, true); + + $form->addElement(new XoopsFormText(_AM_DEFACER_META_SITENAME, 'meta_sitename', 50, 50, $obj->getVar('meta_sitename', 'e'))); + $form->addElement(new XoopsFormText(_AM_DEFACER_META_SLOGAN, 'meta_slogan', 50, 50, $obj->getVar('meta_slogan', 'e'))); + $form->addElement(new XoopsFormText(_AM_DEFACER_META_PAGETITLE, 'meta_pagetitle', 50, 50, $obj->getVar('meta_pagetitle', 'e'))); + $form->addElement(new XoopsFormTextArea(_AM_DEFACER_META_KEYWORDS, 'meta_keywords' , $obj->getVar('meta_keywords', 'e'))); + $form->addElement(new XoopsFormTextArea(_AM_DEFACER_META_DESCRIPTION, 'meta_description' , $obj->getVar('meta_description', 'e'))); + + $tray = new XoopsFormElementTray('' ,''); + $tray->addElement(new XoopsFormButton('', 'defacer_button', _SUBMIT, 'submit')); + + $btn = new XoopsFormButton('', 'reset', _CANCEL, 'button'); + if (!$obj->isNew()) { + $btn->setExtra('onclick="document.location.href=\'' . basename(__FILE__) . '\'"'); + } else { + $btn->setExtra('onclick="document.getElementById(\'form\').style.display = \'none\'; return false;"'); + } + $tray->addElement($btn); + $form->addElement($tray); + + if (!$obj->isNew()) { + $form->addElement(new XoopsFormHidden('op', 'editok')); + $form->addElement(new XoopsFormHidden('itemid', $itemid)); + } else { + $form->addElement(new XoopsFormHidden('op', 'add')); + } + + return $form->render(); +} + +?> \ No newline at end of file Added: XoopsModules/defacer/branches/mamba/defacer/admin/admin_page.php =================================================================== --- XoopsModules/defacer/branches/mamba/defacer/admin/admin_page.php (rev 0) +++ XoopsModules/defacer/branches/mamba/defacer/admin/admin_page.php 2012-02-22 11:34:02 UTC (rev 9047) @@ -0,0 +1,288 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Defacer + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: admin_page.php 0 2009-06-11 18:47:04Z trabis $ + */ + +require dirname(__FILE__) . '/admin_header.php'; + +$actions = array('list', 'add', 'edit', 'editok', 'del', 'delok', 'changestatus'); +$op = isset($_REQUEST['op']) && in_array($_REQUEST['op'], $actions) ? $_REQUEST['op'] : 'list'; + +$itemid = isset($_REQUEST['itemid']) ? intval($_REQUEST['itemid']) : 0; +$limit = isset($_REQUEST['limit']) ? intval($_REQUEST['limit']) : 15; +$start = isset($_REQUEST['start']) ? intval($_REQUEST['start']) : 0; +$query = isset($_REQUEST['query']) ? trim($_REQUEST['query']) : ''; + +switch ($op) { + case 'list': + xoops_cp_header(); + defacer_adminMenu(0); + echo defacer_index($start, $limit, $query); + xoops_cp_footer(); + break; + case 'add': + defacer_add(); + break; + case 'edit': + xoops_cp_header(); + defacer_adminMenu(0); + echo defacer_form($itemid); + xoops_cp_footer(); + break; + case 'editok': + defacer_edit($itemid); + break; + case 'del': + defacer_confirmdel($itemid); + break; + case 'delok': + defacer_del($itemid); + break; + case 'changestatus': + defacer_changestatus($itemid); + break; +} + +function defacer_index($start = 0, $limit = 0, $query = '') +{ + global $xoopsTpl; + + $defacer =& DefacerDefacer::getInstance(); + + $xoopsTpl->assign('query', $query); + + $criteria = new CriteriaCompo(); + if (!empty($query)) { + $myts =& MyTextSanitizer::getInstance(); + $criteria->add(new Criteria('page_title', $myts->addSlashes($query) . '%', 'LIKE')); + } + + $count = $defacer->getHandler('page')->getCount($criteria); + $xoopsTpl->assign('count', $count); + + $criteria->setStart($start); + $criteria->setLimit($limit); + $criteria->setSort('name'); + $criteria->setOrder('ASC'); + $objs = $defacer->getHandler('page')->getObjects($criteria); + + if ($count > $limit) { + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $nav = new XoopsPageNav($count, $limit, $start, 'start', 'op=list'); + $xoopsTpl->assign('pagenav', '<div style="float:left; padding-top:2px;" align="center">' . $nav->renderNav() . '</div>'); + } + + foreach ($objs as $obj) { + $item = $obj->getValues(); + + if (substr($obj->getVar('page_url'), -1) == '*'){ + $item['page_vurl'] = 0; + } else { + if ($obj->getVar('page_moduleid') == 1) { + $item['page_vurl'] = XOOPS_URL . '/' . $obj->getVar('page_url'); + } else { + $item['page_vurl'] = XOOPS_URL . '/modules/' . $obj->getVar('dirname') . '/' . $obj->getVar('page_url'); + } + } + + $xoopsTpl->append('items', $item); + } + + $xoopsTpl->assign('form', defacer_form()); + + return $xoopsTpl->fetch('db:defacer_admin_page.html'); +} + +function defacer_add() +{ + $defacer =& DefacerDefacer::getInstance(); + + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header(basename(__FILE__), 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + } + + if (!isset($_POST['page_moduleid']) || $_POST['page_moduleid'] == 0){ + $_POST['page_moduleid'] = 1; + } + + $obj = $defacer->getHandler('page')->create(); + $obj->setVars($_POST); + + if (!$defacer->getHandler('page')->insert($obj)) { + $msg = _AM_DEFACER_ERROR; + } else { + $msg = _AM_DEFACER_DBUPDATED; + } + + redirect_header(basename(__FILE__) , 2, $msg); +} + +function defacer_edit($itemid) +{ + $defacer =& DefacerDefacer::getInstance(); + + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header(basename(__FILE__), 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + } + + if (!isset($_POST['page_moduleid']) || $_POST['page_moduleid'] == 0){ + $_POST['page_moduleid'] = 1; + } + + $obj = $defacer->getHandler('page')->get($itemid); + $obj->setVars($_POST); + + if (!$defacer->getHandler('page')->insert($obj)) { + $msg = _AM_DEFACER_ERROR; + } else { + $msg = _AM_DEFACER_DBUPDATED; + } + + redirect_header(basename(__FILE__), 2, $msg); +} + +function defacer_del($itemid) +{ + $defacer =& DefacerDefacer::getInstance(); + + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header(basename(__FILE__),1 , implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + } + + if ($itemid <= 0) { + redirect_header(basename(__FILE__), 1); + } + + $obj = $defacer->getHandler('page')->get($itemid); + if (!is_object($obj)) { + redirect_header(basename(__FILE__), 1); + } + + if (!$defacer->getHandler('page')->delete($obj)) { + xoops_cp_header(); + xoops_error(sprintf(_AM_DEFACER_ERROR, $obj->getVar('page_id'))); + xoops_cp_footer(); + exit(); + } + + $obj = $defacer->getHandler('theme')->get($itemid); + if (is_object($obj) && !$defacer->getHandler('theme')->delete($obj)) { + xoops_cp_header(); + xoops_error(sprintf(_AM_DEFACER_ERROR, $obj->getVar('theme_id'))); + xoops_cp_footer(); + exit(); + } + + $obj = $defacer->getHandler('meta')->get($itemid); + if (is_object($obj) && !$defacer->getHandler('meta')->delete($obj)) { + xoops_cp_header(); + xoops_error(sprintf(_AM_DEFACER_ERROR, $obj->getVar('meta_id'))); + xoops_cp_footer(); + exit(); + } + + $obj = $defacer->getHandler('permission')->get($itemid); + if (is_object($obj) && !$defacer->getHandler('permission')->delete($obj)) { + xoops_cp_header(); + xoops_error(sprintf(_AM_DEFACER_ERROR, $obj->getVar('permission_id'))); + xoops_cp_footer(); + exit(); + } + + redirect_header(basename(__FILE__), 2, _AM_DEFACER_DBUPDATED); +} + +function defacer_confirmdel($itemid) +{ + xoops_cp_header(); + xoops_confirm(array('op' => 'delok', 'itemid' => $itemid), basename(__FILE__), _AM_DEFACER_RUDEL); + xoops_cp_footer(); +} + +function defacer_changestatus($itemid) +{ + $defacer =& DefacerDefacer::getInstance(); + + $obj = $defacer->getHandler('page')->get($itemid); + $obj->setVar('page_status', !$obj->getVar('page_status')); + + if (!$defacer->getHandler('page')->insert($obj)) { + $msg = _AM_DEFACER_ERROR; + }else{ + $msg = _AM_DEFACER_DBUPDATED; + } + + redirect_header(basename(__FILE__), 2, $msg); +} + +function defacer_form($itemid = 0) +{ + $defacer =& DefacerDefacer::getInstance(); + $obj = $defacer->getHandler('page')->get($itemid); + + if ($obj->isNew()) { + $ftitle = _EDIT; + } else { + $ftitle = _ADD; + } + + $form = new XoopsThemeForm($ftitle, 'page_form', basename(__FILE__), 'post', true); + + $mid = new XoopsFormSelect(_AM_DEFACER_PAGE_MODULE, 'page_moduleid', $obj->getVar('page_moduleid', 'e')); + $mid->customValidationCode[] = 'var value = document.getElementById(\'page_moduleid\').value; if (value == 0){alert("' . _AM_DEFACER_SELECTMODULE_ERR . '"); return false;}'; + + $module_handler =& xoops_gethandler('module'); + $criteria = new CriteriaCompo(new Criteria('hasmain', 1)); + $criteria->add(new Criteria('isactive', 1)); + //$criteria->setSort('name'); + //$criteria->setOrder('ASC'); xoopsModule does not accpet this :( + $moduleslist = $module_handler->getList($criteria); + $module = $module_handler->get(1); + $list = array($module->getVar('mid') => $module->getVar('name')); + $moduleslist = $list + $moduleslist; + $mid->addOptionArray($moduleslist); + $form->addElement($mid, true); + + $form->addElement(new XoopsFormText(_AM_DEFACER_PAGE_TITLE, 'page_title', 50, 255, $obj->getVar('page_title', 'e')), true); + $furl = new XoopsFormText(_AM_DEFACER_PAGE_URL, 'page_url', 50, 255, $obj->getVar('page_url', 'e')); + $furl->setDescription(_AM_DEFACER_PAGE_URL_DESC); + $form->addElement($furl, true); + $form->addElement(new XoopsFormRadioYN(_AM_DEFACER_PAGE_DISPLAY, 'page_status', $obj->getVar('page_status', 'e'), _YES, _NO)); + + $tray = new XoopsFormElementTray('' ,''); + $tray->addElement(new XoopsFormButton('', 'defacer_button', _SUBMIT, 'submit')); + + $btn = new XoopsFormButton('', 'reset', _CANCEL, 'button'); + if (!$obj->isNew()) { + $btn->setExtra('onclick="document.location.href=\'' . basename(__FILE__) . '\'"'); + } else { + $btn->setExtra('onclick="document.getElementById(\'form\').style.display = \'none\'; return false;"'); + } + $tray->addElement($btn); + $form->addElement($tray); + + if (!$obj->isNew()) { + $form->addElement(new XoopsFormHidden('op', 'editok')); + $form->addElement(new XoopsFormHidden('itemid', $itemid)); + } else { + $form->addElement(new XoopsFormHidden('op', 'add')); + } + + return $form->render(); +} +?> \ No newline at end of file Added: XoopsModules/defacer/branches/mamba/defacer/admin/admin_permission.php =================================================================== --- XoopsModules/defacer/branches/mamba/defacer/admin/admin_permission.php (rev 0) +++ XoopsModules/defacer/branches/mamba/defacer/admin/admin_permission.php 2012-02-22 11:34:02 UTC (rev 9047) @@ -0,0 +1,235 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Defacer + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: admin_permission.php 0 2009-06-11 18:47:04Z trabis $ + */ + +require dirname(__FILE__) . '/admin_header.php'; + +$actions = array('list', 'add', 'edit', 'editok', 'del', 'delok'); +$op = isset($_REQUEST['op']) && in_array($_REQUEST['op'], $actions) ? $_REQUEST['op'] : 'list'; + +$itemid = isset($_REQUEST['itemid']) ? intval($_REQUEST['itemid']) : 0; +$limit = isset($_REQUEST['limit']) ? intval($_REQUEST['limit']) : 15; +$start = isset($_REQUEST['start']) ? intval($_REQUEST['start']) : 0; + +$itemid = isset($_REQUEST['permission_id']) ? intval($_REQUEST['permission_id']) : $itemid; + +switch ($op) { + case 'list': + xoops_cp_header(); + defacer_adminMenu(1); + echo defacer_index($start, $limit); + xoops_cp_footer(); + break; + case 'add': + defacer_add(); + break; + case 'edit': + xoops_cp_header(); + defacer_adminMenu(1); + echo defacer_form($itemid); + xoops_cp_footer(); + break; + case 'editok': + defacer_edit($itemid); + break; + case 'del': + defacer_confirmdel($itemid); + break; + case 'delok': + defacer_del($itemid); + break; +} + +function defacer_index($start = 0, $limit = 0) +{ + global $xoopsTpl; + + $defacer =& DefacerDefacer::getInstance(); + + $grouplist_handler =& xoops_gethandler('group'); + $grouplist = $grouplist_handler->getObjects(null, true); + foreach (array_keys($grouplist) as $i) { + $groups[$i] = $grouplist[$i]->getVar('name'); + } + $xoopsTpl->assign('groups', $groups); + + $count = $defacer->getHandler('permission')->getCount(); + $xoopsTpl->assign('count', $count); + + $criteria = new CriteriaCompo(); + $criteria->setStart($start); + $criteria->setLimit($limit); + $objs = $defacer->getHandler('permission')->getObjects($criteria); + + if ($count > $limit) { + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $nav = new XoopsPageNav($count, $limit, $start, 'start', 'op=list'); + $xoopsTpl->assign('pagenav', '<div style="float:left; padding-top:2px;" align="center">' . $nav->renderNav() . '</div>'); + } + + foreach ($objs as $obj) { + $item = $obj->getValues(); + + $page = $defacer->getHandler('page')->get($obj->getVar('permission_id')); + $item['module'] = $page->getVar('name'); + $item['permission_title'] = $page->getVar('page_title'); + $item['permission_url'] = $page->getVar('page_url'); + $item['permission_status'] = $page->getVar('page_status'); + + if (substr($page->getVar('page_url'), -1) == '*') { + $item['permission_vurl'] = 0; + } else { + if ($page->getVar('page_moduleid') == 1){ + $item['permission_vurl'] = XOOPS_URL . '/' . $page->getVar('page_url'); + } else { + $item['permission_vurl'] = XOOPS_URL . '/modules/' . $page->getVar('dirname') . '/' . $page->getVar('page_url'); + } + } + + $xoopsTpl->append('items', $item); + } + + $xoopsTpl->assign('form', defacer_form()); + + return $xoopsTpl->fetch('db:defacer_admin_permission.html'); +} + +function defacer_add() +{ + $defacer =& DefacerDefacer::getInstance(); + + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header(basename(__FILE__), 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + } + + $obj = $defacer->getHandler('permission')->create(); + $obj->setVars($_POST); + + if (!$defacer->getHandler('permission')->insert($obj)) { + $msg = _AM_DEFACER_ERROR; + } else { + $msg = _AM_DEFACER_DBUPDATED; + } + + redirect_header(basename(__FILE__) , 2, $msg); +} + +function defacer_edit($itemid) +{ + $defacer =& DefacerDefacer::getInstance(); + + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header(basename(__FILE__), 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + } + + $obj = $defacer->getHandler('permission')->get($itemid); + $obj->setVars($_POST); + + if (!$defacer->getHandler('permission')->insert($obj)) { + $msg = _AM_DEFACER_ERROR; + } else { + $msg = _AM_DEFACER_DBUPDATED; + } + + redirect_header(basename(__FILE__), 2, $msg); +} + +function defacer_del($itemid) +{ + $defacer =& DefacerDefacer::getInstance(); + + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header(basename(__FILE__),1 , implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + } + + if ($itemid <= 0) { + redirect_header(basename(__FILE__), 1); + } + + $obj = $defacer->getHandler('permission')->get($itemid); + if (!is_object($obj)) { + redirect_header(basename(__FILE__), 1); + } + + if (!$defacer->getHandler('permission')->delete($obj)) { + xoops_cp_header(); + xoops_error(sprintf(_AM_DEFACER_ERROR, $obj->getVar('permission_id'))); + xoops_cp_footer(); + exit(); + } + + redirect_header(basename(__FILE__), 2, _AM_DEFACER_DBUPDATED); +} + +function defacer_confirmdel($itemid) +{ + xoops_cp_header(); + xoops_confirm(array('op' => 'delok', 'itemid' => $itemid), basename(__FILE__), _AM_DEFACER_RUDEL); + xoops_cp_footer(); +} + +function defacer_form($itemid = 0) +{ + $defacer =& DefacerDefacer::getInstance(); + $obj = $defacer->getHandler('permission')->get($itemid); + + if ($obj->isNew()) { + $ftitle = _EDIT; + } else { + $ftitle = _ADD; + } + + $form = new XoopsThemeForm($ftitle, 'permission_form', basename(__FILE__), 'post', true); + + $page_select = new XoopsFormSelect(_AM_DEFACER_PAGE, 'permission_id', $obj->getVar('permission_id', 'e')); + $page_select->customValidationCode[] = 'var value = document.getElementById(\'permission_id\').value; if (value == 0){alert("' . _AM_DEFACER_SELECTPAGE_ERR . '"); return false;}'; + + $criteria = new CriteriaCompo(new Criteria('page_status', 1)); + $criteria->setSort('name'); + $criteria->setOrder('ASC'); + $pageslist = $defacer->getHandler('page')->getList($criteria); + $list = array('0' => '--------------------------'); + $pageslist = $list + $pageslist; + $page_select->addOptionArray($pageslist); + $form->addElement($page_select, true); + + $form->addElement(new XoopsFormSelectGroup(_AM_DEFACER_PERMISSION_GROUPS, 'permission_groups', true, $obj->getVar('permission_groups', 'e'), 8, true)); + + $tray = new XoopsFormElementTray('' ,''); + $tray->addElement(new XoopsFormButton('', 'defacer_button', _SUBMIT, 'submit')); + + $btn = new XoopsFormButton('', 'reset', _CANCEL, 'button'); + if (!$obj->isNew()) { + $btn->setExtra('onclick="document.location.href=\'' . basename(__FILE__) . '\'"'); + } else { + $btn->setExtra('onclick="document.getElementById(\'form\').style.display = \'none\'; return false;"'); + } + $tray->addElement($btn); + $form->addElement($tray); + + if (!$obj->isNew()) { + $form->addElement(new XoopsFormHidden('op', 'editok')); + $form->addElement(new XoopsFormHidden('itemid', $itemid)); + } else { + $form->addElement(new XoopsFormHidden('op', 'add')); + } + + return $form->render(); +} +?> \ No newline at end of file Added: XoopsModules/defacer/branches/mamba/defacer/admin/admin_theme.php =================================================================== --- XoopsModules/defacer/branches/mamba/defacer/admin/admin_theme.php (rev 0) +++ XoopsModules/defacer/branches/mamba/defacer/admin/admin_theme.php 2012-02-22 11:34:02 UTC (rev 9047) @@ -0,0 +1,245 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Defacer + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: admin_theme.php 0 2009-06-11 18:47:04Z trabis $ + */ + +require dirname(__FILE__) . '/admin_header.php'; + +$actions = array('list', 'add', 'edit', 'editok', 'del', 'delok'); +$op = isset($_REQUEST['op']) && in_array($_REQUEST['op'], $actions) ? $_REQUEST['op'] : 'list'; + +$itemid = isset($_REQUEST['itemid']) ? intval($_REQUEST['itemid']) : 0; +$limit = isset($_REQUEST['limit']) ? intval($_REQUEST['limit']) : 15; +$start = isset($_REQUEST['start']) ? intval($_REQUEST['start']) : 0; + +$itemid = isset($_REQUEST['theme_id']) ? intval($_REQUEST['theme_id']) : $itemid; + +switch ($op) { + case 'list': + xoops_cp_header(); + defacer_adminMenu(1); + echo defacer_index($start, $limit); + xoops_cp_footer(); + break; + case 'add': + defacer_add(); + break; + case 'edit': + xoops_cp_header(); + defacer_adminMenu(1); + echo defacer_form($itemid); + xoops_cp_footer(); + break; + case 'editok': + defacer_edit($itemid); + break; + case 'del': + defacer_confirmdel($itemid); + break; + case 'delok': + defacer_del($itemid); + break; +} + +function defacer_index($start = 0, $limit = 0) +{ + global $xoopsTpl; + + $defacer =& DefacerDefacer::getInstance(); + + $count = $defacer->getHandler('theme')->getCount(); + $xoopsTpl->assign('count', $count); + + $criteria = new CriteriaCompo(); + $criteria->setStart($start); + $criteria->setLimit($limit); + $objs = $defacer->getHandler('theme')->getObjects($criteria); + + if ($count > $limit) { + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $nav = new XoopsPageNav($count, $limit, $start, 'start', 'op=list'); + $xoopsTpl->assign('pagenav', '<div style="float:left; padding-top:2px;" align="center">' . $nav->renderNav() . '</div>'); + } + + foreach ($objs as $obj) { + $item = $obj->getValues(); + + $page = $defacer->getHandler('page')->get($obj->getVar('theme_id')); + $item['module'] = $page->getVar('name'); + $item['theme_title'] = $page->getVar('page_title'); + $item['theme_url'] = $page->getVar('page_url'); + $item['theme_status'] = $page->getVar('page_status'); + + if (substr($page->getVar('page_url'), -1) == '*') { + $item['theme_vurl'] = 0; + } else { + if ($page->getVar('page_moduleid') == 1){ + $item['theme_vurl'] = XOOPS_URL . '/' . $page->getVar('page_url'); + } else { + $item['theme_vurl'] = XOOPS_URL . '/modules/' . $page->getVar('dirname') . '/' . $page->getVar('page_url'); + } + } + + $xoopsTpl->append('items', $item); + } + + $xoopsTpl->assign('form', defacer_form()); + + return $xoopsTpl->fetch('db:defacer_admin_theme.html'); +} + +function defacer_add() +{ + $defacer =& DefacerDefacer::getInstance(); + + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header(basename(__FILE__), 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + } + + $obj = $defacer->getHandler('theme')->create(); + $obj->setVars($_POST); + + if (!$defacer->getHandler('theme')->insert($obj)) { + $msg = _AM_DEFACER_ERROR; + } else { + $msg = _AM_DEFACER_DBUPDATED; + } + + redirect_header(basename(__FILE__) , 2, $msg); +} + +function defacer_edit($itemid) +{ + $defacer =& DefacerDefacer::getInstance(); + + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header(basename(__FILE__), 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + } + + $obj = $defacer->getHandler('theme')->get($itemid); + $obj->setVars($_POST); + + if (!$defacer->getHandler('theme')->insert($obj)) { + $msg = _AM_DEFACER_ERROR; + } else { + $msg = _AM_DEFACER_DBUPDATED; + } + + redirect_header(basename(__FILE__), 2, $msg); +} + +function defacer_del($itemid) +{ + $defacer =& DefacerDefacer::getInstance(); + + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header(basename(__FILE__),1 , implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + } + + if ($itemid <= 0) { + redirect_header(basename(__FILE__), 1); + } + + $obj = $defacer->getHandler('theme')->get($itemid); + if (!is_object($obj)) { + redirect_header(basename(__FILE__), 1); + } + + if (!$defacer->getHandler('theme')->delete($obj)) { + xoops_cp_header(); + xoops_error(sprintf(_AM_DEFACER_ERROR, $obj->getVar('theme_id'))); + xoops_cp_footer(); + exit(); + } + + redirect_header(basename(__FILE__), 2, _AM_DEFACER_DBUPDATED); +} + +function defacer_confirmdel($itemid) +{ + xoops_cp_header(); + xoops_confirm(array('op' => 'delok', 'itemid' => $itemid), basename(__FILE__), _AM_DEFACER_RUDEL); + xoops_cp_footer(); +} + +function defacer_form($itemid = 0) +{ + $defacer =& DefacerDefacer::getInstance(); + $obj = $defacer->getHandler('theme')->get($itemid); + + if ($obj->isNew()) { + $ftitle = _EDIT; + } else { + $ftitle = _ADD; + } + + $form = new XoopsThemeForm($ftitle, 'theme_form', basename(__FILE__), 'post', true); + + $page_select = new XoopsFormSelect(_AM_DEFACER_PAGE, 'theme_id', $obj->getVar('theme_id', 'e')); + $page_select->customValidationCode[] = 'var value = document.getElementById(\'theme_id\').value; if (value == 0){alert("' . _AM_DEFACER_SELECTPAGE_ERR . '"); return false;}'; + + $criteria = new CriteriaCompo(new Criteria('page_status', 1)); + $criteria->setSort('name'); + $criteria->setOrder('ASC'); + $pageslist = $defacer->getHandler('page')->getList($criteria); + $list = array('0' => '--------------------------'); + $pageslist = $list + $pageslist; + $page_select->addOptionArray($pageslist); + $form->addElement($page_select, true); + + $dirname = XOOPS_THEME_PATH . '/'; + $dirlist = array(); + if (is_dir($dirname) && $handle = opendir($dirname)) { + while (false !== ($file = readdir($handle))) { + if (!preg_match("/^[\.]{1,2}$/", $file)) { + if (strtolower($file) != 'cvs' && is_dir($dirname . $file) && $file != 'z_changeable_theme') { + $dirlist[$file] = $file; + } + } + } + closedir($handle); + asort($dirlist); + reset($dirlist); + } + + $theme_select = new XoopsFormSelect(_AM_DEFACER_THEME, 'theme_name' , $obj->getVar('theme_name', 'e')); + $theme_select->addOptionArray($dirlist); + $form->addElement($theme_select); + + $tray = new XoopsFormElementTray('' ,''); + $tray->addElement(new XoopsFormButton('', 'defacer_button', _SUBMIT, 'submit')); + + $btn = new XoopsFormButton('', 'reset', _CANCEL, 'button'); + if (!$obj->isNew()) { + $btn->setExtra('onclick="document.location.href=\'' . basename(__FILE__) . '\'"'); + } else { + $btn->setExtra('onclick="document.getElementById(\'form\').style.display = \'none\'; return false;"'); + } + $tray->addElement($btn); + $form->addElement($tray); + + if (!$obj->isNew()) { + $form->addElement(new XoopsFormHidden('op', 'editok')); + $form->addElement(new XoopsFormHidden('itemid', $itemid)); + } else { + $form->addElement(new XoopsFormHidden('op', 'add')); + } + + return $form->render(); +} +?> \ No newline at end of file Added: XoopsModules/defacer/branches/mamba/defacer/admin/index.html =================================================================== --- XoopsModules/defacer/branches/mamba/defacer/admin/index.html (rev 0) +++ XoopsModules/defacer/branches/mamba/defacer/admin/index.html 2012-02-22 11:34:02 UTC (rev 9047) @@ -0,0 +1 @@ +<script>history.go(-1);</script> Added: XoopsModules/defacer/branches/mamba/defacer/admin/index.php =================================================================== --- XoopsModules/defacer/branches/mamba/defacer/admin/index.php (rev 0) +++ XoopsModules/defacer/branches/mamba/defacer/admin/index.php 2012-02-22 11:34:02 UTC (rev 9047) @@ -0,0 +1,22 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Defacer + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: index.php 0 2009-06-11 18:47:04Z trabis $ + */ + +include dirname(__FILE__) . '/admin_page.php'; +?> \ No newline at end of file Added: XoopsModules/defacer/branches/mamba/defacer/admin/menu.php =================================================================== --- XoopsModules/defacer/branches/mamba/defacer/admin/menu.php (rev 0) +++ XoopsModules/defacer/branches/mamba/defacer/admin/menu.php 2012-02-22 11:34:02 UTC (rev 9047) @@ -0,0 +1,44 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Defacer + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id: menu.php 0 2009-06-11 18:47:04Z trabis $ + */ + +defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); + +$i = -1; +$i++; +$adminmenu[$i]['title'] = _MI_DEFACER_PAGEMANAGER; +$adminmenu[$i]['link'] = "admin/admin_page.php"; + +$i++; +$adminmenu[$i]['title'] = _MI_DEFACER_THEMEMANAGER; +$adminmenu[$i]['link'] = "admin/admin_theme.php"; + +$i++; +$adminmenu[$i]['title'] = _MI_DEFACER_METAMANAGER; +$adminmenu[$i]['link'] = "admin/admin_meta.php"; + +$i++; +$adminmenu[$i]['title'] = _MI_DEFACER_PERMISSIONMANAGER; +$adminmenu[$i]['link'] = "admin/admin_permission.php"; + +$i++; +$adminmenu[$i]['title'] = _MI_DEFACER_ABOUT; +$adminmenu[$i]['link'] = "admin/admin_about.php"; + +?> \ No newline at end of file Added: XoopsModules/defacer/branches/mamba/defacer/changelog.txt =================================================================== --- XoopsModules/defacer/branches/mamba/defacer/changelog.txt (rev 0) +++ XoopsModules/defacer/branches/mamba/defacer/changelog.txt 2012-02-22 11:34:02 UTC (rev 9047) @@ -0,0 +1,19 @@ +<b><u>=> Version 1.0 Final (2009-09-05)</u></b> +Added : jgrowl redirection. +Added : blocks anywhere. + +<b><u>=> Version 1.0 RC (2009-09-01)</u></b> +Improved : Refactored admin area. +Added : Defacer in xoopsLogger Extra. + +<b><u>=> Version 1.0 Alpha (2008-10-27)</u></b> +- First public release of the module. +<b><u>=> Version 1.0 Beta (2008-11-08)</u></b> +Improved : More friendly admin area. +Improved : Less queries needed. +Improved : Less language definitions needed. +Added : Defacer in xoopsLogger. +Added : Settings to disable each Defacer actions. + +<b><u>=> Version 1.0 Alpha (2008-10-27)</u></b> +- First public release of the module. Added: XoopsModules/defacer/branches/mamba/defacer/class/about.php =================================================================== --- XoopsModules/defacer/branches/mamba/defacer/class/about.php (rev 0) +++ XoopsModules/defacer/branches/mamba/defacer/class/about.php 2012-02-22 11:34:02 UTC (rev 9047) @@ -0,0 +1,179 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Defacer + * @since 1.0 + * @author trabis <lus...@gm...> + * @author The SmartFactory <www.smartfactory.ca> + * @version $Id: about.php 0 2009-06-11 18:47:04Z trabis $ + */ + +defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); + +/** + * Class About is a simple class that lets you build an about page + * @author The SmartFactory <www.smartfactory.ca> + */ + +class DefacerAbout +{ + var $_lang_aboutTitle; + var $_lang_author_info; + var $_lang_developer_lead; + var $_lang_developer_contributor; + var $_lang_developer_website; + var $_lang_developer_email; + var $_lang_developer_credits; + var $_lang_module_info; + var $_lang_module_status; + var $_lang_module_release_date; + var $_lang_module_demo; + var $_lang_module_support; + var $_lang_module_bug; + var $_lang_module_submit_bug; + var $_lang_module_feature; + var $_... [truncated message content] |
From: <txm...@us...> - 2012-02-27 19:38:50
|
Revision: 9074 http://xoops.svn.sourceforge.net/xoops/?rev=9074&view=rev Author: txmodxoops Date: 2012-02-27 19:38:40 +0000 (Mon, 27 Feb 2012) Log Message: ----------- Creaction of new module feeds beta for testing Added Paths: ----------- XoopsModules/feeds/ XoopsModules/feeds/branches/ XoopsModules/feeds/releases/ XoopsModules/feeds/releases/1.01/ XoopsModules/feeds/releases/1.01/feeds/ XoopsModules/feeds/releases/1.01/feeds/Frameworks/ XoopsModules/feeds/releases/1.01/feeds/Frameworks/moduleclasses/ XoopsModules/feeds/releases/1.01/feeds/Frameworks/moduleclasses/icons/ XoopsModules/feeds/releases/1.01/feeds/Frameworks/moduleclasses/icons/32/ XoopsModules/feeds/releases/1.01/feeds/Frameworks/moduleclasses/icons/32/addfeed.png XoopsModules/feeds/releases/1.01/feeds/Frameworks/moduleclasses/icons/32/makeplugins.png XoopsModules/feeds/releases/1.01/feeds/modules/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/about.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/admin_footer.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/admin_header.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/create_plugin.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/index.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/menu.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/plugin.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/blocks/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/blocks/blocks_plugin.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/blocks/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/class/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/class/feeds_plugin.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/class/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/css/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/css/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/changelog.txt XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/credits.txt XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/install.txt XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/lang_diff.txt XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/licence.txt XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/readme.txt XoopsModules/feeds/releases/1.01/feeds/modules/feeds/header.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/images/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/images/feeds_slogo.png XoopsModules/feeds/releases/1.01/feeds/modules/feeds/images/icons/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/images/icons/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/images/icons/off.png XoopsModules/feeds/releases/1.01/feeds/modules/feeds/images/icons/on.png XoopsModules/feeds/releases/1.01/feeds/modules/feeds/images/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/images/menu/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/images/menu/bg.png XoopsModules/feeds/releases/1.01/feeds/modules/feeds/images/menu/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/images/menu/left_both.png XoopsModules/feeds/releases/1.01/feeds/modules/feeds/images/menu/right_both.png XoopsModules/feeds/releases/1.01/feeds/modules/feeds/include/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/include/configs.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/include/functions.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/include/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/include/install.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/index.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/english/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/english/admin.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/english/blocks.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/english/help/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/english/help/help.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/english/help/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/english/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/english/main.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/english/modinfo.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/italian/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/italian/admin.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/italian/blocks.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/italian/help/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/italian/help/help.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/italian/help/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/italian/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/italian/main.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/language/italian/modinfo.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/plugins/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/plugins/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/singlefeed.php XoopsModules/feeds/releases/1.01/feeds/modules/feeds/sql/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/sql/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/sql/mysql.sql XoopsModules/feeds/releases/1.01/feeds/modules/feeds/templates/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/templates/admin/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/templates/admin/feeds_admin_about.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/templates/admin/feeds_admin_help.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/templates/admin/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/templates/blocks/ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/templates/blocks/feeds_plugin_block_day.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/templates/blocks/feeds_plugin_block_random.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/templates/blocks/feeds_plugin_block_recent.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/templates/blocks/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/templates/feeds_footer.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/templates/feeds_header.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/templates/feeds_index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/templates/feeds_rss.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/templates/feeds_singlefeed.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/templates/index.html XoopsModules/feeds/releases/1.01/feeds/modules/feeds/xoops_version.php XoopsModules/feeds/trunk/ Added: XoopsModules/feeds/releases/1.01/feeds/Frameworks/moduleclasses/icons/32/addfeed.png =================================================================== (Binary files differ) Property changes on: XoopsModules/feeds/releases/1.01/feeds/Frameworks/moduleclasses/icons/32/addfeed.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/feeds/releases/1.01/feeds/Frameworks/moduleclasses/icons/32/makeplugins.png =================================================================== (Binary files differ) Property changes on: XoopsModules/feeds/releases/1.01/feeds/Frameworks/moduleclasses/icons/32/makeplugins.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/about.php =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/about.php (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/about.php 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1,48 @@ +<?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) + * **************************************************************************** + * FEEDS - 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 feeds + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sun 2012/02/26 0:02:53 : Timgno Exp $ + * **************************************************************************** + */ + + +include "admin_header.php"; +xoops_cp_header(); + +$aboutAdmin = new ModuleAdmin(); + +echo $aboutAdmin->addNavigation("about.php"); +echo $aboutAdmin->renderabout($GLOBALS['xoopsModuleConfig']['id_paypal'], false); + +include "admin_footer.php"; \ No newline at end of file Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/admin_footer.php =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/admin_footer.php (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/admin_footer.php 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1,45 @@ +<?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) + * **************************************************************************** + * FEEDS - 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 feeds + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sun 2012/02/26 0:02:53 : 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_FEEDS_MAINTAINEDBY." + <a href='http://www.txmodxoops.org/modules/newbb/' title='Visit TXMod Xoops Community' class='tooltip' rel='external'>TXMod Xoops Community</a></div>"; +xoops_cp_footer(); Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/admin_header.php =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/admin_header.php (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/admin_header.php 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1,95 @@ +<?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) + * **************************************************************************** + * FEEDS - 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 feeds + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sun 2012/02/26 0:02:53 : 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_ERROR_NOFRAMEWORKS); + xoops_cp_footer(); + //return false; + } +$dirname = basename(dirname(dirname( __FILE__ ) )); +$module_handler =& xoops_gethandler('module'); +$xoopsModule = & $module_handler->getByDirname($dirname); +$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); +$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); +$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); +$pluginHandler=& xoops_getModuleHandler('feeds_plugin', $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); +//xoops_cp_header(); + +//Load languages +xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); \ No newline at end of file Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/create_plugin.php =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/create_plugin.php (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/create_plugin.php 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1,79 @@ +<?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) + * **************************************************************************** + * FEEDS - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * 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. + * + * ------------------------------------------------------------------------ + * + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package feeds + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sat 2012/02/25 20:23:53 : Timgno Exp $ + * **************************************************************************** + */ +include 'admin_header.php'; +xoops_cp_header(); + +$createAdmin = new ModuleAdmin(); +echo $createAdmin->addNavigation('create_plugin.php'); + +$op = feeds_CleanVars($_REQUEST, 'op', 'default', 'string'); + +switch ($op) { + case "make_plugin": + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('plugin_id', 0, '>')); + $plugin_arr = $pluginHandler->getall($criteria); + unset($criteria); + //Debut + echo '<table width="100%" cellspacing="1" style="background: #fff;"> + <tr class="marg2"> + <td class="ui-corner-all">'; + // Files cicles + foreach (array_keys($plugin_arr) as $i) + { + //Variables + $plugin_id = $plugin_arr[$i]->getVar('plugin_id'); + $plugin_name = $plugin_arr[$i]->getVar('plugin_name'); + $plugin_table = $plugin_arr[$i]->getVar('plugin_table'); + $plugin_code = $plugin_arr[$i]->getVar('plugin_code'); + + //Creation of plugin files + feeds_MakePlugin($plugin_name, $plugin_table, $plugin_id, $plugin_code, + _AM_FEEDS_OK_WRITED, _AM_FEEDS_NOTOK_WRITABLE, _AM_FEEDS_NOTOK_ACCESSIBLE); + } + echo '</td></tr></table>'; + break; + + case "default": + default: + + include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php"); + $action = $_SERVER['REQUEST_URI']; + + $form = new XoopsThemeForm(_AM_FEEDS_PLUGIN_MAKE, 'form_creation', $action, 'post', true); + + $plugins_select = new XoopsFormSelect(_AM_FEEDS_PLUGIN_MAKELIST, 'plugin_name', 'plugin_name', 10, true); + $plugins_select->addOptionArray($pluginHandler->getList()); + $form->addElement($plugins_select, true); + + $form->addElement(new XoopsFormHidden('op', 'make_plugin')); + $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); + $form->display(); + break; +} +include "admin_footer.php"; \ No newline at end of file Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/index.html =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/index.html (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/index.html 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/index.php =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/index.php (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/index.php 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1,62 @@ +<?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) + * **************************************************************************** + * FEEDS - 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 feeds + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sun 2012/02/26 0:02:53 : Timgno Exp $ + * **************************************************************************** + */ + +include "admin_header.php"; +xoops_cp_header(); + + $indexAdmin = new ModuleAdmin(); + + //count "total" + $count_plugin = $pluginHandler->getCount(); + //count "online" + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria("plugin_online", 1)); + $plugin_online = $pluginHandler->getCount($criteria); + $criteria->add(new Criteria("plugin_pending", 1)); + $plugin_pending = $pluginHandler->getCount($criteria); + + $indexAdmin->addInfoBox(_AM_FEEDS_PLUGIN); + $indexAdmin->addInfoBoxLine(_AM_FEEDS_PLUGIN,_AM_FEEDS_THEREARE_PLUGIN, $count_plugin); + $indexAdmin->addInfoBoxLine(_AM_FEEDS_PLUGIN,_AM_FEEDS_THEREARE_PLUGIN_ONLINE, $plugin_online); + $indexAdmin->addInfoBoxLine(_AM_FEEDS_PLUGIN,_AM_FEEDS_THEREARE_PLUGIN_PENDING, $plugin_pending); + + echo $indexAdmin->addNavigation("index.php") ; + echo $indexAdmin->renderIndex(); + +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/menu.php =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/menu.php (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/menu.php 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1,46 @@ +<?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) + * **************************************************************************** + * FEEDS - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * 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. + * + * ------------------------------------------------------------------------ + * + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package feeds + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sat 2012/02/25 20:23:53 : 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_FEEDS_ADMENU1; +$adminmenu[$i]["link"] = "admin/index.php"; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/home.png"; $i++; +$adminmenu[$i]["title"] = _MI_FEEDS_ADMENU2; +$adminmenu[$i]["link"] = "admin/plugin.php"; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/addfeed.png"; $i++; +$adminmenu[$i]["title"] = _MI_FEEDS_ADMENU3; +$adminmenu[$i]["link"] = "admin/create_plugin.php"; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/makeplugins.png"; $i++; +$adminmenu[$i]["title"] = _MI_FEEDS_ADMENU4; +$adminmenu[$i]["link"] = "admin/about.php"; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/about.png"; +unset( $i ); \ No newline at end of file Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/plugin.php =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/plugin.php (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/admin/plugin.php 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1,241 @@ +<?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) + * **************************************************************************** + * FEEDS - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * 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. + * + * ------------------------------------------------------------------------ + * + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package feeds + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sat 2012/02/25 20:23:53 : Timgno Exp $ + * **************************************************************************** + */ +include "admin_header.php"; +xoops_cp_header(); +global $pathImageIcon; + +//On recupere la valeur de l argument op dans l URL$ +$op = feeds_CleanVars($_REQUEST, 'op', 'list_plugin', 'string'); +$pluginAdmin = new ModuleAdmin(); +switch ($op) +{ + case "list_plugin": + default: + echo $pluginAdmin->addNavigation('plugin.php'); + $pluginAdmin->addItemButton(_AM_FEEDS_NEWPLUGIN, 'plugin.php?op=new_plugin', 'add'); + echo $pluginAdmin->renderButton(); + + $criteria = new CriteriaCompo(); + $criteria->setSort("plugin_id"); + $criteria->setOrder("ASC"); + $numrows = $pluginHandler->getCount(); + + if (isset($_REQUEST['limit'])) { + $criteria->setLimit($_REQUEST['limit']); + $limit = $_REQUEST['limit']; + } else { + $criteria->setLimit($GLOBALS['xoopsModuleConfig']['perpageadmin']); + $limit = $GLOBALS['xoopsModuleConfig']['perpageadmin']; + } + if (isset($_REQUEST['start'])) { + $criteria->setStart($_REQUEST['start']); + $start = $_REQUEST['start']; + } else { + $criteria->setStart(0); + $start = 0; + } + + $document_tri = 1; + $document_order = 1; + if (isset($_REQUEST['document_order'])) { + if ($_REQUEST['document_order']==1){ + $criteria->setOrder('ASC'); + $document_order=1; + } + if ($_REQUEST['document_order']==2){ + $criteria->setOrder('DESC'); + $document_order=2; + } + } else { + $criteria->setOrder('DESC'); + } + $plugin_arr = $pluginHandler->getall($criteria); + unset($criteria); + if ( $numrows > $limit ) { + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit=' . $limit . '&document_tri=' . $document_tri. '&document_order=' . $document_order); + $pagenav = $pagenav->renderNav(4); + } else { + $pagenav = ''; + } + + // Fixed tables + if ($numrows>0) + { + echo "<table width='100%' cellspacing='1' class='outer'> + <tr> + <th class='center'>"._AM_FEEDS_PLUGIN_NAME."</th> + <th class='center'>"._AM_FEEDS_PLUGIN_VERSION."</th> + <th class='center'>"._AM_FEEDS_PLUGIN_IMG."</th> + <th class='center'>"._AM_FEEDS_PLUGIN_TABLE."</th> + <th class='center'>"._AM_FEEDS_PLUGIN_CODE."</th> + <th class='center'>"._AM_FEEDS_PLUGIN_WEIGHT."</th> + <th class='center'>"._AM_FEEDS_PLUGIN_SUBMITTER."</th> + <th class='center'>"._AM_FEEDS_PLUGIN_CREATED."</th> + <th class='center'>"._AM_FEEDS_PLUGIN_ONLINE."</th> + <th class='center' width='10%'>"._AM_FEEDS_FORMACTION."</th> + </tr>"; + + $class = "odd"; + + foreach (array_keys($plugin_arr) as $i) + { + echo "<tr class='".$class."'>"; + $class = ($class == "even") ? "odd" : "even"; + echo "<td class='center'>".$plugin_arr[$i]->getVar("plugin_name")."</td>"; + echo "<td class='center'>".$plugin_arr[$i]->getVar("plugin_version")."</td>"; + echo "<td class='center'><img src='".XOOPS_UPLOAD_URL."/feeds/images/".$plugin_arr[$i]->getVar("plugin_img")."' height='30px' alt='plugin_img'></td>"; + echo "<td class='center'>".$plugin_arr[$i]->getVar("plugin_table")."</td>"; + echo "<td class='center'>".$plugin_arr[$i]->getVar("plugin_code")."</td>"; + echo "<td class='center'>".$plugin_arr[$i]->getVar("plugin_weight")."</td>"; + echo "<td class='center'>".XoopsUser::getUnameFromId($plugin_arr[$i]->getVar("plugin_submitter"),"S")."</td>"; + echo "<td class='center'>".formatTimeStamp($plugin_arr[$i]->getVar("plugin_created"),"S")."</td>"; + + $online = $plugin_arr[$i]->getVar("plugin_online"); + + if( $online == 1 ) { + echo "<td class='center'><a href='./plugin.php?op=update_online_plugin&plugin_id=".$plugin_arr[$i]->getVar("plugin_id")."&plugin_online=0'><img src=".$pathImageIcon."/on.png border='0' alt='"._AM_FEEDS_ON."' title='"._AM_FEEDS_ON."'></a></td>"; + } else { + echo "<td class='center'><a href='./plugin.php?op=update_online_plugin&plugin_id=".$plugin_arr[$i]->getVar("plugin_id")."&plugin_online=1'><img src=".$pathImageIcon."/off.png border='0' alt='"._AM_FEEDS_OFF."' title='"._AM_FEEDS_OFF."'></a></td>"; + } + echo "<td class='center' width='10%'> + <a href='plugin.php?op=edit_plugin&plugin_id=".$plugin_arr[$i]->getVar("plugin_id")."'><img src=".$pathImageIcon."/edit.png alt='"._EDIT."' title='"._EDIT."'></a> + <a href='plugin.php?op=delete_plugin&plugin_id=".$plugin_arr[$i]->getVar("plugin_id")."'><img src=".$pathImageIcon."/delete.png alt='"._DELETE."' title='"._DELETE."'></a> + </td>"; + echo "</tr>"; + } + echo "</table><br />"; + if ( $numrows > $limit ) { + echo "<div class='right'>".$pagenav."</div><br />"; + } + } + break; + + case "new_plugin": + echo $pluginAdmin->addNavigation("plugin.php"); + $pluginAdmin->addItemButton(_AM_FEEDS_PLUGINLIST, 'plugin.php?op=list_plugin', 'list'); + echo $pluginAdmin->renderButton(); + + $obj =& $pluginHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case "save_plugin": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("plugin.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["plugin_id"])) { + $obj =& $pluginHandler->get($_REQUEST["plugin_id"]); + } else { + $obj =& $pluginHandler->create(); + } + + //Form plugin_name + $obj->setVar("plugin_name", $_REQUEST["plugin_name"]); + //Form plugin_version + $obj->setVar("plugin_version", $_REQUEST["plugin_version"]); + //Form plugin_img + include_once XOOPS_ROOT_PATH."/class/uploader.php"; + $uploaddir = XOOPS_UPLOAD_PATH."/feeds/images/"; + $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']["img_mimetypes"], + $GLOBALS['xoopsModuleConfig']["img_size"], null, null); + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + $uploader->setPrefix("plugin_img_") ; + $uploader->fetchMedia($_POST['xoops_upload_file'][0]); + if (!$uploader->upload()) { + $errors = $uploader->getErrors(); + redirect_header("javascript:history.go(-1)",3, $errors); + } else { + $obj->setVar("plugin_img", $uploader->getSavedFileName()); + } + } else { + $obj->setVar("plugin_img", $_REQUEST["plugin_img"]); + } + //Form plugin_table + $obj->setVar("plugin_table", $_REQUEST["plugin_table"]); + //Form plugin_weight + $obj->setVar("plugin_weight", $_REQUEST["plugin_weight"]); + //Form plugin_code + $obj->setVar("plugin_code", $_REQUEST["plugin_code"]); + //Form plugin_submitter + $obj->setVar("plugin_submitter", $_REQUEST["plugin_submitter"]); + //Form plugin_created + $obj->setVar("plugin_created", strtotime($_REQUEST["plugin_created"])); + //Form plugin_online + $verif_plugin_online = ($_REQUEST["plugin_online"] == 1) ? "1" : "0"; + $obj->setVar("plugin_online", $verif_plugin_online); + + if ($pluginHandler->insert($obj)) { + redirect_header("plugin.php?op=list_plugin", 2, _AM_FEEDS_FORMOK); + } + + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + $form->display(); + break; + + case "edit_plugin": + echo $pluginAdmin->addNavigation("plugin.php"); + $pluginAdmin->addItemButton(_AM_FEEDS_NEWPLUGIN, 'plugin.php?op=new_plugin', 'add'); + $pluginAdmin->addItemButton(_AM_FEEDS_PLUGINLIST, 'plugin.php?op=list_plugin', 'list'); + echo $pluginAdmin->renderButton(); + $obj = $pluginHandler->get($_REQUEST["plugin_id"]); + $form = $obj->getForm(); + $form->display(); + break; + + case "delete_plugin": + $obj =& $pluginHandler->get($_REQUEST["plugin_id"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("plugin.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($pluginHandler->delete($obj)) { + redirect_header("plugin.php", 3, _AM_FEEDS_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array("ok" => 1, "plugin_id" => $_REQUEST["plugin_id"], "op" => "delete_plugin"), $_SERVER["REQUEST_URI"], sprintf(_AM_FEEDS_FORMSUREDEL, $obj->getVar("plugin"))); + } + break; + + case "update_online_plugin": + + if (isset($_REQUEST["plugin_id"])) { + $obj =& $pluginHandler->get($_REQUEST["plugin_id"]); + } + $obj->setVar("plugin_online", $_REQUEST["plugin_online"]); + if ($pluginHandler->insert($obj)) { + redirect_header("plugin.php", 3, _AM_FEEDS_FORMOK); + } + echo $obj->getHtmlErrors(); + break; +} +include "admin_footer.php"; \ No newline at end of file Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/blocks/blocks_plugin.php =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/blocks/blocks_plugin.php (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/blocks/blocks_plugin.php 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1,95 @@ +<?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) + * **************************************************************************** + * FEEDS - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * 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. + * + * ------------------------------------------------------------------------ + * + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package feeds + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sat 2012/02/25 20:23:53 : Timgno Exp $ + * **************************************************************************** + */ +include_once XOOPS_ROOT_PATH."/modules/feeds/include/functions.php"; +function b_feeds_plugin($options) { +$myts =& MyTextSanitizer::getInstance(); + +$plugin = array(); +$type_block = $options[0]; +$nb_plugin = $options[1]; +$lenght_title = $options[2]; + +$pluginHandler =& xoops_getModuleHandler("feeds_plugin", "feeds"); +$criteria = new CriteriaCompo(); +array_shift($options); +array_shift($options); +array_shift($options); + +switch ($type_block) +{ + // pour le bloc: plugin recents + case "recent": + $criteria->add(new Criteria("plugin_online", 1)); + $criteria->setSort("plugin_created"); + $criteria->setOrder("DESC"); + break; + // pour le bloc: plugin du jour + case "day": + $criteria->add(new Criteria("plugin_online", 1)); + $criteria->add(new Criteria("plugin_created", strtotime(date("Y/m/d")), ">=")); + $criteria->add(new Criteria("plugin_created", strtotime(date("Y/m/d"))+86400, "<=")); + $criteria->setSort("plugin_created"); + $criteria->setOrder("ASC"); + break; + // pour le bloc: plugin aléatoires + case "random": + $criteria->add(new Criteria("plugin_online", 1)); + $criteria->setSort("RAND()"); + break; +} + + +$criteria->setLimit($nb_plugin); +$plugin_arr = $pluginHandler->getall($criteria); + foreach (array_keys($plugin_arr) as $i) + { + $plugin[$i]["plugin_id"] = $plugin_arr[$i]->getVar("plugin_id"); + $plugin[$i]["plugin_online"] = $plugin_arr[$i]->getVar("plugin_online"); + $plugin[$i]["plugin_submitter"] = $plugin_arr[$i]->getVar("plugin_submitter"); + $plugin[$i]["plugin_created"] = $plugin_arr[$i]->getVar("plugin_created"); + $plugin[$i]["plugin_online"] = $plugin_arr[$i]->getVar("plugin_online"); + } +return $plugin; +} + +function b_feeds_plugin_edit($options) { + $form = ""._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_FEEDS_PLUGIN_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_FEEDS_PLUGIN_CATTODISPLAY."<br /><select name=\"options[]\" multiple=\"multiple\" size=\"5\">"; + $form .= "<option value=\"0\" " . (array_search(0, $options) === false ? "" : "selected=\"selected\"") . ">" ._MB_FEEDS_PLUGIN_ALLCAT . "</option>"; + foreach (array_keys($topic_arr) as $i) { + $form .= "<option value=\"" . $topic_arr[$i]->getVar("plugin_id") . "\" " . (array_search($topic_arr[$i]->getVar("plugin_id"), $options) === false ? "" : "selected=\"selected\"") . ">".$topic_arr[$i]->getVar("plugin_name")."</option>"; + } + $form .= "</select>"; + return $form; +} \ No newline at end of file Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/blocks/index.html =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/blocks/index.html (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/blocks/index.html 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/class/feeds_plugin.php =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/class/feeds_plugin.php (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/class/feeds_plugin.php 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1,118 @@ +<?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) + * **************************************************************************** + * FEEDS - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * 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. + * + * ------------------------------------------------------------------------ + * + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package feeds + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sat 2012/02/25 20:23:53 : Timgno Exp $ + * **************************************************************************** + */ +if (!defined("XOOPS_ROOT_PATH")) { + die("XOOPS root path not defined"); +} + +if (!class_exists("XoopsPersistableObjectHandler")) { + include_once XOOPS_ROOT_PATH."/kernel/object.php"; +} + +class feeds_plugin extends XoopsObject +{ + //Constructor + function __construct() + { + $this->XoopsObject(); + $this->initVar("plugin_id", XOBJ_DTYPE_INT, null, false, 8); + $this->initVar("plugin_name", XOBJ_DTYPE_TXTBOX, null, false, 20); + $this->initVar("plugin_version", XOBJ_DTYPE_TXTBOX, null, false, 5); + $this->initVar("plugin_img", XOBJ_DTYPE_TXTBOX, null, false, 100); + $this->initVar("plugin_table", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("plugin_weight", XOBJ_DTYPE_INT, null, false, 11); + $this->initVar("plugin_code", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("plugin_submitter", XOBJ_DTYPE_INT, null, false, 10); + $this->initVar("plugin_created", XOBJ_DTYPE_INT, null, false, 10); + $this->initVar("plugin_online", XOBJ_DTYPE_INT, null, false, 1); + } + + function feeds_plugin() + { + $this->__construct(); + } + + function getForm($action = false) + { + global $xoopsDB, $xoopsModuleConfig; + + if ($action === false) { + $action = $_SERVER["REQUEST_URI"]; + } + + $title = $this->isNew() ? sprintf(_AM_FEEDS_PLUGIN_ADD) : sprintf(_AM_FEEDS_PLUGIN_EDIT); + + include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php"); + + $form = new XoopsThemeForm($title, "form", $action, "post", true); + $form->setExtra('enctype="multipart/form-data"'); + + $form->addElement(new XoopsFormText(_AM_FEEDS_PLUGIN_NAME, "plugin_name", 50, 255, $this->getVar("plugin_name")), true); + $form->addElement(new XoopsFormText(_VERSION, "plugin_version", 10, 25, $this->getVar("plugin_version")), true); + + $plugin_img = $this->getVar("plugin_img") ? $this->getVar("plugin_img") : 'blank.gif'; + + $uploadirectory = '/uploads/feeds/images'; + $imgtray = new XoopsFormElementTray(_AM_FEEDS_PLUGIN_IMG,'<br />'); + $imgpath = sprintf(_AM_FEEDS_FORMIMAGE_PATH, $uploadirectory); + $imageselect = new XoopsFormSelect($imgpath, 'plugin_img', $plugin_img); + $image_array = XoopsLists :: getImgListAsArray( XOOPS_ROOT_PATH.$uploadirectory ); + foreach( $image_array as $image ) { + $imageselect->addOption("$image", $image); + } + $imageselect->setExtra( "onchange='showImgSelected(\"image\", \"plugin_img\", \"".$uploadirectory."\", \"\", \"".XOOPS_URL."\")'" ); + $imgtray->addElement($imageselect, false); + $imgtray->addElement( new XoopsFormLabel( '', "<br /><img src='".XOOPS_URL."/".$uploadirectory."/".$plugin_img."' name='image' id='image' alt='' />" ) ); + $fileseltray = new XoopsFormElementTray('','<br />'); + $fileseltray->addElement(new XoopsFormFile(_AM_FEEDS_FORMUPLOAD , "plugin_img", $GLOBALS['xoopsModuleConfig']["img_size"]),false); + $fileseltray->addElement(new XoopsFormLabel(''), false); + $imgtray->addElement($fileseltray); + $form->addElement($imgtray); + + $form->addElement(new XoopsFormText(_AM_FEEDS_PLUGIN_TABLE, "plugin_table", 50, 255, $this->getVar("plugin_table")), true); + $form->addElement(new XoopsFormText(_AM_FEEDS_PLUGIN_CODE, "plugin_code", 50, 255, $this->getVar("plugin_code")), true); + $form->addElement(new XoopsFormText(_WEIGHT, "plugin_weight", 10, 25, $this->getVar("plugin_weight")), true); + $form->addElement(new XoopsFormSelectUser(_SUBMITTER, "plugin_submitter", false, $this->getVar("plugin_submitter"), 1, false), true); + $form->addElement(new XoopsFormTextDateSelect(_CREATED, "plugin_created", "", $this->getVar("plugin_created"))); + $plugin_online = $this->isNew() ? 0 : $this->getVar("plugin_online"); + $check_plugin_online = new XoopsFormCheckBox(_ONLINE, "plugin_online", $plugin_online); + $check_plugin_online->addOption(1, " "); + $form->addElement($check_plugin_online); + + $form->addElement(new XoopsFormHidden("op", "save_plugin")); + $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit")); + return $form; + } +} +class feedsfeeds_pluginHandler extends XoopsPersistableObjectHandler +{ + function __construct(&$db) + { + parent::__construct($db, "feeds_plugin", "feeds_plugin", "plugin_id", "plugin_name"); + } +} +?> \ No newline at end of file Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/class/index.html =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/class/index.html (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/class/index.html 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/css/index.html =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/css/index.html (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/css/index.html 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/changelog.txt =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/changelog.txt (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/changelog.txt 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1,5 @@ + +==================================== + 2012/02/26 0:02:53 Version 1.01 +==================================== + - Original release feeds (TXMod Xoops) Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/credits.txt =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/credits.txt (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/credits.txt 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1,4 @@ +Read Me First +============= + +Please make sure that you download the XOOPS Icon Set, and upload it to uploads/images directory \ No newline at end of file Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/index.html =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/index.html (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/index.html 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/install.txt =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/install.txt (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/install.txt 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1,4 @@ +Read Me First +============= + +Please make sure that you download the XOOPS Icon Set, and upload it to uploads/images directory \ No newline at end of file Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/lang_diff.txt =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/lang_diff.txt (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/lang_diff.txt 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1,4 @@ +Read Me First +============= + +Please make sure that you download the XOOPS Icon Set, and upload it to uploads/images directory \ No newline at end of file Added: XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/licence.txt =================================================================== --- XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/licence.txt (rev 0) +++ XoopsModules/feeds/releases/1.01/feeds/modules/feeds/docs/licence.txt 2012-02-27 19:38:40 UTC (rev 9074) @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work,... [truncated message content] |
From: <txm...@us...> - 2012-03-05 20:58:21
|
Revision: 9096 http://xoops.svn.sourceforge.net/xoops/?rev=9096&view=rev Author: txmodxoops Date: 2012-03-05 20:58:11 +0000 (Mon, 05 Mar 2012) Log Message: ----------- New module - twitter Added Paths: ----------- XoopsModules/twitter/ XoopsModules/twitter/admin/ XoopsModules/twitter/admin/about.php XoopsModules/twitter/admin/admin_footer.php XoopsModules/twitter/admin/admin_header.php XoopsModules/twitter/admin/index.html XoopsModules/twitter/admin/index.php XoopsModules/twitter/admin/menu.php XoopsModules/twitter/blocks/ XoopsModules/twitter/blocks/index.html XoopsModules/twitter/class/ XoopsModules/twitter/class/index.html XoopsModules/twitter/css/ XoopsModules/twitter/css/index.html XoopsModules/twitter/css/style.css XoopsModules/twitter/docs/ XoopsModules/twitter/docs/changelog.txt XoopsModules/twitter/docs/credits.txt XoopsModules/twitter/docs/index.html XoopsModules/twitter/docs/install.txt XoopsModules/twitter/docs/lang_diff.txt XoopsModules/twitter/docs/licence.txt XoopsModules/twitter/docs/readme.txt XoopsModules/twitter/header.php XoopsModules/twitter/images/ XoopsModules/twitter/images/icons/ XoopsModules/twitter/images/icons/index.html XoopsModules/twitter/images/icons/off.png XoopsModules/twitter/images/icons/on.png XoopsModules/twitter/images/index.html XoopsModules/twitter/images/menu/ XoopsModules/twitter/images/menu/bg.png XoopsModules/twitter/images/menu/index.html XoopsModules/twitter/images/menu/left_both.png XoopsModules/twitter/images/menu/right_both.png XoopsModules/twitter/images/twitter_slogo.png XoopsModules/twitter/include/ XoopsModules/twitter/include/configs.php XoopsModules/twitter/include/functions.php XoopsModules/twitter/include/index.html XoopsModules/twitter/include/install.php XoopsModules/twitter/index.php XoopsModules/twitter/language/ XoopsModules/twitter/language/english/ XoopsModules/twitter/language/english/admin.php XoopsModules/twitter/language/english/blocks.php XoopsModules/twitter/language/english/help/ XoopsModules/twitter/language/english/help/help.html XoopsModules/twitter/language/english/help/index.html XoopsModules/twitter/language/english/index.html XoopsModules/twitter/language/english/main.php XoopsModules/twitter/language/english/modinfo.php XoopsModules/twitter/language/index.html XoopsModules/twitter/language/italian/ XoopsModules/twitter/language/italian/admin.php XoopsModules/twitter/language/italian/blocks.php XoopsModules/twitter/language/italian/help/ XoopsModules/twitter/language/italian/help/help.html XoopsModules/twitter/language/italian/help/index.html XoopsModules/twitter/language/italian/index.html XoopsModules/twitter/language/italian/main.php XoopsModules/twitter/language/italian/modinfo.php XoopsModules/twitter/sql/ XoopsModules/twitter/sql/index.html XoopsModules/twitter/templates/ XoopsModules/twitter/templates/admin/ XoopsModules/twitter/templates/admin/index.html XoopsModules/twitter/templates/admin/twitter_admin_about.html XoopsModules/twitter/templates/admin/twitter_admin_help.html XoopsModules/twitter/templates/blocks/ XoopsModules/twitter/templates/blocks/index.html XoopsModules/twitter/templates/index.html XoopsModules/twitter/templates/twitter_footer.html XoopsModules/twitter/templates/twitter_header.html XoopsModules/twitter/templates/twitter_index.html XoopsModules/twitter/xoops_version.php Added: XoopsModules/twitter/admin/about.php =================================================================== --- XoopsModules/twitter/admin/about.php (rev 0) +++ XoopsModules/twitter/admin/about.php 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1,48 @@ +<?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) + * **************************************************************************** + * TWITTER - 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 twitter + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Mon 2012/03/05 18:12:44 : Timgno Exp $ + * **************************************************************************** + */ + + +include "admin_header.php"; +xoops_cp_header(); + +$aboutAdmin = new ModuleAdmin(); + +echo $aboutAdmin->addNavigation("about.php"); +echo $aboutAdmin->renderabout($GLOBALS['xoopsModuleConfig']['id_paypal'], false); + +include "admin_footer.php"; \ No newline at end of file Added: XoopsModules/twitter/admin/admin_footer.php =================================================================== --- XoopsModules/twitter/admin/admin_footer.php (rev 0) +++ XoopsModules/twitter/admin/admin_footer.php 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1,45 @@ +<?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) + * **************************************************************************** + * TWITTER - 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 twitter + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Mon 2012/03/05 18:12:44 : 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_TWITTER_MAINTAINEDBY." + <a href='http://www.txmodxoops.org/modules/newbb/' title='Visit TXMod Xoops Community' class='tooltip' rel='external'>TXMod Xoops Community</a></div>"; +xoops_cp_footer(); Added: XoopsModules/twitter/admin/admin_header.php =================================================================== --- XoopsModules/twitter/admin/admin_header.php (rev 0) +++ XoopsModules/twitter/admin/admin_header.php 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1,93 @@ +<?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) + * **************************************************************************** + * TWITTER - 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 twitter + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Mon 2012/03/05 18:12:44 : 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_ERROR_NOFRAMEWORKS); + xoops_cp_footer(); + //return false; + } +$dirname = basename(dirname(dirname( __FILE__ ) )); +$module_handler =& xoops_gethandler('module'); +$xoopsModule = & $module_handler->getByDirname($dirname); +$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); +$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); +$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); + +$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); +//xoops_cp_header(); + +//Load languages +xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); Added: XoopsModules/twitter/admin/index.html =================================================================== --- XoopsModules/twitter/admin/index.html (rev 0) +++ XoopsModules/twitter/admin/index.html 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/twitter/admin/index.php =================================================================== --- XoopsModules/twitter/admin/index.php (rev 0) +++ XoopsModules/twitter/admin/index.php 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1,48 @@ +<?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) + * **************************************************************************** + * TWITTER - 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 twitter + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Mon 2012/03/05 18:12:44 : Timgno Exp $ + * **************************************************************************** + */ + +include "admin_header.php"; +xoops_cp_header(); + + $indexAdmin = new ModuleAdmin(); + + echo $indexAdmin->addNavigation("index.php") ; + echo $indexAdmin->renderIndex(); + +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/twitter/admin/menu.php =================================================================== --- XoopsModules/twitter/admin/menu.php (rev 0) +++ XoopsModules/twitter/admin/menu.php 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1,60 @@ +<?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) + * **************************************************************************** + * TWITTER - 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 twitter + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Mon 2012/03/05 18:12:44 : 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_TWITTER_ADMENU1; +$adminmenu[$i]["link"] = "admin/index.php"; +//$adminmenu[$i]["desc"] = _MI_TWITTER_ADMENU1_DESC; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/home.png"; +$i++; +$adminmenu[$i]["title"] = _MI_TWITTER_ADMENU2; +$adminmenu[$i]["link"] = "admin/about.php"; +//$adminmenu[$i]["desc"] = _MI_TWITTER_ADMENU2_DESC; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/about.png"; +unset( $i ); +?> \ No newline at end of file Added: XoopsModules/twitter/blocks/index.html =================================================================== --- XoopsModules/twitter/blocks/index.html (rev 0) +++ XoopsModules/twitter/blocks/index.html 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/twitter/class/index.html =================================================================== --- XoopsModules/twitter/class/index.html (rev 0) +++ XoopsModules/twitter/class/index.html 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/twitter/css/index.html =================================================================== --- XoopsModules/twitter/css/index.html (rev 0) +++ XoopsModules/twitter/css/index.html 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/twitter/css/style.css =================================================================== --- XoopsModules/twitter/css/style.css (rev 0) +++ XoopsModules/twitter/css/style.css 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1,47 @@ +/* + * Module Twitter + * Created Tru 05/03/2012 + * Copyright TXMod Xoops <in...@tx...> + * $Id Timgno + */ +table { + border: 1px solid #ccc; + width: 100%; +} + +tr.even{ + background-color: #C8C8C8; +} + +tr.odd { + background-color: #E2E2E2; +} + +th.title { + float: left; + margin-left: 3px; + height: 15px; + background: transparent; +} + +th.title span { + margin-left: 30px; + text-align: left; + background: transparent; +} + +td a { + margin: 0px; + width: 40px; + height: 40px; + background: transparent; +} + +td.user a { + border-bottom: 1px solid #ccc; + margin: 1px; + width: 90px; + height: 10px; + color: #0000ff; + background: transparent; +} \ No newline at end of file Added: XoopsModules/twitter/docs/changelog.txt =================================================================== --- XoopsModules/twitter/docs/changelog.txt (rev 0) +++ XoopsModules/twitter/docs/changelog.txt 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1,5 @@ + +==================================== + 2012/03/05 18:12:44 Version 1.01 +==================================== + - Original release twitter (TXMod Xoops) Added: XoopsModules/twitter/docs/credits.txt =================================================================== --- XoopsModules/twitter/docs/credits.txt (rev 0) +++ XoopsModules/twitter/docs/credits.txt 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1,4 @@ +Read Me First +============= + +Please make sure that you download the XOOPS Icon Set, and upload it to uploads/images directory \ No newline at end of file Added: XoopsModules/twitter/docs/index.html =================================================================== --- XoopsModules/twitter/docs/index.html (rev 0) +++ XoopsModules/twitter/docs/index.html 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/twitter/docs/install.txt =================================================================== --- XoopsModules/twitter/docs/install.txt (rev 0) +++ XoopsModules/twitter/docs/install.txt 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1,4 @@ +Read Me First +============= + +Please make sure that you download the XOOPS Icon Set, and upload it to uploads/images directory \ No newline at end of file Added: XoopsModules/twitter/docs/lang_diff.txt =================================================================== --- XoopsModules/twitter/docs/lang_diff.txt (rev 0) +++ XoopsModules/twitter/docs/lang_diff.txt 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1,4 @@ +Read Me First +============= + +Please make sure that you download the XOOPS Icon Set, and upload it to uploads/images directory \ No newline at end of file Added: XoopsModules/twitter/docs/licence.txt =================================================================== --- XoopsModules/twitter/docs/licence.txt (rev 0) +++ XoopsModules/twitter/docs/licence.txt 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. Added: XoopsModules/twitter/docs/readme.txt =================================================================== --- XoopsModules/twitter/docs/readme.txt (rev 0) +++ XoopsModules/twitter/docs/readme.txt 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1,4 @@ +Read Me First +============= + +Please make sure that you download the XOOPS Icon Set, and upload it to uploads/images directory \ No newline at end of file Added: XoopsModules/twitter/header.php =================================================================== --- XoopsModules/twitter/header.php (rev 0) +++ XoopsModules/twitter/header.php 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1,46 @@ +<?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) + * **************************************************************************** + * TWITTER - 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 twitter + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Mon 2012/03/05 18:12:44 : Timgno Exp $ + * **************************************************************************** + */ + +include "../../mainfile.php"; +global $xoopsConfig, $xoopsModule; +include XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar('dirname')."/include/configs.php"; +include XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar('dirname')."/include/functions.php"; +$myts =& MyTextSanitizer::getInstance(); +$style = "modules/".$xoopsModule->getVar('dirname')."/css/style.css"; +if(file_exists($style)); {return true;} +?> \ No newline at end of file Added: XoopsModules/twitter/images/icons/index.html =================================================================== --- XoopsModules/twitter/images/icons/index.html (rev 0) +++ XoopsModules/twitter/images/icons/index.html 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/twitter/images/icons/off.png =================================================================== (Binary files differ) Property changes on: XoopsModules/twitter/images/icons/off.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/twitter/images/icons/on.png =================================================================== (Binary files differ) Property changes on: XoopsModules/twitter/images/icons/on.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/twitter/images/index.html =================================================================== --- XoopsModules/twitter/images/index.html (rev 0) +++ XoopsModules/twitter/images/index.html 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/twitter/images/menu/bg.png =================================================================== (Binary files differ) Property changes on: XoopsModules/twitter/images/menu/bg.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/twitter/images/menu/index.html =================================================================== --- XoopsModules/twitter/images/menu/index.html (rev 0) +++ XoopsModules/twitter/images/menu/index.html 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/twitter/images/menu/left_both.png =================================================================== (Binary files differ) Property changes on: XoopsModules/twitter/images/menu/left_both.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/twitter/images/menu/right_both.png =================================================================== (Binary files differ) Property changes on: XoopsModules/twitter/images/menu/right_both.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/twitter/images/twitter_slogo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/twitter/images/twitter_slogo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/twitter/include/configs.php =================================================================== --- XoopsModules/twitter/include/configs.php (rev 0) +++ XoopsModules/twitter/include/configs.php 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1,58 @@ +<?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) + * **************************************************************************** + * TWITTER - 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 twitter + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Mon 2012/03/05 18:12:44 : Timgno Exp $ + * **************************************************************************** + */ + +if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ; + +global $xoopsConfig, $xoopsModule; + +// module information +$mod_url = XOOPS_URL . "/modules/".$xoopsModule->getVar('dirname'); +$mod_path = XOOPS_ROOT_PATH . "/modules/".$xoopsModule->getVar('dirname'); +$mod_img = XOOPS_URL . "/modules/".$xoopsModule->getVar('dirname')."/images/txmodxoops_logo.png"; +// Attention: if don't have declared ( _ADMIN ) variable, you can do in languages/yourlanguage/global.php +$mod_admin = "<a href='".$mod_url."/admin/index.php'><strong>"._MD_TWITTER_ADMIN."</strong></a>"; +$mod_copyright = "<a href='http://www.txmodxoops.org' title='TXMod Xoops' target='_blank'> + <img src='".$mod_img."' alt='TXMod Xoops' /></a>"; + +// global language file +if ( file_exists( $mod_path."/language/".$xoopsConfig['language']."/main.php" ) ) { + include_once $mod_path."/language/".$xoopsConfig['language']."/main.php" ; +} else { + include_once $mod_path."/language/english/main.php" ; +} +?> \ No newline at end of file Added: XoopsModules/twitter/include/functions.php =================================================================== --- XoopsModules/twitter/include/functions.php (rev 0) +++ XoopsModules/twitter/include/functions.php 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1,104 @@ +<?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) + * **************************************************************************** + * TWITTER - 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 twitter + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Mon 2012/03/05 18:12:44 : Timgno Exp $ + * **************************************************************************** + */ + + +/***************Blocks***************/ +function twitter_block_addCatSelect($cats) { + if(is_array($cats)) + { + $cat_sql = "(".current($cats); + array_shift($cats); + foreach($cats as $cat) + { + $cat_sql .= ",".$cat; + } + $cat_sql .= ")"; + } + return $cat_sql; +} + +function twitter_checkModuleAdmin() +{ + if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))){ + include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'); + return true; + }else{ + echo xoops_error("Error: You don't use the Frameworks \"admin module\". Please install this Frameworks"); + return false; + } +} + +function twitter_CleanVars( &$global, $key, $default = '', $type = 'int' ) { + switch ( $type ) { + case 'string': + $ret = ( isset( $global[$key] ) ) ? filter_var( $global[$key], FILTER_SANITIZE_MAGIC_QUOTES ) : $default; + break; + case 'int': default: + $ret = ( isset( $global[$key] ) ) ? filter_var( $global[$key], FILTER_SANITIZE_NUMBER_INT ) : $default; + break; + } + if ( $ret === false ) { + return $default; + } + return $ret; +} + +function xoops_meta_keywords($content) +{ + global $xoopsTpl, $xoTheme; + $myts =& MyTextSanitizer::getInstance(); + $content= $myts->undoHtmlSpecialChars($myts->displayTbox($content)); + if(isset($xoTheme) && is_object($xoTheme)) { + $xoTheme->addMeta( 'meta', 'keywords', strip_tags($content)); + } else { // Compatibility for old Xoops versions + $xoopsTpl->assign('xoops_meta_keywords', strip_tags($content)); + } +} + +function xoops_meta_description($content) +{ + global $xoopsTpl, $xoTheme; + $myts =& MyTextSanitizer::getInstance(); + $content= $myts->undoHtmlSpecialChars($myts->displayTarea($content)); + if(isset($xoTheme) && is_object($xoTheme)) { + $xoTheme->addMeta( 'meta', 'description', strip_tags($content)); + } else { // Compatibility for old Xoops versions + $xoopsTpl->assign('xoops_meta_description', strip_tags($content)); + } +} +?> \ No newline at end of file Added: XoopsModules/twitter/include/index.html =================================================================== --- XoopsModules/twitter/include/index.html (rev 0) +++ XoopsModules/twitter/include/index.html 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/twitter/include/install.php =================================================================== --- XoopsModules/twitter/include/install.php (rev 0) +++ XoopsModules/twitter/include/install.php 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1,49 @@ +<?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) + * **************************************************************************** + * TWITTER - 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 twitter + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Mon 2012/03/05 18:12:44 : Timgno Exp $ + * **************************************************************************** + */ + +$indexFile = XOOPS_ROOT_PATH."/modules/TDMCreate/include/index.html"; +$blankFile = XOOPS_ROOT_PATH."/modules/TDMCreate/images/deco/blank.gif"; + +//Creation du dossier "uploads" pour le module à la racine du site +$module_uploads = XOOPS_ROOT_PATH."/uploads/twitter"; +if(!is_dir($module_uploads)) + mkdir($module_uploads, 0777); + chmod($module_uploads, 0777); +copy($indexFile, XOOPS_ROOT_PATH."/uploads/twitter/index.html"); + +?> \ No newline at end of file Added: XoopsModules/twitter/index.php =================================================================== --- XoopsModules/twitter/index.php (rev 0) +++ XoopsModules/twitter/index.php 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1,73 @@ +<?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) + * **************************************************************************** + * TWITTER - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * 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. + * + * ------------------------------------------------------------------------ + * + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package twitter + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Mon 2012/03/05 18:12:44 : Timgno Exp $ + * **************************************************************************** + */ +include "header.php"; +$xoopsOption['template_main'] = 'twitter_index.html'; +include_once XOOPS_ROOT_PATH."/header.php"; +// Include Styles +$GLOBALS['xoTheme']->addStylesheet($style); +//keywords +$keywords = $GLOBALS['xoopsModuleConfig']['keywords']; +$keywords .= substr($keywords, 0); +$GLOBALS['xoTheme']->addMeta('meta', 'keywords', $keywords); +//description +$GLOBALS['xoTheme']->addMeta('meta', 'description', _MD_TWITTER_DESC); +$GLOBALS['xoopsTpl']->assign('adv', $GLOBALS['xoopsModuleConfig']['advertise_text']); +$GLOBALS['xoopsTpl']->assign('ads120x600', $GLOBALS['xoopsModuleConfig']['advertise_120']); + +$GLOBALS['xoopsTpl']->assign('users_title', 'Users'); +$GLOBALS['xoopsTpl']->assign('tweets_title', 'Tweets'); + +$url = $GLOBALS['xoopsModuleConfig']['default_url']; +if (isset($_POST['query'])) { + $full_query = $url . urlencode($_POST['query']); + $raw_json = file_get_contents($full_query); + $json = json_decode($raw_json); + + foreach ($json->results as $r) { + $GLOBALS['xoopsTpl']->append('tweets', array('image_url' => $r->profile_image_url, 'from_user' => $r->from_user, 'text' => $r->text)); + } + /*$ret = "<table style='width:600px;'>"; + $ret .= "<tr><th>user</th><th>tweet</th></tr>"; + foreach ($json->results as $r) { + + $ret .= '<tr><td><a href="https://twitter.com/'. $r->from_user . '"><img src="' . $r->profile_image_url . '" /></a></td>'; + $ret .= '<td style="border-bottom: #ccc solid 1px;">'. $r->from_user . '<br />' . $r->text . '</td>'; + $ret .= '</tr>'; + } + $ret .= "</table>"; + $GLOBALS['xoopsTpl']->assign('tweets', $ret);*/ +} + +if($GLOBALS['xoopsModuleConfig']['act_socialnetworks'] == 1){ +$social = $GLOBALS['xoopsModuleConfig']['socialnetworks']; +$act_social = $GLOBALS['xoopsModuleConfig']['act_socialnetworks']; +$GLOBALS['xoopsTpl']->assign('act_social', $act_social); +$GLOBALS['xoopsTpl']->assign('social', $social); } + +include_once XOOPS_ROOT_PATH."/footer.php"; +?> \ No newline at end of file Added: XoopsModules/twitter/language/english/admin.php =================================================================== --- XoopsModules/twitter/language/english/admin.php (rev 0) +++ XoopsModules/twitter/language/english/admin.php 2012-03-05 20:58:11 UTC (rev 9096) @@ -0,0 +1,71 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers ... [truncated message content] |
From: <be...@us...> - 2012-03-14 09:32:58
|
Revision: 9127 http://xoops.svn.sourceforge.net/xoops/?rev=9127&view=rev Author: beckmi Date: 2012-03-14 09:32:43 +0000 (Wed, 14 Mar 2012) Log Message: ----------- Adding xRoster and TPL League Stats Added Paths: ----------- XoopsModules/tplleaguestats/ XoopsModules/tplleaguestats/branches/ XoopsModules/tplleaguestats/releases/ XoopsModules/tplleaguestats/trunk/ XoopsModules/tplleaguestats/trunk/tplleaguestats/ XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/ XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/head.php XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/index.php XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/leaguematches.php XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/menu.php XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/opponents.php XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/seasons.php XoopsModules/tplleaguestats/trunk/tplleaguestats/blocks/ XoopsModules/tplleaguestats/trunk/tplleaguestats/blocks/index.html XoopsModules/tplleaguestats/trunk/tplleaguestats/blocks/minitable.php XoopsModules/tplleaguestats/trunk/tplleaguestats/bottom.txt XoopsModules/tplleaguestats/trunk/tplleaguestats/change.php XoopsModules/tplleaguestats/trunk/tplleaguestats/docs/ XoopsModules/tplleaguestats/trunk/tplleaguestats/docs/license.txt XoopsModules/tplleaguestats/trunk/tplleaguestats/docs/manual_eng.txt XoopsModules/tplleaguestats/trunk/tplleaguestats/docs/manual_ita.txt XoopsModules/tplleaguestats/trunk/tplleaguestats/docs/readme_eng.txt XoopsModules/tplleaguestats/trunk/tplleaguestats/docs/readme_ita.txt XoopsModules/tplleaguestats/trunk/tplleaguestats/headtohead.php XoopsModules/tplleaguestats/trunk/tplleaguestats/images/ XoopsModules/tplleaguestats/trunk/tplleaguestats/images/empty.gif XoopsModules/tplleaguestats/trunk/tplleaguestats/images/line.gif XoopsModules/tplleaguestats/trunk/tplleaguestats/images/tplleague_slogo.png XoopsModules/tplleaguestats/trunk/tplleaguestats/index.php XoopsModules/tplleaguestats/trunk/tplleaguestats/language/ XoopsModules/tplleaguestats/trunk/tplleaguestats/language/english/ XoopsModules/tplleaguestats/trunk/tplleaguestats/language/english/admin.php XoopsModules/tplleaguestats/trunk/tplleaguestats/language/english/blocks.php XoopsModules/tplleaguestats/trunk/tplleaguestats/language/english/index.html XoopsModules/tplleaguestats/trunk/tplleaguestats/language/english/main.php XoopsModules/tplleaguestats/trunk/tplleaguestats/language/english/modinfo.php XoopsModules/tplleaguestats/trunk/tplleaguestats/language/italian/ XoopsModules/tplleaguestats/trunk/tplleaguestats/language/italian/admin.php XoopsModules/tplleaguestats/trunk/tplleaguestats/language/italian/blocks.php XoopsModules/tplleaguestats/trunk/tplleaguestats/language/italian/index.html XoopsModules/tplleaguestats/trunk/tplleaguestats/language/italian/main.php XoopsModules/tplleaguestats/trunk/tplleaguestats/language/italian/modinfo.php XoopsModules/tplleaguestats/trunk/tplleaguestats/notes.txt XoopsModules/tplleaguestats/trunk/tplleaguestats/season.php XoopsModules/tplleaguestats/trunk/tplleaguestats/sql/ XoopsModules/tplleaguestats/trunk/tplleaguestats/sql/mysql.sql XoopsModules/tplleaguestats/trunk/tplleaguestats/xoops_version.php XoopsModules/xroster/ XoopsModules/xroster/branches/ XoopsModules/xroster/releases/ XoopsModules/xroster/trunk/ XoopsModules/xroster/trunk/xroster/ XoopsModules/xroster/trunk/xroster/admin/ XoopsModules/xroster/trunk/xroster/admin/index.php XoopsModules/xroster/trunk/xroster/admin/menu.php XoopsModules/xroster/trunk/xroster/blocks/ XoopsModules/xroster/trunk/xroster/blocks/index.html XoopsModules/xroster/trunk/xroster/blocks/xroster_blocks.php XoopsModules/xroster/trunk/xroster/common.inc.php XoopsModules/xroster/trunk/xroster/images/ XoopsModules/xroster/trunk/xroster/images/SOEagazarian.jpg XoopsModules/xroster/trunk/xroster/images/Thumbs.db XoopsModules/xroster/trunk/xroster/images/blank.jpg XoopsModules/xroster/trunk/xroster/images/index.html XoopsModules/xroster/trunk/xroster/index.php XoopsModules/xroster/trunk/xroster/language/ XoopsModules/xroster/trunk/xroster/language/english/ XoopsModules/xroster/trunk/xroster/language/english/index.html XoopsModules/xroster/trunk/xroster/language/english/main.php XoopsModules/xroster/trunk/xroster/language/english/modinfo.php XoopsModules/xroster/trunk/xroster/language/index.html XoopsModules/xroster/trunk/xroster/sql/ XoopsModules/xroster/trunk/xroster/sql/data.sql XoopsModules/xroster/trunk/xroster/sql/index.html XoopsModules/xroster/trunk/xroster/templates/ XoopsModules/xroster/trunk/xroster/templates/blocks/ XoopsModules/xroster/trunk/xroster/templates/blocks/index.html XoopsModules/xroster/trunk/xroster/templates/blocks/xroster_block_newestmember.html XoopsModules/xroster/trunk/xroster/templates/index.html XoopsModules/xroster/trunk/xroster/templates/index_template.html XoopsModules/xroster/trunk/xroster/xoops_version.php XoopsModules/xroster/trunk/xroster/xroster.png Added: XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/head.php =================================================================== --- XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/head.php (rev 0) +++ XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/head.php 2012-03-14 09:32:43 UTC (rev 9127) @@ -0,0 +1,74 @@ +<?php +/* +************************************************************ +TPLLeagueStats is a league stats software designed for football (soccer) +team. + +Copyright (C) 2003 Timo Lepp\xE4nen / TPL Design +email: in...@tp... +www: www.tpl-design.com/tplleaguestats + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +************************************************************ +Ported to xoops by +Mythrandir http://www.web-udvikling.dk +and +ralf57 http://www.madeinbanzi.it + +************************************************************ +*/ +if(!session_is_registered('season_name') || !session_is_registered('season_id')) +{ + echo "<form method=\"post\" action=\"leaguematches.php\">"; + echo '<b><?php echo _AM_CHOSEASON;?></b>'; + echo '<select name="season_select">'; + $get_seasons = $xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix("tplls_seasonnames")." ORDER BY SeasonName"); + + while($sdata = $xoopsDB->fetchArray($get_seasons)) + { + echo "<option value=\"$sdata[SeasonID]____$sdata[SeasonName]\">$sdata[SeasonName]</option>\n"; + } + echo "</select> <input type=\"submit\" name=\"submit\" value=" ._AM_SEASONGO. "></form>"; + + + mysql_free_result($get_seasons); +} +else +{ + $season_name = $_SESSION['season_name']; + echo "<form method=\"post\" action=\"leaguematches.php\">"; + echo "<b> "._AM_SEASELECT." $season_name</b><br><br>"; + echo _AM_SEASELDROP; + echo '<select name="season_select">'; + + $get_seasons = $xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix("tplls_seasonnames")." ORDER BY SeasonName"); + + while($sdata = $xoopsDB->fetchArray($get_seasons)) + { + if($sdata['SeasonID'] == $seasonid) + echo "<option value=\"$sdata[SeasonID]____$sdata[SeasonName]\" SELECTED>$sdata[SeasonName]</option>\n"; + else + echo "<option value=\"$sdata[SeasonID]____$sdata[SeasonName]\">$sdata[SeasonName]</option>\n"; + } + echo "</select> <input type=\"submit\" name=\"submit\" value=" ._AM_SEASONGO. "></form>"; + + mysql_free_result($get_seasons); +} +?> + +<hr width="100%"> + +</center> \ No newline at end of file Added: XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/index.php =================================================================== --- XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/index.php (rev 0) +++ XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/index.php 2012-03-14 09:32:43 UTC (rev 9127) @@ -0,0 +1,42 @@ +<?php +/* +************************************************************ +TPLLeagueStats is a league stats software designed for football (soccer) +team. + +Copyright (C) 2003 Timo Lepp\xE4nen / TPL Design +email: in...@tp... +www: www.tpl-design.com/tplleaguestats + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +************************************************************ +Ported to xoops by +Mythrandir http://www.web-udvikling.dk +and +ralf57 http://www.madeinbanzi.it + +************************************************************ +*/ + + +include '../../../include/cp_header.php'; //Include file, which checks for permissions and sets navigation + +xoops_cp_header(); + +header("Location:leaguematches.php"); + +xoops_cp_footer(); +?> Added: XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/leaguematches.php =================================================================== --- XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/leaguematches.php (rev 0) +++ XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/leaguematches.php 2012-03-14 09:32:43 UTC (rev 9127) @@ -0,0 +1,1028 @@ +<?php +/* +************************************************************ +TPLLeagueStats is a league stats software designed for football (soccer) +team. + +Copyright (C) 2003 Timo Lepp\xE4nen / TPL Design +email: in...@tp... +www: www.tpl-design.com/tplleaguestats + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +************************************************************ +Ported to xoops by +Mythrandir http://www.web-udvikling.dk +and +ralf57 http://www.madeinbanzi.it + +************************************************************ +*/ + +include '../../../include/cp_header.php'; //Include file, which checks for permissions and sets navigation +if (isset($_POST['season_select'])) { + $season = explode("____",$_POST['season_select']); +} +elseif (isset($_POST['seasonid'])) { + $season = array ($_POST['seasonid'], $_POST['seasonname']); +} +elseif (!isset($_SESSION['season_id'])) { + $sql = "SELECT SeasonID, SeasonName FROM ".$xoopsDB->prefix("tplls_seasonnames")." WHERE SeasonDefault=1"; + $seasonname = $xoopsDB->query($sql); + $seasonname = $xoopsDB->fetchArray($seasonname); + $season = array($seasonname['SeasonID'], $seasonname['SeasonName']); +} +else { + $season = array($_SESSION['season_id'], $_SESSION['season_name']); +} +$_SESSION['season_id'] = $season[0]; +$_SESSION['season_name'] = $season[1]; +$seasonid = $_SESSION['season_id']; +$seasonname = $_SESSION['season_name']; + +$PHP_SELF = $_SERVER['PHP_SELF']; +$action = isset($_GET['action']) ? $_GET['action'] : null; +$action = isset($_POST['action']) ? $_POST['action'] : $action; + +$add_submit = isset($_POST['add_submit']) ? $_POST['add_submit'] : false; +$modify_submit = isset($_POST['modify_submit']) ? $_POST['modify_submit'] : false; +$delete_submit = isset($_POST['delete_submit']) ? $_POST['delete_submit'] : false; +$modifyall_submit = isset($_POST['modifyall_submit']) ? $_POST['modifyall_submit']: null; + +xoops_cp_header(); + +?> + +<!-- Navigation bar--> +<table width="560" cellspacing="0" bordercolordark="white" bordercolorlight="black" style="border-collapse:collapse;"> + <tr> + <td align="center" style="padding: 3px;background-color: #FFFFFF; border:1px #000000 dotted;"> + <a href="seasons.php"><?php echo _AM_NAVSEASONS;?></a></td> + <td align="center" style="padding: 3px;background-color: #FFFFFF; border:1px #000000 dotted;"> + <a href="opponents.php"><?php echo _AM_NAVOPPONENTS;?></a></td> + <td align="center" nowrap style="padding: 3px;background-color: #E6E6FF; border:1px #000000 dotted;"> + <a href="leaguematches.php"><?php echo _AM_NAVLEAGUEMATCHES;?></a></td> + <td align="center" style="padding: 3px;background-color: #FFFFFF; border:1px #000000 dotted;"> + <a href="../index.php" target="_blank"><?php echo _AM_NAVLEAGUETABLE;?></a></td> + </tr> +</table> +<!-- End Navigation bar--> + +<?php + +// +//Exit check, if there are less than 2 teams in database +// +$query = $xoopsDB->query("SELECT OpponentID FROM ".$xoopsDB->prefix("tplls_opponents")); + +if($xoopsDB->getRowsNum($query) < 2) +{ + echo "<br><br>"._AM_ADDTWOTEAMS."<br><br> + <a href=\"opponents.php\">" ._AM_ADDTEAMS. "</a>"; + exit(); +} + +if($add_submit) +{ + $year = intval($_POST['year']); + $month = intval($_POST['month']); + $day = intval($_POST['day']); + $dateandtime = $year."-".$month."-".$day; + + // + //Check the data of the submitted form + // + $i = 0; + + while($i < 15) + { + $home = $_POST['home']; //hometeam id + $away = $_POST['away']; //awayteam id + $home_goals = $_POST['home_goals']; + $away_goals = $_POST['away_goals']; + + // + //Set the default + // + $home_winner = -1; + $home_loser = -1; + $home_tie = -1; + $away_winner = -1; + $away_loser = -1; + $away_tie = -1; + + // + //If home and away are not the same + // + if($home[$i] != $away[$i]) + { + $home[$i] = intval($home[$i]); + $away[$i] = intval($away[$i]); + $home_goals[$i] = $home_goals[$i] != null ? intval($home_goals[$i]) : null; + $away_goals[$i] = $away_goals[$i] != null ? intval($away_goals[$i]) : null; + // + //Hometeam wins + // + if($home_goals[$i] > $away_goals[$i]) + { + $home_winner = $home[$i]; + $away_loser = $away[$i]; + } + + // + //Away win + // + elseif($home_goals[$i] < $away_goals[$i]) + { + $away_winner = $away[$i]; + $home_loser = $home[$i]; + } + + // + //Draw + // + elseif($home_goals[$i] == $away_goals[$i]) + { + $home_tie = $home[$i]; + $away_tie = $away[$i]; + } + + // + //query to check if homea or away team already exists in the current day + // + $query = $xoopsDB->query("SELECT LM.LeagueMatchID FROM + ".$xoopsDB->prefix("tplls_leaguematches")." LM + WHERE + (LM.LeagueMatchHomeID = '$home[$i]' OR + LM.LeagueMatchAwayID = '$home[$i]' OR + LM.LeagueMatchHomeID = '$away[$i]' OR + LM.LeagueMatchAwayID = '$away[$i]') AND + LM.LeagueMatchDate = '$dateandtime' + ") + ; + + if($xoopsDB->getRowsNum($query) == 0) + { + if (($home_goals[$i] !== null) && ($home_goals[$i] !== null)) { + $xoopsDB->query("INSERT INTO ".$xoopsDB->prefix("tplls_leaguematches")." SET + LeagueMatchSeasonID = '$seasonid', + LeagueMatchDate = '$dateandtime', + LeagueMatchHomeID = '$home[$i]', + LeagueMatchAwayID = '$away[$i]', + LeagueMatchHomeWinnerID = '$home_winner', + LeagueMatchHomeLoserID = '$home_loser', + LeagueMatchAwayWinnerID = '$away_winner', + LeagueMatchAwayLoserID = '$away_loser', + LeagueMatchHomeTieID = '$home_tie', + LeagueMatchAwayTieID = '$away_tie', + LeagueMatchHomeGoals = '$home_goals[$i]', + LeagueMatchAwayGoals = '$away_goals[$i]', + LeagueMatchCreated = ".time()." + "); + } + else { + $xoopsDB->query("INSERT INTO ".$xoopsDB->prefix("tplls_leaguematches")." SET + LeagueMatchSeasonID = '$seasonid', + LeagueMatchDate = '$dateandtime', + LeagueMatchHomeID = '$home[$i]', + LeagueMatchAwayID = '$away[$i]', + LeagueMatchHomeWinnerID = '-1', + LeagueMatchHomeLoserID = '-1', + LeagueMatchAwayWinnerID = '-1', + LeagueMatchAwayLoserID = '-1', + LeagueMatchHomeTieID = '-1', + LeagueMatchAwayTieID = '-1', + LeagueMatchCreated = ".time()." + "); + } + + } + + } + $i++; + } +} +elseif($modifyall_submit) +{ + $year = intval($_POST['year']); + $month = intval($_POST['month']); + $day = intval($_POST['day']); + $dateandtime = $year."-".$month."-".$day; + $qty = intval($_POST['qty']); + + // + //Delete old data from selected date + // + $xoopsDB->query("DELETE FROM ".$xoopsDB->prefix("tplls_leaguematches")." + WHERE LeagueMatchDate = '$dateandtime' + "); + + // + //Check the submitted form + // + $i = 0; + $home = $_POST['home']; //hometeam id + $away = $_POST['away']; //awayteam id + $home_goals = $_POST['home_goals']; + $away_goals = $_POST['away_goals']; + while($i < $qty) + { + $home[$i] = intval($home[$i]); + $away[$i] = intval($away[$i]); + $home_goals[$i] = $home_goals[$i] != null ? intval($home_goals[$i]) : null; + $away_goals[$i] = $away_goals[$i] != null ? intval($away_goals[$i]) : null; + // + //Set default + // + $home_winner = -1; + $home_loser = -1; + $home_tie = -1; + $away_winner = -1; + $away_loser = -1; + $away_tie = -1; + + // + //Home wins + // + if($home_goals[$i] > $away_goals[$i]) + { + $home_winner = $home[$i]; + $away_loser = $away[$i]; + } + // + //Away wins + // + elseif($home_goals[$i] < $away_goals[$i]) + { + $away_winner = $away[$i]; + $home_loser = $home[$i]; + } + // + //Draw + // + elseif($home_goals[$i] == $away_goals[$i]) + { + $home_tie = $home[$i]; + $away_tie = $away[$i]; + } + if (($home_goals[$i] !== null) && ($away_goals[$i] !== null)) { + $xoopsDB->query("INSERT INTO ".$xoopsDB->prefix("tplls_leaguematches")." SET + LeagueMatchSeasonID = '$seasonid', + LeagueMatchDate = '$dateandtime', + LeagueMatchHomeID = '$home[$i]', + LeagueMatchAwayID = '$away[$i]', + LeagueMatchHomeWinnerID = '$home_winner', + LeagueMatchHomeLoserID = '$home_loser', + LeagueMatchAwayWinnerID = '$away_winner', + LeagueMatchAwayLoserID = '$away_loser', + LeagueMatchHomeTieID = '$home_tie', + LeagueMatchAwayTieID = '$away_tie', + LeagueMatchHomeGoals = '$home_goals[$i]', + LeagueMatchAwayGoals = '$away_goals[$i]', + LeagueMatchCreated = ".time()." + "); + } + else { + $xoopsDB->query("INSERT INTO ".$xoopsDB->prefix("tplls_leaguematches")." SET + LeagueMatchSeasonID = '$seasonid', + LeagueMatchDate = '$dateandtime', + LeagueMatchHomeID = '$home[$i]', + LeagueMatchAwayID = '$away[$i]', + LeagueMatchHomeWinnerID = '-1', + LeagueMatchHomeLoserID = '-1', + LeagueMatchAwayWinnerID = '-1', + LeagueMatchAwayLoserID = '-1', + LeagueMatchHomeTieID = '-1', + LeagueMatchAwayTieID = '-1', + LeagueMatchCreated = ".time()." + "); + } + $i++; + } +} +elseif($modify_submit) +{ + $mid = intval($_POST['mid']); + $homeid = intval($_POST['homeid']); + $awayid = intval($_POST['awayid']); + $year = intval($_POST['year']); + $month = intval($_POST['month']); + $day = intval($_POST['day']); + $dateandtime = $year."-".$month."-".$day; + + $home = intval($_POST['home']); //kotijoukkueen id + $away = intval($_POST['away']); //vierasjoukkueen id + $home_goals = $_POST['home_goals'] != null ? intval($_POST['home_goals']) : null; + $away_goals = $_POST['home_goals'] != null ? intval($_POST['away_goals']) : null; + + // + //Set default + // + $home_winner = -1; + $home_loser = -1; + $home_tie = -1; + $away_winner = -1; + $away_loser = -1; + $away_tie = -1; + + // + //Check that home and away are not the same + // + if($home != $away) + { + // + //Home wins + // + if($home_goals > $away_goals) + { + $home_winner = $home; + $away_loser = $away; + } + + // + //Away wins + // + elseif($home_goals < $away_goals) + { + $away_winner = $away; + $home_loser = $home; + } + + // + //Draw + // + elseif($home_goals == $away_goals) + { + $home_tie = $home; + $away_tie = $away; + } + + // + //query to check if home or away team already exists in the current day + // + $query = $xoopsDB->query("SELECT LM.LeagueMatchID FROM + ".$xoopsDB->prefix("tplls_leaguematches")." LM + WHERE + (LM.LeagueMatchHomeID = '$home' OR + LM.LeagueMatchAwayID = '$home' OR + LM.LeagueMatchHomeID = '$homeid' OR + LM.LeagueMatchAwayID = '$homeid' OR + LM.LeagueMatchHomeID = '$away' OR + LM.LeagueMatchAwayID = '$away' OR + LM.LeagueMatchHomeID = '$awayid' OR + LM.LeagueMatchAwayID = '$awayid') AND + LM.LeagueMatchDate = '$dateandtime' + "); + + if($xoopsDB->getRowsNum($query) < 2) + { + if (($home_goals !== null) && ($away_goals !== null)) { + $xoopsDB->query("UPDATE ".$xoopsDB->prefix("tplls_leaguematches")." SET + LeagueMatchDate = '$dateandtime', + LeagueMatchHomeID = '$home', + LeagueMatchAwayID = '$away', + LeagueMatchHomeWinnerID = '$home_winner', + LeagueMatchHomeLoserID = '$home_loser', + LeagueMatchAwayWinnerID = '$away_winner', + LeagueMatchAwayLoserID = '$away_loser', + LeagueMatchHomeTieID = '$home_tie', + LeagueMatchAwayTieID = '$away_tie', + LeagueMatchHomeGoals = '$home_goals', + LeagueMatchAwayGoals = '$away_goals', + LeagueMatchCreated = ".time()." + WHERE LeagueMatchID = '$mid' + LIMIT 1 + "); + } + else { + $xoopsDB->query("UPDATE ".$xoopsDB->prefix("tplls_leaguematches")." SET + LeagueMatchDate = '$dateandtime', + LeagueMatchHomeID = '$home', + LeagueMatchAwayID = '$away', + LeagueMatchHomeWinnerID = '-1', + LeagueMatchHomeLoserID = '-1', + LeagueMatchAwayWinnerID = '-1', + LeagueMatchAwayLoserID = '-1', + LeagueMatchHomeTieID = '-1', + LeagueMatchAwayTieID = '-1', + LeagueMatchHomeGoals = NULL, + LeagueMatchAwayGoals = NULL, + LeagueMatchCreated = ".time()." + WHERE LeagueMatchID = '$mid' + LIMIT 1 + "); + } + } + } +} +elseif($delete_submit) +{ + $mid = intval($_POST['mid']); + $xoopsDB->query("DELETE FROM ".$xoopsDB->prefix("tplls_leaguematches")." WHERE LeagueMatchID = '$mid' LIMIT 1"); +} + + ?> + + <?php + include('head.php'); + ?> + + <table align="center" width="700"> + <tr> + <td align="left" valign="top"> + <form method="post" action="<?php echo "$PHP_SELF"?>"> + <?php + if(!isset($action)) + { + ?> + <h3><?php echo _AM_ADDMATCH;?></h3> + <?php echo _AM_ADDMATCHNOTE;?><br><br> + + <?php echo _AM_DATE;?> + <select name="day"> + <?php + //print the days + for($i = 1 ; $i < 32 ; $i++) + { + if($i<10) + { + $i = "0".$i; + } + if($i == "01") + echo "<option value=\"$i\" SELECTED>$i</option>\n"; + else + echo "<option value=\"$i\">$i</option>\n"; + } + ?> + </select> / + + <select name="month"> + <?php + //print the months + for($i = 1 ; $i < 13 ; $i++) + { + if($i<10) + { + $i = "0".$i; + } + if($i == "01") + echo "<option value=\"$i\" SELECTED>$i</option>\n"; + else + echo "<option value=\"$i\">$i</option>\n"; + } + ?> + </select> / + + <select name="year"> + <?php + //print the years + for($i = 1950 ; $i < 2010 ; $i++) + { + if($i<10) + { + $i = "0".$i; + } + if($i == "2003") + echo "<option value=\"$i\" SELECTED>$i</option>\n"; + else + echo "<option value=\"$i\">$i</option>\n"; + } + ?> + </select><br><br> + <?php echo _AM_ADDMATCHNOTE2;?><br><br> + + <table width="100%" cellspacing="3" cellpadding="3" border="0"> + <tr> + + <td align="left" valign="middle"><b><?php echo _AM_HOMETEAM;?></b></td> + <td align="left" valign="middle"><b><?php echo _AM_AWAYTEAM;?></b></td> + <td align="center" valign="middle"><b><?php echo _AM_GOALSHOME;?></b></td> + <td align="center" valign="middle"><b><b><?php echo _AM_GOALSAWAY;?></b></td> + + </tr> + + <?php + + // + //query to get all the teams + // + $get_opponents = $xoopsDB->query("SELECT OpponentID AS id, + OpponentName AS name + FROM ".$xoopsDB->prefix("tplls_opponents")." + ORDER BY OpponentName"); + + // + //Prints 15 forms + // + $i=0; + + while($i < 15) + { + // + //query back to row 0 if not the first time in the loop + // + if($i>0) + mysql_data_seek($get_opponents, 0); + + echo' + <tr> + <td align="left" valign="middle"> + '; + + echo"<select name=\"home[$i]\">"; + + while($data = $xoopsDB->fetchArray($get_opponents)) + { + echo"<option value=\"$data[id]\">$data[name]</option>\n"; + } + + echo' + </select> + </td> + <td align="left" valign="middle"> + '; + + // + //Back to line 0in the query + // + mysql_data_seek($get_opponents, 0); + + echo"<select name=\"away[$i]\">"; + + while($data = $xoopsDB->fetchArray($get_opponents)) + { + echo"<option value=\"$data[id]\">$data[name]</option>\n"; + } + + echo" + </select> + </td> + <td align=\"center\" valign=\"middle\"><input type=\"text\" name=\"home_goals[$i]\" size=\"2\"></td> + <td align=\"center\" valign=\"middle\"><input type=\"text\" name=\"away_goals[$i]\" size=\"2\"></td> + + </tr> + "; + + + + + $i++; + } + + ?> + + </table><br><br> + <input type="hidden" name="seasonid" value="<?php echo $seasonid; ?>"> + <input type="hidden" name="seasonname" value="<?php echo $seasonname; ?>"> + <input type="submit" name="add_submit" value="<?php echo _AM_ADDMATCHES;?>"> + </form> + <?php + } + elseif($action == 'modifyall') + { + $date = $_REQUEST['date']; + + $get_matches = $xoopsDB->query("SELECT DAYOFMONTH(LM.LeagueMatchDate) AS dayofmonth, + MONTH(LM.LeagueMatchDate) AS month, + YEAR(LM.LeagueMatchDate) AS year, + LM.LeagueMatchHomeID AS homeid, + LM.LeagueMatchAwayID AS awayid, + LM.LeagueMatchHomeGoals AS homegoals, + LM.LeagueMatchAwayGoals AS awaygoals + FROM ".$xoopsDB->prefix("tplls_leaguematches")." LM + WHERE LM.LeaguematchDate = '$date' + ") + ; + + // + //query to get date + // + $get_match = $xoopsDB->query("SELECT DAYOFMONTH(LM.LeagueMatchDate) AS dayofmonth, + MONTH(LM.LeagueMatchDate) AS month, + YEAR(LM.LeagueMatchDate) AS year + FROM ".$xoopsDB->prefix("tplls_leaguematches")." LM + WHERE LM.LeaguematchDate = '$date' + LIMIT 1 + ") + ; + + $datedata = $xoopsDB->fetchArray($get_match); + + //$xoopsDB->freeRecordSet($get_match); + + $get_opponents = $xoopsDB->query("SELECT OpponentID AS id, + OpponentName AS name + FROM ".$xoopsDB->prefix("tplls_opponents")." + ORDER BY OpponentName + ") + ; + + ?> + + <form method="post" action="<?php echo "$PHP_SELF" ?>"> + <h3><?php echo _AM_MODMATCHES;?></h3> + + <table width="100%" cellspacing="3" cellpadding="3" border="0"> + + <tr> + <td align="left" valign="top"> + <?php echo _AM_DATETIME;?> + </td> + <td align="left" valign="top"> + + <select name="day"> + <?php + //Print the days + for($i = 1 ; $i < 32 ; $i++) + { + if($i<10) + { + $i = "0".$i; + } + if($datedata['dayofmonth'] == $i) + echo "<option value=\"$i\" SELECTED>$i</option>\n"; + else + echo "<option value=\"$i\">$i</option>\n"; + } + ?> + </select> / + + <select name="month"> + <?php + //Print the months + for($i = 1 ; $i < 13 ; $i++) + { + if($i<10) + { + $i = "0".$i; + } + if($datedata['month'] == $i) + echo "<option value=\"$i\" SELECTED>$i</option>\n"; + else + echo "<option value=\"$i\">$i</option>\n"; + } + ?> + </select> / + + <select name="year"> + <?php + //Print the years + for($i = 1950 ; $i < 2010 ; $i++) + { + if($i<10) + { + $i = "0".$i; + } + if($datedata['year'] == $i) + echo "<option value=\"$i\" SELECTED>$i</option>\n"; + else + echo "<option value=\"$i\">$i</option>\n"; + } + ?> + </select> + </td> + </tr> + + </table> + + <table width="100%" cellspacing="3" cellpadding="3" border="0"> + <tr> + + <td align="left" valign="middle"><b><?php echo _AM_HOMETEAM;?></b></td> + <td align="left" valign="middle"><b><?php echo _AM_AWAYTEAM;?></b></td> + <td align="center" valign="middle"><b><?php echo _AM_GOALSHOME;?></b></td> + <td align="center" valign="middle"><b><?php echo _AM_GOALSAWAY;?></b></td> + + </tr> + + <?php + + // + //Lets get all the matches from selected date to the form + // + $i = 0; + while($matchdata = $xoopsDB->fetchArray($get_matches)) + { + // + //Back to line 0 in the query if not the first loop + // + if($i>0) + mysql_data_seek($get_opponents, 0); + + echo' + <tr> + <td align="left" valign="middle"> + '; + + echo"<select name=\"home[$i]\">"; + + while($data = $xoopsDB->fetchArray($get_opponents)) + { + if($matchdata['homeid'] == $data['id']) + echo"<option value=\"$data[id]\" SELECTED>$data[name]</option>\n"; + } + + echo' + </select> + </td> + <td align="left" valign="middle"> + '; + + // + //Back to line 0 in the query + // + mysql_data_seek($get_opponents, 0); + + echo"<select name=\"away[$i]\">"; + + while($data = $xoopsDB->fetchArray($get_opponents)) + { + if($matchdata['awayid'] == $data['id']) + echo"<option value=\"$data[id]\" SELECTED>$data[name]</option>\n"; + } + + echo" + </select> + </td> + <td align=\"center\" valign=\"middle\"><input type=\"text\" name=\"home_goals[$i]\" size=\"2\" value=\"$matchdata[homegoals]\"></td> + <td align=\"center\" valign=\"middle\"><input type=\"text\" name=\"away_goals[$i]\" size=\"2\" value=\"$matchdata[awaygoals]\"></td> + + </tr> + "; + + + + + $i++; + } + + ?> + + </table> + + <font color="red"><?php echo _AM_MODNOTICE1;?></font><br><br> + <input type="hidden" name="qty" value="<?= $i ?>"> + <input type="hidden" name="seasonname" value="<?php echo $seasonname; ?>"> + <br><input type="submit" name="modifyall_submit" value="<?php echo _AM_MODINPUT;?>"> + </form> + + <?php + } + elseif($action == 'modify') + { + $id = intval($_REQUEST['id']); + + $get_match = $xoopsDB->query("SELECT DAYOFMONTH(LM.LeagueMatchDate) AS dayofmonth, + MONTH(LM.LeagueMatchDate) AS month, + YEAR(LM.LeagueMatchDate) AS year, + LM.LeagueMatchHomeID AS homeid, + LM.LeagueMatchAwayID AS awayid, + LM.LeagueMatchHomeGoals AS homegoals, + LM.LeagueMatchAwayGoals AS awaygoals + FROM ".$xoopsDB->prefix("tplls_leaguematches")." LM + WHERE LM.LeaguematchID = '$id' + LIMIT 1 + ") + ; + + $get_opponents = $xoopsDB->query("SELECT OpponentID AS id, + OpponentName AS name + FROM ".$xoopsDB->prefix("tplls_opponents")." + ORDER BY OpponentName + ") + ; + + $matchdata = $xoopsDB->fetchArray($get_match); + + //$xoopsDB->freeRecordSet($get_match); + + ?> + <form method="post" action="<?php echo "$PHP_SELF"?>"> + <h3><?php echo _AM_MODMATCH;?></h3> + + <table width="100%" cellspacing="3" cellpadding="3" border="0"> + + <tr> + <td align="left" valign="top"> + <?php echo _AM_DATETIME;?> + </td> + <td align="left" valign="top"> + + <select name="day"> + <?php + //Print the days + for($i = 1 ; $i < 32 ; $i++) + { + if($i<10) + { + $i = "0".$i; + } + if($matchdata['dayofmonth'] == $i) + echo "<option value=\"$i\" SELECTED>$i</option>\n"; + else + echo "<option value=\"$i\">$i</option>\n"; + } + ?> + </select> / + + <select name="month"> + <?php + //Print the months + for($i = 1 ; $i < 13 ; $i++) + { + if($i<10) + { + $i = "0".$i; + } + if($matchdata['month'] == $i) + echo "<option value=\"$i\" SELECTED>$i</option>\n"; + else + echo "<option value=\"$i\">$i</option>\n"; + } + ?> + </select> / + + <select name="year"> + <?php + //Print the years + for($i = 1950 ; $i < 2010 ; $i++) + { + if($i<10) + { + $i = "0".$i; + } + if($matchdata['year'] == $i) + echo "<option value=\"$i\" SELECTED>$i</option>\n"; + else + echo "<option value=\"$i\">$i</option>\n"; + } + ?> + </select> + </td> + </tr> + + </table> + + <table width="100%" cellspacing="3" cellpadding="3" border="0"> + <tr> + + <td align="left" valign="middle"><b><?php echo _AM_HOMETEAM;?></b></td> + <td align="left" valign="middle"><b><?php echo _AM_AWAYTEAM;?></b></td> + <td align="center" valign="middle"><b><?php echo _AM_GOALSHOME;?></b></td> + <td align="center" valign="middle"><b><?php echo _AM_GOALSAWAY;?></b></td> + + </tr> + + <tr> + <td align="left" valign="middle"> + + <select name="home"> + <?php + + while($data = $xoopsDB->fetchArray($get_opponents)) + { + if($matchdata['homeid'] == $data['id']) + echo"<option value=\"$data[id]\" SELECTED>$data[name]</option>\n"; + else + echo"<option value=\"$data[id]\">$data[name]</option>\n"; + } + + ?> + </select> + </td> + <td align="left" valign="middle"> + + <select name="away"> + <?php + + mysql_data_seek($get_opponents, 0); + + while($data = $xoopsDB->fetchArray($get_opponents)) + { + if($matchdata['awayid'] == $data['id']) + echo"<option value=\"$data[id]\" SELECTED>$data[name]</option>\n"; + else + echo"<option value=\"$data[id]\">$data[name]</option>\n"; + } + + ?> + </select> + </td> + <td align="center" valign="middle"><input type="text" name="home_goals" size="2" value="<?= $matchdata['homegoals'] ?>"></td> + <td align="center" valign="middle"><input type="text" name="away_goals" size="2" value="<?= $matchdata['awaygoals'] ?>"></td> + + </tr> + + </table> + + + <input type="hidden" name="mid" value="<?= $id ?>"> + <input type="hidden" name="homeid" value="<?= $matchdata['awayid'] ?>"> + <input type="hidden" name="awayid" value="<?= $matchdata['homeid'] ?>"> + <br><input type="submit" name="modify_submit" value="<?php echo _AM_MODINPUT2;?>"> + <input type="hidden" name="seasonid" value="<?php echo $seasonid; ?>"> + <input type="hidden" name="seasonname" value="<?php echo $seasonname; ?>"> + <br><br><br><br><br> + <input type="submit" name="delete_submit" value="<?php echo _AM_DELINPUT;?>"> + </form> + + <?php + } + ?> + </td> + + <td align="left" valign="top" width="250"> + + <table width="250"> + <?php + $get_matches = $xoopsDB->query("SELECT O.OpponentName AS hometeam, + OP.OpponentName AS awayteam, + LM.LeagueMatchHomeGoals AS goals_home, + LM.LeagueMatchAwayGoals AS goals_away, + LM.LeagueMatchID AS id, + LM.LeagueMatchDate AS defaultdate, + DATE_FORMAT(LM.LeagueMatchDate, '%b %D %Y') AS date + FROM ".$xoopsDB->prefix("tplls_leaguematches")." LM, ".$xoopsDB->prefix("tplls_opponents")." O, ".$xoopsDB->prefix("tplls_opponents")." OP + WHERE O.OpponentID = LM.LeagueMatchHomeID AND + OP.OpponentID = LM.LeagueMatchAwayID AND + LeagueMatchSeasonID = '$seasonid' + ORDER BY LM.LeagueMatchDate DESC"); + + if($xoopsDB->getRowsNum($get_matches) < 1) + { + echo "<b> "._AM_NOMATCHESYET." <br><u> $seasonname</u> </b>"; + } + else + { + echo "<b> "._AM_MATCHESYET." <br> <u>$seasonname</u></b><br><br>"; + + $i = 0; + $temp = ''; + + while($data = $xoopsDB->fetchArray($get_matches)) + { + if($i == 0) + { + echo" + <tr> + <td align=\"left\" colspan=\"2\"> + <b><a href=\"$PHP_SELF?action=modifyall&date=$data[defaultdate]\">$data[date]</a></b> + </td> + </tr> + "; + } + + if($data['date'] != "$temp" && $i > 0) + { + echo" + <tr> + <td align=\"left\" colspan=\"2\"> + <br><br> + <b><a href=\"$PHP_SELF?action=modifyall&date=$data[defaultdate]\">$data[date]</a></b> + </td> + </tr> + "; + } + + echo " + <tr> + <td align=\"left\" valign=\"top\" width=\"230\"> + <a href=\"$PHP_SELF?action=modify&id=$data[id]\">$data[hometeam] - $data[awayteam]</a> + </td> + <td align=\"right\" valign=\"top\" width=\"50\">"; + + if(!is_null($data['goals_home'])) + echo"$data[goals_home]-$data[goals_away]"; + else + echo' '; + + + echo" + </td> + </tr>"; + + $temp = "$data[date]"; + + $i++; + } + } + ?> + </table> + </td> + </tr> + </table> +<?php +xoops_cp_footer(); +?> \ No newline at end of file Added: XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/menu.php =================================================================== --- XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/menu.php (rev 0) +++ XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/menu.php 2012-03-14 09:32:43 UTC (rev 9127) @@ -0,0 +1,10 @@ +<?php + +$adminmenu[1]['title'] = _MI_TPLLS_ADMENU1; +$adminmenu[1]['link'] = "admin/seasons.php"; +$adminmenu[2]['title'] = _MI_TPLLS_ADMENU2; +$adminmenu[2]['link'] = "admin/opponents.php"; +$adminmenu[3]['title'] = _MI_TPLLS_ADMENU3; +$adminmenu[3]['link'] = "admin/leaguematches.php"; + +?> \ No newline at end of file Added: XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/opponents.php =================================================================== --- XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/opponents.php (rev 0) +++ XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/opponents.php 2012-03-14 09:32:43 UTC (rev 9127) @@ -0,0 +1,383 @@ +<?php +/* +************************************************************ +TPLLeagueStats is a league stats software designed for football (soccer) +team. + +Copyright (C) 2003 Timo Lepp\xE4nen / TPL Design +email: in...@tp... +www: www.tpl-design.com/tplleaguestats + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +************************************************************ +Ported to xoops by +Mythrandir http://www.web-udvikling.dk +and +ralf57 http://www.madeinbanzi.it + +************************************************************ +*/ + +include '../../../include/cp_header.php'; //Include file, which checks for permissions and sets navigation + +if (isset($_POST['season_select'])) { + $season = explode("____",$_POST['season_select']); +} +elseif (isset($_POST['seasonid'])) { + $season = array (intval($_POST['seasonid']), $_POST['seasonname']); +} +elseif (!isset($_SESSION['season_id'])) { + $sql = "SELECT SeasonID, SeasonName FROM ".$xoopsDB->prefix("tplls_seasonnames")." WHERE SeasonDefault=1"; + $seasonname = $xoopsDB->query($sql); + $seasonname = $xoopsDB->fetchArray($seasonname); + $season = array($seasonname['SeasonID'], $seasonname['SeasonName']); +} +else { + $season = array(intval($_SESSION['season_id']), $_SESSION['season_name']); +} +$_SESSION['season_id'] = $season[0]; +$_SESSION['season_name'] = $season[1]; +$seasonid = $_SESSION['season_id']; +$seasonname = $_SESSION['season_name']; + +$PHP_SELF = $_SERVER['PHP_SELF']; +$action = isset($_GET['action']) ? $_GET['action'] : null; +$action = isset($_POST['action']) ? $_POST['action'] : $action; + +$add_submit = isset($_POST['add_submit']) ? $_POST['add_submit'] : false; +$modify_submit = isset($_POST['modify_submit']) ? $_POST['modify_submit'] : false; +$delete_submit = isset($_POST['delete_submit']) ? $_POST['delete_submit'] : false; + +$d_points_add = isset($_POST['d_points_add']) ? $_POST['d_points_add'] : null; +$d_points_modify = isset($_POST['d_points_modify']) ? $_POST['d_points_modify'] : null; + +xoops_cp_header(); + +?> + +<!-- Navigation bar--> +<table width="560" cellspacing="0" bordercolordark="white" bordercolorlight="black" style="border-collapse:collapse;"> + <tr> + <td align="center" style="padding: 3px;background-color: #FFFFFF; border:1px #000000 dotted;"> + <a href="seasons.php"><?php echo _AM_NAVSEASONS;?></a></td> + <td align="center" style="padding: 3px;background-color: #E6E6FF; border:1px #000000 dotted;"> + <a href="opponents.php"><?php echo _AM_NAVOPPONENTS;?></a></td> + <td align="center" nowrap style="padding: 3px;background-color: #FFFFFF; border:1px #000000 dotted;"> + <a href="leaguematches.php"><?php echo _AM_NAVLEAGUEMATCHES;?></a></td> + <td align="center" style="padding: 3px;background-color: #FFFFFF; border:1px #000000 dotted;"> + <a href="../index.php" target="_blank"><?php echo _AM_NAVLEAGUETABLE;?></a></td> + </tr> +</table> +<!-- End Navigation bar--> + +<?php + +// +//Add +// +if($add_submit) +{ + $opponent = trim($_POST['opponent']); + $opponent = $xoopsDB->quoteString($opponent); + //query to check if there are already a team with submitted name + $query = $xoopsDB->query("SELECT OpponentName FROM ".$xoopsDB->prefix("tplls_opponents")." WHERE OpponentName = $opponent"); + + if($xoopsDB->getRowsNum($query) > 0) + { + echo "<font color='red'><b>". _AM_TEAMDUPLICATE."</b></font><br><br>"; + exit(); + } + + if($opponent != '') + { + $xoopsDB->query("INSERT INTO ".$xoopsDB->prefix("tplls_opponents")." SET OpponentName = $opponent"); + + header("Location: $PHP_SELF"); + } +} +// +//Modify +// +elseif($modify_submit) +{ + $opponent = $xoopsDB->quoteString(trim($_POST['opponent'])); + $opponentid = intval($_POST['opponentid']); + $own = $_POST['own']; + // + //Checked own + // + if(!isset($own)) + { + $own = 0; + } + + if($opponent != '') + { + // + //If own team->delete the own status from the previous one + // + if($own == 1) + { + $xoopsDB->query("UPDATE ".$xoopsDB->prefix("tplls_opponents")." SET + OpponentOwn = '0' + WHERE OpponentOwn = '1' + "); + } + + $xoopsDB->query("UPDATE ".$xoopsDB->prefix("tplls_opponents")." SET + OpponentName = $opponent, + OpponentOwn = '$own' + WHERE OpponentID = $opponentid"); + } + + header("Location: $HTTP_REFERER"); +} +// +//Delete +// +elseif($delete_submit) +{ + $opponentid = intval($_POST['opponentid']); + + // + //query to check, if team already exists in the leaguetables + // + $query = $xoopsDB->query("SELECT LeagueMatchID + FROM ".$xoopsDB->prefix("tplls_leaguematches")." + WHERE LeagueMatchHomeID = $opponentid OR LeagueMatchAwayID = $opponentid"); + + if($xoopsDB->getRowsNum($query) == 0) + { + $xoopsDB->query("DELETE FROM ".$xoopsDB->prefix("tplls_opponents")." WHERE OpponentID = $opponentid"); + + header("Location: $PHP_SELF"); + } + else + { + echo "<font color='red'><b>". _AM_TEAMISINUSE."</b></font><br><br>"; + exit(); + } +} +// +//Deducted points +// +elseif($d_points_add) +{ + $d_points = intval($_POST['d_points']); + $teamid = intval($_POST['teamid']); + $seasonid = intval($_POST['seasonid']); + + if(is_numeric($d_points) && $d_points != '') + { + // + //Adds + // + $xoopsDB->query("INSERT INTO ".$xoopsDB->prefix("tplls_deductedpoints")." SET + seasonid = $seasonid, + teamid = $teamid, + points = $d_points"); + } + + header("Location: $HTTP_REFERER"); +} +// +//Modify of deducted points +// +elseif($d_points_modify) +{ + $d_points = intval($_POST['d_points']); + $id = intval($_POST['id']); + + if(is_numeric($d_points) && $d_points != '') + { + // + //Delete deducted points if zero is written + // + if($d_points == 0) + { + $xoopsDB->query("DELETE FROM ".$xoopsDB->prefix("tplls_deductedpoints")." + WHERE id = $id"); + } + // + //Modify if some other number + // + else + { + $xoopsDB->query("UPDATE ".$xoopsDB->prefix("tplls_deductedpoints")." SET + points = $d_points + WHERE id = $id"); + } + } + + header("Location: $HTTP_REFERER"); +} + + +?> + + <?php + include('head.php'); + ?> + <table align="center" width="600"> + <tr> + <td align="left" valign="top"> + <?php + if(!isset($action)) + { + ?> + <form method="post" action="<?php echo "$PHP_SELF"?>"> + <h3><?php echo _AM_ADDNEWTEAM;?></h3> + <table width="100%" cellspacing="3" cellpadding="3" border="0"> + <tr> + <td align="left" valign="top"> + <?php echo _AM_TEAMNAME;?> + </td> + <td align="left" valign="top"> + <input type="text" name="opponent"> + </td> + </tr> + </table> + <input type="submit" name="add_submit" value="<?php echo _AM_ADDTEAM;?>"> + </form> + <?php + } + elseif($action == 'modify') + { + $opponentid = intval($_REQUEST['opponent']); + $get_opponent = $xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix("tplls_opponents")." WHERE OpponentID = $opponentid LIMIT 1"); + $data = $xoopsDB->fetchArray($get_opponent); + ?> + + <form method="post" action="<?php echo "$PHP_SELF"?>"> + <h3><?php echo _AM_TEAMMODIFYDELETE;?></h3> + <table width="100%" cellspacing="3" cellpadding="3" border="0"> + <tr> + <td align="left" valign="top"> + <?php echo _AM_TEAMNAME;?> + </td> + <td align="left" valign="top"> + <input type="text" name="opponent" value="<?php echo $data['OpponentName'] ?>"> + <input type="hidden" name="opponentid" value="<?php echo $data['OpponentID'] ?>"> + </td> + </tr> + + <tr> + <td align="left" valign="top"> + <?php echo _AM_TEAMISYOURS;?> + </td> + <td align="left" valign="top"> + <?php + + if($data['OpponentOwn'] == 1) + echo"<input type=\"checkbox\" name=\"own\" value=\"1\" CHECKED>\n"; + else + echo"<input type=\"checkbox\" name=\"own\" value=\"1\">\n"; + + ?> + </td> + </tr> + + </table> + <input type="submit" name="modify_submit" value="<?php echo _AM_TEAMMODIFY;?>"> <input type="submit" name="delete_submit" value="<?php echo _AM_TEAMDELETE;?>"> + </form> + + <a href="<?php echo "$PHP_SELF" ?>"><?php echo _AM_ADDNEWTEAM;?></a> + + <h3><?php echo _AM_DEDPTS;?></h3> + + <?php + + // + //Check if there are deducted points + // + + echo"<b>$seasonname</b><br><br>"; + + $get_deduct = $xoopsDB->query("SELECT points, id + FROM ".$xoopsDB->prefix("tplls_deductedpoints")." + WHERE seasonid = $seasonid AND teamid = $opponentid + LIMIT 1 + "); + + if($xoopsDB->getRowsNum($get_deduct) == 0) + { + echo" + <form method=\"POST\" action=\"$PHP_SELF\">" + ._AM_ADDDEDPTS. + "<input type=\"text\" size=\"2\" name=\"d_points\"> + <input type=\"hidden\" value=\"$opponentid\" name=\"teamid\"> + <input type=\"hidden\" value=\"$seasonid\" name=\"seasonid\"> + <input type=\"submit\" value="._AM_ADEDPTS." name=\"d_points_add\"> + </form> + "; + } + else + { + $data = $xoopsDB->fetchArray($get_deduct); + + echo" + <form method=\"POST\" action=\"$PHP_SELF\">" + ._AM_MODDEDPTS. + "<input type=\"text\" size=\"2\" name=\"d_points\" value=\"$data[points]\"> + <input type=\"hidden\" value=\"$data[id]\" name=\"id\"> + <input type=\"submit\" value="._AM_MDEDPTS." name=\"d_points_modify\"> + </form> + "; + } + + mysql_free_result($get_deduct); + + ?> + + <?php + mysql_free_result($get_opponent); + } + ?> + </td> + + <td align="left" valign="top"> + <?php + $get_opponents = $xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix("tplls_opponents")." ORDER BY OpponentName"); + + if($xoopsDB->getRowsNum($get_opponents) < 1) + { + echo "<b>". _AM_NOTEAMSAVAILABLE."</b><br><br>"; + } + else + { + echo "<b>". _AM_TEAMSAVAILABLE."</b><br><br>"; + + while($data = $xoopsDB->fetchArray($get_opponents)) + { + echo "<a href=\"$PHP_SELF?action=modify&opponent=$data[OpponentID]\">$data[OpponentName]</a>"; + + if($data['OpponentOwn'] == 1) + echo " "._AM_YT. "<br>\n"; + else + echo"<br>\n"; + } + } + + ?> + + <br><br> + <?php echo _AM_YOURTEAM;?> + </td> + </tr> + </table> +<?php +xoops_cp_footer(); +?> \ No newline at end of file Added: XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/seasons.php =================================================================== --- XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/seasons.php (rev 0) +++ XoopsModules/tplleaguestats/trunk/tplleaguestats/admin/seasons.php 2012-03-14 09:32:43 UTC (rev 9127) @@ -0,0 +1,307 @@ +<?php +/* +************************************************************ +TPLLeagueStats is a league stats software designed for football (soccer) +team. + +Copyright (C) 2003 Timo Lepp\xE4nen / TPL Design +email: in...@tp... +www: www.tpl-design.com/tplleaguestats + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +************************************************************ +Ported to xoops by +Mythrandir http://www.web-udvikling.dk +and +ralf57 http://www.madeinbanzi.it + +************************************************************ +*/ + +include '../../../include/cp_header.php'; //Include file, which checks for permissions and sets navigation + +$seasonid = isset($_GET['season_id']) ? intval($_GET['season_id']) : 0; +$seasonname = isset($_GET['season_name']) ? $_GET['season_name'] : ""; + +$PHP_SELF = $_SERVER['PHP_SELF']; +$HTTP_REFERER = $_SERVER['HTTP_REFERER']; +$action = isset($_GET['action']) ? $_GET['action'] : null; +$action = isset($_POST['action']) ? $_POST['action'] : $action; + +$add_submit = isset($_POST['add_submit']) ? $_POST['add_submit'] : false; +$modify_submit = isset($_POST['modify_submit']) ? $_POST['modify_submit'] : false; +$delete_submit = isset($_POST['delete_submit']) ? $_POST['delete_submit'] : false; + +xoops_cp_header(); + +?> + +<!-- Navigation bar--> +<table width="560" cellspacing="0" bordercolordark="white" bordercolorlight="black" style="border-collapse:collapse;"> + <tr> + <td align="center" style="padding: 3px;background-color: #E6E6FF; border:1px #000000 dotted;"> + <a href="seasons.php"><?php echo _AM_NAVSEASONS;?></a></td> + <td align="center" style="padding: 3px;background-color: #FFFFFF; border:1px #000000 dotted;"> + <a href="opponents.php"><?php echo _AM_NAVOPPONENTS;?></a></td> + <td align="center" nowrap style="padding: 3px;background-color: #FFFFFF; border:1px #000000 dotted;"> + <a href="leaguematches.php"><?php echo _AM_NAVLEAGUEMATCHES;?></a></td> + <td align="center" style="padding: 3px;background-color: #FFFFFF; border:1px #000000 dotted;"> + <a href="../index.php" target="_blank"><?php echo _AM_NAVLEAGUETABLE;?></a></td> + </tr> +</table> +<!-- End Navigation bar--> + + +<?php +if($add_submit) +{ + $name = $xoopsDB->quoteString(trim($_POST['name'])); + $drawline = trim($_POST['drawline']); + + //Query to check if there are already a submitted season name in the database + $query = $xoopsDB->query("SELECT SeasonName FROM ".$xoopsDB->prefix("tplls_seasonnames")." WHERE SeasonName = $name"); + + if($xoopsDB->getRowsNum($query) > 0) + { + echo "<font color='red'><b>". _AM_SEASONDUPLICATE."</b></font><br><br>"; + exit(); + } + + mysql_free_result($query); + + if($name != '') + { + $xoopsDB->query("INSERT INTO ".$xoopsDB->prefix("tplls_seasonnames")." SET + SeasonName = $name, + SeasonLine = '$drawline', + SeasonDefault = '$defseason'"); + + header("Location: $PHP_SELF"); + } +} +elseif($modify_submit) +{ + $name = $xoopsDB->quoteString(trim($_POST['name'])); + $drawline = trim($_POST['drawline']); + $publish = $_POST['publish']; + $seasonid = intval($_POST['seasonid']); + $defseason = intval($_POST['defseason']); + + // + //If published is checked + // + if(!isset($publish)) + { + $publish = 0; + } + if(!isset($defseason)) + { + $defseason = 0; + } + + if($name != '') + { + // + //If default season->delete the default status from the previous one + // + if($defseason == 1) + { + $xoopsDB->query("UPDATE ".$xoopsDB->prefix("tplls_seasonnames")." SET + SeasonDefault = '0'"); + } + $xoopsDB->query("UPDATE ".$xoopsDB->prefix("tplls_seasonnames")." SET + SeasonName = $name, + SeasonLine = '$drawline', + SeasonPublish = '$publish', + SeasonDefault = '$defseason' + WHERE SeasonID = '$seasonid'"); + } + + header("Location: $HTTP_REFERER"); +} +elseif($delete_submit) +{ + $seasonid = intval($_POST['seasonid']); + + // + //Query to check if there are already matches in the season->can't delete + // + $query = $xoopsDB->query("SELECT M.LeagueMatchID + FROM ".$xoopsDB->prefix("tplls_leaguematches")." M, ".$xoopsDB->prefix("tplls_seasonnames")." S + WHERE M.LeagueMatchSeasonID = '$seasonid'"); + + if($xoopsDB->getRowsNum($query) == 0) + { + $xoopsDB->query("DELETE FROM ".$xoopsDB->prefix("tplls_seasonnames")." WHERE SeasonID = '$seasonid'"); + } + else + { + echo "<font color='red'><b>". _AM_SEASONHASMATCHES."</b></font><br><br>"; + exit(); + } + + header("Location: $PHP_SELF"); +} + + +?> + + <?php + include('head.php'); + ?> + <table align="center" width="600"> + <tr> + <td> + <?php + if(!isset($action)) + { + ?> + <form method="post" action="<?php echo "$PHP_SELF" ?>"> + <h3><?php echo _AM_ADDSEASON;?></h3> + <table width="100%" cellspacing="3" cellpadding="3" border="0"> + <tr> + <td align="left" valign="top"> + <?php echo _AM_SEASONNAMEYEARS;?> + </td> + <td align="left" valign="top"> + <input type="text" name="name"> + </td> + </tr> + + <tr> + <td align="left" valign="top"> + <?php echo _AM_SEASONDRAWLINE;?> + </td> + <td align="left" valign="top"> + <input type="text" name="drawline" value="" size="10"> + </td> + </tr> + </table> + <input type="submit" name="add_submit" value="<?php echo _AM_SEASONADD;?>"> + </form> + <?php + } + elseif($action == 'modify') + { + $seasonid = intval($_REQUEST['season']); + $get_season = $xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix("tplls_seasonnames")." WHERE SeasonID = '$seasonid' LIMIT 1"); + $data = $xoopsDB->fetchArray($get_season); + ?> + + <form method="post" action="<?php echo "$PHP_SELF"?>"> + <h3><?php echo _AM_SEASONMODIFYDELETE;?></h3> + <table width="100%" cellspacing="3" cellpadding="3" border="0"> + <tr> + <td align="left" valign="top"> + <?php echo _AM_SEASONNAMEYEARS;?> + </td> + <td> + <input type="text" name="name" value="<?php echo $data['SeasonName'] ?>"> + <input type="hidden" name="seasonid" value="<?php echo $data['SeasonID'] ?>"> + </td> + </tr> + <tr> + <td align="left" valign="top"> + <?php echo _AM_DEFAULTSEASON;?> + </td> + <td align="left" valign="top"> + <?php + + if($data['SeasonDefault'] == 1) + echo"<input type=\"checkbox\" name=\"defseason\" value=\"1\" CHECKED>\n"; + else + echo"<input type=\"checkbox\" name=\"defseason\" value=\"1\">\n"; + + ?> + </td> + </tr> + + <tr> + <td align="left" valign="top"> + <?php echo _AM_SEASONDRAWLINE;?> + </td> + <td align="left" valign="top"> + <input type="text" name="drawline" value="<?= $data['SeasonLine'] ?>" size="10"> + </td> + </tr> + + <tr> + <td align="left" valign="top"> + <?php echo _AM_SEASONPUBLISHED;?> + </td> + <td align="left" valign="top"> + <?php + // + //If season is published + // + if($data['SeasonPublish'] == 1) + echo'<input type="checkbox" name="publish" value="1" CHECKED>'; + ... [truncated message content] |
From: <txm...@us...> - 2012-03-14 18:41:01
|
Revision: 9130 http://xoops.svn.sourceforge.net/xoops/?rev=9130&view=rev Author: txmodxoops Date: 2012-03-14 18:40:46 +0000 (Wed, 14 Mar 2012) Log Message: ----------- Added bet release v1.0 Added Paths: ----------- XoopsModules/gapply/ XoopsModules/gapply/branches/ XoopsModules/gapply/releases/ XoopsModules/gapply/releases/1.0/ XoopsModules/gapply/releases/1.0/gapply/ XoopsModules/gapply/releases/1.0/gapply/admin/ XoopsModules/gapply/releases/1.0/gapply/admin/about.php XoopsModules/gapply/releases/1.0/gapply/admin/admin_footer.php XoopsModules/gapply/releases/1.0/gapply/admin/admin_header.php XoopsModules/gapply/releases/1.0/gapply/admin/index.html XoopsModules/gapply/releases/1.0/gapply/admin/index.php XoopsModules/gapply/releases/1.0/gapply/admin/menu.php XoopsModules/gapply/releases/1.0/gapply/blocks/ XoopsModules/gapply/releases/1.0/gapply/blocks/index.html XoopsModules/gapply/releases/1.0/gapply/class/ XoopsModules/gapply/releases/1.0/gapply/class/index.html XoopsModules/gapply/releases/1.0/gapply/colorif.php XoopsModules/gapply/releases/1.0/gapply/css/ XoopsModules/gapply/releases/1.0/gapply/css/gcolorif.css XoopsModules/gapply/releases/1.0/gapply/css/index.html XoopsModules/gapply/releases/1.0/gapply/css/style.css XoopsModules/gapply/releases/1.0/gapply/docs/ XoopsModules/gapply/releases/1.0/gapply/docs/changelog.txt XoopsModules/gapply/releases/1.0/gapply/docs/credits.txt XoopsModules/gapply/releases/1.0/gapply/docs/index.html XoopsModules/gapply/releases/1.0/gapply/docs/install.txt XoopsModules/gapply/releases/1.0/gapply/docs/lang_diff.txt XoopsModules/gapply/releases/1.0/gapply/docs/licence.txt XoopsModules/gapply/releases/1.0/gapply/docs/readme.txt XoopsModules/gapply/releases/1.0/gapply/docsearch.php XoopsModules/gapply/releases/1.0/gapply/earth.php XoopsModules/gapply/releases/1.0/gapply/header.php XoopsModules/gapply/releases/1.0/gapply/images/ XoopsModules/gapply/releases/1.0/gapply/images/gapply_slogo.png XoopsModules/gapply/releases/1.0/gapply/images/icons/ XoopsModules/gapply/releases/1.0/gapply/images/icons/index.html XoopsModules/gapply/releases/1.0/gapply/images/icons/off.png XoopsModules/gapply/releases/1.0/gapply/images/icons/on.png XoopsModules/gapply/releases/1.0/gapply/images/index.html XoopsModules/gapply/releases/1.0/gapply/images/menu/ XoopsModules/gapply/releases/1.0/gapply/images/menu/bg.png XoopsModules/gapply/releases/1.0/gapply/images/menu/index.html XoopsModules/gapply/releases/1.0/gapply/images/menu/left_both.png XoopsModules/gapply/releases/1.0/gapply/images/menu/right_both.png XoopsModules/gapply/releases/1.0/gapply/images/txmodxoops_logo.png XoopsModules/gapply/releases/1.0/gapply/include/ XoopsModules/gapply/releases/1.0/gapply/include/configs.php XoopsModules/gapply/releases/1.0/gapply/include/functions.php XoopsModules/gapply/releases/1.0/gapply/include/index.html XoopsModules/gapply/releases/1.0/gapply/include/install.php XoopsModules/gapply/releases/1.0/gapply/index.php XoopsModules/gapply/releases/1.0/gapply/js/ XoopsModules/gapply/releases/1.0/gapply/js/common.js XoopsModules/gapply/releases/1.0/gapply/js/default.js XoopsModules/gapply/releases/1.0/gapply/js/gcolorif.js XoopsModules/gapply/releases/1.0/gapply/js/gearth.js XoopsModules/gapply/releases/1.0/gapply/js/gsmapsearch.js XoopsModules/gapply/releases/1.0/gapply/js/index.html XoopsModules/gapply/releases/1.0/gapply/js/jq.init.js XoopsModules/gapply/releases/1.0/gapply/js/main.js XoopsModules/gapply/releases/1.0/gapply/js/mod_control_api.js XoopsModules/gapply/releases/1.0/gapply/js/urchin.js XoopsModules/gapply/releases/1.0/gapply/language/ XoopsModules/gapply/releases/1.0/gapply/language/english/ XoopsModules/gapply/releases/1.0/gapply/language/english/admin.php XoopsModules/gapply/releases/1.0/gapply/language/english/blocks.php XoopsModules/gapply/releases/1.0/gapply/language/english/help/ XoopsModules/gapply/releases/1.0/gapply/language/english/help/help.html XoopsModules/gapply/releases/1.0/gapply/language/english/help/index.html XoopsModules/gapply/releases/1.0/gapply/language/english/index.html XoopsModules/gapply/releases/1.0/gapply/language/english/main.php XoopsModules/gapply/releases/1.0/gapply/language/english/modinfo.php XoopsModules/gapply/releases/1.0/gapply/language/index.html XoopsModules/gapply/releases/1.0/gapply/language/italian/ XoopsModules/gapply/releases/1.0/gapply/language/italian/admin.php XoopsModules/gapply/releases/1.0/gapply/language/italian/blocks.php XoopsModules/gapply/releases/1.0/gapply/language/italian/help/ XoopsModules/gapply/releases/1.0/gapply/language/italian/help/help.html XoopsModules/gapply/releases/1.0/gapply/language/italian/help/index.html XoopsModules/gapply/releases/1.0/gapply/language/italian/index.html XoopsModules/gapply/releases/1.0/gapply/language/italian/main.php XoopsModules/gapply/releases/1.0/gapply/language/italian/modinfo.php XoopsModules/gapply/releases/1.0/gapply/map.php XoopsModules/gapply/releases/1.0/gapply/search.php XoopsModules/gapply/releases/1.0/gapply/sql/ XoopsModules/gapply/releases/1.0/gapply/sql/index.html XoopsModules/gapply/releases/1.0/gapply/templates/ XoopsModules/gapply/releases/1.0/gapply/templates/admin/ XoopsModules/gapply/releases/1.0/gapply/templates/admin/gapply_admin_about.html XoopsModules/gapply/releases/1.0/gapply/templates/admin/gapply_admin_help.html XoopsModules/gapply/releases/1.0/gapply/templates/admin/index.html XoopsModules/gapply/releases/1.0/gapply/templates/blocks/ XoopsModules/gapply/releases/1.0/gapply/templates/blocks/index.html XoopsModules/gapply/releases/1.0/gapply/templates/gapply_colorif.html XoopsModules/gapply/releases/1.0/gapply/templates/gapply_docsearch.html XoopsModules/gapply/releases/1.0/gapply/templates/gapply_earth.html XoopsModules/gapply/releases/1.0/gapply/templates/gapply_footer.html XoopsModules/gapply/releases/1.0/gapply/templates/gapply_header.html XoopsModules/gapply/releases/1.0/gapply/templates/gapply_index.html XoopsModules/gapply/releases/1.0/gapply/templates/gapply_map.html XoopsModules/gapply/releases/1.0/gapply/templates/gapply_search.html XoopsModules/gapply/releases/1.0/gapply/templates/index.html XoopsModules/gapply/releases/1.0/gapply/xoops_version.php XoopsModules/gapply/trunk/ XoopsModules/gapply/trunk/gapply/ Added: XoopsModules/gapply/releases/1.0/gapply/admin/about.php =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/admin/about.php (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/admin/about.php 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1,48 @@ +<?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) + * **************************************************************************** + * GAPPLY - 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 gapply + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Thu 2012/03/08 9:02:38 : Timgno Exp $ + * **************************************************************************** + */ + + +include "admin_header.php"; +xoops_cp_header(); + +$aboutAdmin = new ModuleAdmin(); + +echo $aboutAdmin->addNavigation("about.php"); +echo $aboutAdmin->renderabout($GLOBALS['xoopsModuleConfig']['id_paypal'], false); + +include "admin_footer.php"; \ No newline at end of file Added: XoopsModules/gapply/releases/1.0/gapply/admin/admin_footer.php =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/admin/admin_footer.php (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/admin/admin_footer.php 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1,45 @@ +<?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) + * **************************************************************************** + * GAPPLY - 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 gapply + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Thu 2012/03/08 9:02:38 : 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_GAPPLY_MAINTAINEDBY." + <a href='http://www.txmodxoops.org/modules/newbb/' title='Visit TXMod Xoops Community' class='tooltip' rel='external'>TXMod Xoops Community</a></div>"; +xoops_cp_footer(); Added: XoopsModules/gapply/releases/1.0/gapply/admin/admin_header.php =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/admin/admin_header.php (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/admin/admin_header.php 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1,93 @@ +<?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) + * **************************************************************************** + * GAPPLY - 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 gapply + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Thu 2012/03/08 9:02:38 : 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_ERROR_NOFRAMEWORKS); + xoops_cp_footer(); + //return false; + } +$dirname = basename(dirname(dirname( __FILE__ ) )); +$module_handler =& xoops_gethandler('module'); +$xoopsModule = & $module_handler->getByDirname($dirname); +$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); +$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); +$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); + +$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); +//xoops_cp_header(); + +//Load languages +xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); Added: XoopsModules/gapply/releases/1.0/gapply/admin/index.html =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/admin/index.html (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/admin/index.html 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/gapply/releases/1.0/gapply/admin/index.php =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/admin/index.php (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/admin/index.php 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1,48 @@ +<?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) + * **************************************************************************** + * GAPPLY - 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 gapply + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Thu 2012/03/08 9:02:38 : Timgno Exp $ + * **************************************************************************** + */ + +include "admin_header.php"; +xoops_cp_header(); + + $indexAdmin = new ModuleAdmin(); + + echo $indexAdmin->addNavigation("index.php") ; + echo $indexAdmin->renderIndex(); + +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/gapply/releases/1.0/gapply/admin/menu.php =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/admin/menu.php (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/admin/menu.php 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1,60 @@ +<?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) + * **************************************************************************** + * GAPPLY - 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 gapply + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Thu 2012/03/08 9:02:38 : 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_GAPPLY_ADMENU1; +$adminmenu[$i]["link"] = "admin/index.php"; +//$adminmenu[$i]["desc"] = _MI_GAPPLY_ADMENU1_DESC; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/home.png"; +$i++; +$adminmenu[$i]["title"] = _MI_GAPPLY_ADMENU2; +$adminmenu[$i]["link"] = "admin/about.php"; +//$adminmenu[$i]["desc"] = _MI_GAPPLY_ADMENU2_DESC; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/about.png"; +unset( $i ); +?> \ No newline at end of file Added: XoopsModules/gapply/releases/1.0/gapply/blocks/index.html =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/blocks/index.html (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/blocks/index.html 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/gapply/releases/1.0/gapply/class/index.html =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/class/index.html (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/class/index.html 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/gapply/releases/1.0/gapply/colorif.php =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/colorif.php (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/colorif.php 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1,70 @@ +<?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) + * **************************************************************************** + * GAPPLY - 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 gapply + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Thu 2012/03/08 9:02:38 : Timgno Exp $ + * **************************************************************************** + */ +include "header.php"; +global $xoopsTpl; +$xoopsOption["template_main"] = "gapply_colorif.html"; +include_once XOOPS_ROOT_PATH."/header.php"; +// Include Styles +$xoTheme->addStylesheet($style); +// Include Scripts +$xoTheme->addScript($jq); +// Menu Toolbar +$toolbar['toolbar'] = gapply_toolbar(); +$xoopsTpl->assign('toolbar', $toolbar); +//keywords +$keywords = $xoopsModuleConfig['keywords']; +$xoTheme->addMeta("meta", "keywords", $keywords); +//description +$xoTheme->addMeta("meta", "description", _MD_GAPPLY_COLORIF_DESC); + +$xoopsTpl->assign('lang_title', _MD_GAPPLY_COLORIF_TITLE); +$xoopsTpl->assign('lang_desc', _MD_GAPPLY_COLORIF_DESC); +$xoopsTpl->assign('adv', $xoopsModuleConfig['advertise']); +$key = $xoopsModuleConfig['apikey']; + +$xoTheme->addScript('http://www.google.com/jsapi?key='.$key); +$xoTheme->addScript('modules/gapply/js/gcolorif.js'); +$xoTheme->addStylesheet('modules/gapply/css/gcolorif.css'); + +$xoopsTpl->assign("mod_url", $mod_url); +$xoopsTpl->assign("mod_img", $mod_img); +$xoopsTpl->assign("mod_name", $mod_name); +$xoopsTpl->assign("admin", $mod_admin); +$xoopsTpl->assign("copyright", $mod_copyright); +include_once XOOPS_ROOT_PATH."/footer.php"; +?> \ No newline at end of file Added: XoopsModules/gapply/releases/1.0/gapply/css/gcolorif.css =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/css/gcolorif.css (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/css/gcolorif.css 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1,24 @@ +table, p{ + background: #FFFFFF; + font: 12px Verdana, sans-serif; +} + +.gsc-trailing-more-results { + display: none; +} + +.gsc-resultsHeader { + display: none; +} + +.gsc-results { + padding-left: 20px; +} + +.gsc-control { + width: 650px; +} + +.gsc-tabsArea { + margin-bottom: 5px; +} \ No newline at end of file Added: XoopsModules/gapply/releases/1.0/gapply/css/index.html =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/css/index.html (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/css/index.html 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/gapply/releases/1.0/gapply/css/style.css =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/css/style.css (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/css/style.css 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1,37 @@ +@charset "UTF-8"; +/** + * **************************************************************************** + * - 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) + * **************************************************************************** + * CODELINK - 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 codelink + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.36 Mon 2012/01/09 14:23:56 : Timgno Exp $ + * **************************************************************************** + */ + Added: XoopsModules/gapply/releases/1.0/gapply/docs/changelog.txt =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/docs/changelog.txt (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/docs/changelog.txt 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1,5 @@ + +==================================== + 2012/03/08 9:02:38 Version 1.01 +==================================== + - Original release gapply (TXMod Xoops) Added: XoopsModules/gapply/releases/1.0/gapply/docs/credits.txt =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/docs/credits.txt (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/docs/credits.txt 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1,4 @@ +Read Me First +============= + +Please make sure that you download the XOOPS Icon Set, and upload it to uploads/images directory \ No newline at end of file Added: XoopsModules/gapply/releases/1.0/gapply/docs/index.html =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/docs/index.html (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/docs/index.html 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/gapply/releases/1.0/gapply/docs/install.txt =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/docs/install.txt (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/docs/install.txt 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1,4 @@ +Read Me First +============= + +Please make sure that you download the XOOPS Icon Set, and upload it to uploads/images directory \ No newline at end of file Added: XoopsModules/gapply/releases/1.0/gapply/docs/lang_diff.txt =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/docs/lang_diff.txt (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/docs/lang_diff.txt 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1,4 @@ +Read Me First +============= + +Please make sure that you download the XOOPS Icon Set, and upload it to uploads/images directory \ No newline at end of file Added: XoopsModules/gapply/releases/1.0/gapply/docs/licence.txt =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/docs/licence.txt (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/docs/licence.txt 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. Added: XoopsModules/gapply/releases/1.0/gapply/docs/readme.txt =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/docs/readme.txt (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/docs/readme.txt 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1,4 @@ +Read Me First +============= + +Please make sure that you download the XOOPS Icon Set, and upload it to uploads/images directory \ No newline at end of file Added: XoopsModules/gapply/releases/1.0/gapply/docsearch.php =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/docsearch.php (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/docsearch.php 2012-03-14 18:40:46 UTC (rev 9130) @@ -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) + * **************************************************************************** + * GAPPLY - 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 gapply + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Thu 2012/03/08 9:02:38 : Timgno Exp $ + * **************************************************************************** + */ +include "header.php"; +global $xoopsTpl; +$xoopsOption["template_main"] = "gapply_docsearch.html"; +include_once XOOPS_ROOT_PATH."/header.php"; +// Include Styles +$xoTheme->addStylesheet($style); +// Include Scripts +$xoTheme->addScript($jq); +// Menu Toolbar +$toolbar['toolbar'] = gapply_toolbar(); +$xoopsTpl->assign('toolbar', $toolbar); +// +$default = $xoopsModuleConfig['default']; +//keywords +$keywords = $xoopsModuleConfig['keywords']; +$keywords .= substr($keywords, 0); +$xoTheme->addMeta('meta', 'keywords', $keywords); +//description +$xoTheme->addMeta('meta', 'description', _MD_GAPPLY_DOCSEARCH_DESC); + +$xoopsTpl->assign('lang_title', _MD_GAPPLY_DOCSEARCH_TITLE); +$xoopsTpl->assign('lang_desc', _MD_GAPPLY_DOCSEARCH_DESC); + +$gkey = $xoopsModuleConfig['apikey']; +$xoTheme->addScript('http://www.google.com/jsapi?key='.$gkey); +$xoTheme->addScript('', '', '//<![CDATA[ + google.load(\'search\', \'1\'); + + function OnLoad() { + + // create a search control + var searchControl = new google.search.SearchControl(); + + // web search, open, alternate root + var options = new google.search.SearcherOptions(); + options.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN); + options.setRoot(document.getElementById("somewhere_else")); + searchControl.addSearcher(new google.search.BookSearch(), options); + searchControl.addSearcher(new google.search.ImageSearch(), options); + + searchControl.addSearcher(new google.search.LocalSearch()); + searchControl.addSearcher(new google.search.BlogSearch()); + searchControl.addSearcher(new google.search.VideoSearch()); + searchControl.addSearcher(new google.search.PatentSearch()); + + // tell the searcher to draw itself and tell it where to attach + searchControl.draw(document.getElementById("search_control")); + + // execute an inital search + searchControl.execute("'.$default.'"); + } + google.setOnLoadCallback(OnLoad); + //]]> +'); +//advertise +$xoopsTpl->assign('adv', $xoopsModuleConfig['advertise']); +$xoopsTpl->assign('copyright', $mod_copyright); +$xoopsTpl->assign('admin', $mod_admin); + +include_once XOOPS_ROOT_PATH."/footer.php"; +?> \ No newline at end of file Added: XoopsModules/gapply/releases/1.0/gapply/earth.php =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/earth.php (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/earth.php 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1,70 @@ +<?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) + * **************************************************************************** + * GAPPLY - 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 gapply + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Thu 2012/03/08 9:02:38 : Timgno Exp $ + * **************************************************************************** + */ +include("header.php"); +$xoopsOption['template_main'] = "gapply_earth.html"; +include(XOOPS_ROOT_PATH."/header.php"); +// Include Styles +$xoTheme->addStylesheet($style); +// Include Scripts +$xoTheme->addScript($jq); +// Menu Toolbar +$toolbar['toolbar'] = gapply_toolbar(); +$xoopsTpl->assign('toolbar', $toolbar); +//keywords - description +$xoTheme->addMeta('meta', 'keywords', $xoopsModuleConfig['keywords']); +$xoTheme->addMeta('meta', 'description', _MI_GAPPLY_EARTH_DESC); + +$xoopsTpl->assign('lang_title', _MD_GAPPLY_EARTH_TITLE); +$xoopsTpl->assign('lang_desc', _MD_GAPPLY_EARTH_DESC); +// Width - Height Earth +$width = (isset($_GET['width'])) ? intval($_GET['width']) : $xoopsModuleConfig['width']; +$height = (isset($_GET['height'])) ? intval($_GET['height']) : $xoopsModuleConfig['height']; +// Google API Resource +$xoTheme->addScript('http://www.google.com/jsapi?key='.$xoopsModuleConfig['apikey']); +$script = XOOPS_URL.'/modules/gapply/js/gearth.js'; +$xoTheme->addScript($script); + +$xoopsTpl->assign('width', $width); +$xoopsTpl->assign('height', $height); +$xoopsTpl->assign('adv', $xoopsModuleConfig['advertise']); +// Config Main +$xoopsTpl->assign('mod_img', $mod_img); +$xoopsTpl->assign('admin', $mod_admin); +$xoopsTpl->assign('copyright', $mod_copyright); +include_once XOOPS_ROOT_PATH."/footer.php"; +?> \ No newline at end of file Added: XoopsModules/gapply/releases/1.0/gapply/header.php =================================================================== --- XoopsModules/gapply/releases/1.0/gapply/header.php (rev 0) +++ XoopsModules/gapply/releases/1.0/gapply/header.php 2012-03-14 18:40:46 UTC (rev 9130) @@ -0,0 +1,47 @@ +<?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) + * **************************************************************************** + * GAPPLY - 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 gapply + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Thu 2012/03/08 9:02:38 : Timgno Exp $ + * **************************************************************************** + */ + +include "../../mainfile.php"; +global $xoopsConfig, $xoopsModule; +include XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar('dirname')."/include/configs.php"; +include XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar('dirname')."/include/functions.php"; +$myts =& MyTextSanitizer::getInstance(); +$jq = "modules/".$xoopsModule->getVar('dirname')."/js/jq.init.js"; +$style = "modules/".$xoopsModule->getVar('dirname')."/css/style.css"; +if(file_exists($style)); {return true;} +?> \ No newline at end of file Added: XoopsModules/gapply/releases/1.0/gapply/images/gapply_slogo.png =================================================================== (Binary files differ) Property changes on: XoopsModules/gapply/releases/1.0/gapply/images/gapply_slogo.png ___________________________________________________________________ Added: svn:m... [truncated message content] |
From: <txm...@us...> - 2012-03-14 18:44:37
|
Revision: 9131 http://xoops.svn.sourceforge.net/xoops/?rev=9131&view=rev Author: txmodxoops Date: 2012-03-14 18:44:26 +0000 (Wed, 14 Mar 2012) Log Message: ----------- Added alpha release v1.01 Module for creation pdf Document Added Paths: ----------- XoopsModules/xpdf/ XoopsModules/xpdf/branches/ XoopsModules/xpdf/releases/ XoopsModules/xpdf/releases/1.0/ XoopsModules/xpdf/releases/1.0/xpdf/ XoopsModules/xpdf/releases/1.0/xpdf/admin/ XoopsModules/xpdf/releases/1.0/xpdf/admin/about.php XoopsModules/xpdf/releases/1.0/xpdf/admin/admin_footer.php XoopsModules/xpdf/releases/1.0/xpdf/admin/admin_header.php XoopsModules/xpdf/releases/1.0/xpdf/admin/categories.php XoopsModules/xpdf/releases/1.0/xpdf/admin/documents.php XoopsModules/xpdf/releases/1.0/xpdf/admin/index.html XoopsModules/xpdf/releases/1.0/xpdf/admin/index.php XoopsModules/xpdf/releases/1.0/xpdf/admin/menu.php XoopsModules/xpdf/releases/1.0/xpdf/admin/permissions.php XoopsModules/xpdf/releases/1.0/xpdf/blocks/ XoopsModules/xpdf/releases/1.0/xpdf/blocks/blocks_doc.php XoopsModules/xpdf/releases/1.0/xpdf/blocks/index.html XoopsModules/xpdf/releases/1.0/xpdf/class/ XoopsModules/xpdf/releases/1.0/xpdf/class/index.html XoopsModules/xpdf/releases/1.0/xpdf/class/xpdf_cat.php XoopsModules/xpdf/releases/1.0/xpdf/class/xpdf_doc.php XoopsModules/xpdf/releases/1.0/xpdf/css/ XoopsModules/xpdf/releases/1.0/xpdf/css/index.html XoopsModules/xpdf/releases/1.0/xpdf/css/style.css XoopsModules/xpdf/releases/1.0/xpdf/docs/ XoopsModules/xpdf/releases/1.0/xpdf/docs/changelog.txt XoopsModules/xpdf/releases/1.0/xpdf/docs/credits.txt XoopsModules/xpdf/releases/1.0/xpdf/docs/index.html XoopsModules/xpdf/releases/1.0/xpdf/docs/install.txt XoopsModules/xpdf/releases/1.0/xpdf/docs/lang_diff.txt XoopsModules/xpdf/releases/1.0/xpdf/docs/licence.txt XoopsModules/xpdf/releases/1.0/xpdf/docs/readme.txt XoopsModules/xpdf/releases/1.0/xpdf/fpdf/ XoopsModules/xpdf/releases/1.0/xpdf/fpdf/chinese.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/ex.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/ XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/courier.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/helvetica.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/helveticab.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/helveticabi.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/helveticai.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/index.html XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/ XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/cp1250.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/cp1251.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/cp1252.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/cp1253.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/cp1254.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/cp1255.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/cp1257.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/cp1258.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/cp874.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/index.html XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/iso-8859-1.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/iso-8859-11.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/iso-8859-15.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/iso-8859-16.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/iso-8859-2.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/iso-8859-4.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/iso-8859-5.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/iso-8859-7.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/iso-8859-9.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/koi8-r.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/koi8-u.map XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/makefont/makefont.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/symbol.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/times.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/timesb.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/timesbi.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/timesi.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/font/zapfdingbats.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/fpdf.inc.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/fpdf.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/gif.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/index.html XoopsModules/xpdf/releases/1.0/xpdf/fpdf/japanese.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/korean.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/language/ XoopsModules/xpdf/releases/1.0/xpdf/fpdf/language/english.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/language/french.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/language/index.html XoopsModules/xpdf/releases/1.0/xpdf/fpdf/language/italian.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/language/japanese.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/language/korean.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/language/schinese.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/language/tchinese.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/makepdf_class.php XoopsModules/xpdf/releases/1.0/xpdf/fpdf/makepdf_config.php XoopsModules/xpdf/releases/1.0/xpdf/header.php XoopsModules/xpdf/releases/1.0/xpdf/images/ XoopsModules/xpdf/releases/1.0/xpdf/images/icons/ XoopsModules/xpdf/releases/1.0/xpdf/images/icons/index.html XoopsModules/xpdf/releases/1.0/xpdf/images/icons/off.png XoopsModules/xpdf/releases/1.0/xpdf/images/icons/on.png XoopsModules/xpdf/releases/1.0/xpdf/images/index.html XoopsModules/xpdf/releases/1.0/xpdf/images/menu/ XoopsModules/xpdf/releases/1.0/xpdf/images/menu/bg.png XoopsModules/xpdf/releases/1.0/xpdf/images/menu/index.html XoopsModules/xpdf/releases/1.0/xpdf/images/menu/left_both.png XoopsModules/xpdf/releases/1.0/xpdf/images/menu/right_both.png XoopsModules/xpdf/releases/1.0/xpdf/images/xpdf_slogo.png XoopsModules/xpdf/releases/1.0/xpdf/include/ XoopsModules/xpdf/releases/1.0/xpdf/include/configs.php XoopsModules/xpdf/releases/1.0/xpdf/include/functions.php XoopsModules/xpdf/releases/1.0/xpdf/include/index.html XoopsModules/xpdf/releases/1.0/xpdf/include/install.php XoopsModules/xpdf/releases/1.0/xpdf/include/makeimg.php XoopsModules/xpdf/releases/1.0/xpdf/include/makepdf.php XoopsModules/xpdf/releases/1.0/xpdf/include/notification.inc.php XoopsModules/xpdf/releases/1.0/xpdf/include/search.inc.php XoopsModules/xpdf/releases/1.0/xpdf/index.php XoopsModules/xpdf/releases/1.0/xpdf/language/ XoopsModules/xpdf/releases/1.0/xpdf/language/english/ XoopsModules/xpdf/releases/1.0/xpdf/language/english/admin.php XoopsModules/xpdf/releases/1.0/xpdf/language/english/blocks.php XoopsModules/xpdf/releases/1.0/xpdf/language/english/help/ XoopsModules/xpdf/releases/1.0/xpdf/language/english/help/help.html XoopsModules/xpdf/releases/1.0/xpdf/language/english/help/index.html XoopsModules/xpdf/releases/1.0/xpdf/language/english/index.html XoopsModules/xpdf/releases/1.0/xpdf/language/english/main.php XoopsModules/xpdf/releases/1.0/xpdf/language/english/modinfo.php XoopsModules/xpdf/releases/1.0/xpdf/language/index.html XoopsModules/xpdf/releases/1.0/xpdf/language/italian/ XoopsModules/xpdf/releases/1.0/xpdf/language/italian/admin.php XoopsModules/xpdf/releases/1.0/xpdf/language/italian/blocks.php XoopsModules/xpdf/releases/1.0/xpdf/language/italian/help/ XoopsModules/xpdf/releases/1.0/xpdf/language/italian/help/help.html XoopsModules/xpdf/releases/1.0/xpdf/language/italian/help/index.html XoopsModules/xpdf/releases/1.0/xpdf/language/italian/index.html XoopsModules/xpdf/releases/1.0/xpdf/language/italian/main.php XoopsModules/xpdf/releases/1.0/xpdf/language/italian/modinfo.php XoopsModules/xpdf/releases/1.0/xpdf/list.tag.php XoopsModules/xpdf/releases/1.0/xpdf/makepdf.php XoopsModules/xpdf/releases/1.0/xpdf/print.php XoopsModules/xpdf/releases/1.0/xpdf/rss.php XoopsModules/xpdf/releases/1.0/xpdf/singledoc.php XoopsModules/xpdf/releases/1.0/xpdf/sql/ XoopsModules/xpdf/releases/1.0/xpdf/sql/index.html XoopsModules/xpdf/releases/1.0/xpdf/sql/mysql.sql XoopsModules/xpdf/releases/1.0/xpdf/submit.php XoopsModules/xpdf/releases/1.0/xpdf/templates/ XoopsModules/xpdf/releases/1.0/xpdf/templates/admin/ XoopsModules/xpdf/releases/1.0/xpdf/templates/admin/index.html XoopsModules/xpdf/releases/1.0/xpdf/templates/admin/xpdf_admin_about.html XoopsModules/xpdf/releases/1.0/xpdf/templates/admin/xpdf_admin_help.html XoopsModules/xpdf/releases/1.0/xpdf/templates/blocks/ XoopsModules/xpdf/releases/1.0/xpdf/templates/blocks/index.html XoopsModules/xpdf/releases/1.0/xpdf/templates/blocks/xpdf_doc_block_day.html XoopsModules/xpdf/releases/1.0/xpdf/templates/blocks/xpdf_doc_block_random.html XoopsModules/xpdf/releases/1.0/xpdf/templates/blocks/xpdf_doc_block_recent.html XoopsModules/xpdf/releases/1.0/xpdf/templates/index.html XoopsModules/xpdf/releases/1.0/xpdf/templates/xpdf_footer.html XoopsModules/xpdf/releases/1.0/xpdf/templates/xpdf_header.html XoopsModules/xpdf/releases/1.0/xpdf/templates/xpdf_index.html XoopsModules/xpdf/releases/1.0/xpdf/templates/xpdf_singledoc.html XoopsModules/xpdf/releases/1.0/xpdf/templates/xpdf_submit.html XoopsModules/xpdf/releases/1.0/xpdf/templates/xpdf_viewcat.html XoopsModules/xpdf/releases/1.0/xpdf/view.tag.php XoopsModules/xpdf/releases/1.0/xpdf/viewcat.php XoopsModules/xpdf/releases/1.0/xpdf/xoops_version.php XoopsModules/xpdf/trunk/ XoopsModules/xpdf/trunk/xpdf/ Added: XoopsModules/xpdf/releases/1.0/xpdf/admin/about.php =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/admin/about.php (rev 0) +++ XoopsModules/xpdf/releases/1.0/xpdf/admin/about.php 2012-03-14 18:44:26 UTC (rev 9131) @@ -0,0 +1,48 @@ +<?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) + * **************************************************************************** + * XPDF - 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 xpdf + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sun 2012/02/05 1:04:25 : Timgno Exp $ + * **************************************************************************** + */ + + +include "admin_header.php"; +xoops_cp_header(); + +$aboutAdmin = new ModuleAdmin(); + +echo $aboutAdmin->addNavigation("about.php"); +echo $aboutAdmin->renderabout($GLOBALS['xoopsModuleConfig']['id_paypal'], false); + +include "admin_footer.php"; \ No newline at end of file Added: XoopsModules/xpdf/releases/1.0/xpdf/admin/admin_footer.php =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/admin/admin_footer.php (rev 0) +++ XoopsModules/xpdf/releases/1.0/xpdf/admin/admin_footer.php 2012-03-14 18:44:26 UTC (rev 9131) @@ -0,0 +1,45 @@ +<?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) + * **************************************************************************** + * XPDF - 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 xpdf + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sun 2012/02/05 1:04:25 : 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_XPDF_MAINTAINEDBY." + <a href='http://www.txmodxoops.org/modules/newbb/' title='Visit TXMod Xoops Community' class='tooltip' rel='external'>TXMod Xoops Community</a></div>"; +xoops_cp_footer(); Added: XoopsModules/xpdf/releases/1.0/xpdf/admin/admin_header.php =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/admin/admin_header.php (rev 0) +++ XoopsModules/xpdf/releases/1.0/xpdf/admin/admin_header.php 2012-03-14 18:44:26 UTC (rev 9131) @@ -0,0 +1,96 @@ +<?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) + * **************************************************************************** + * XPDF - 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 xpdf + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sun 2012/02/05 1:04:25 : 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_ERROR_NOFRAMEWORKS); + xoops_cp_footer(); + //return false; + } +$dirname = basename(dirname(dirname( __FILE__ ) )); +$module_handler =& xoops_gethandler('module'); +$xoopsModule = & $module_handler->getByDirname($dirname); +$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); +$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); +$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); + +$catHandler=& xoops_getModuleHandler('xpdf_cat', $dirname); +$docHandler=& xoops_getModuleHandler('xpdf_doc', $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); +//xoops_cp_header(); + +//Load languages +xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); Added: XoopsModules/xpdf/releases/1.0/xpdf/admin/categories.php =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/admin/categories.php (rev 0) +++ XoopsModules/xpdf/releases/1.0/xpdf/admin/categories.php 2012-03-14 18:44:26 UTC (rev 9131) @@ -0,0 +1,186 @@ +<?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) + * **************************************************************************** + * XPDF - 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 xpdf + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sun 2012/02/05 1:04:25 : Timgno Exp $ + * **************************************************************************** + */ +include "admin_header.php"; +xoops_cp_header(); +global $pathImageIcon; + +// CleanVars +$op = xpdf_CleanVars($_REQUEST, 'op', 'list_cat', 'string'); +$status_menu = xpdf_CleanVars($_REQUEST, 'status_display', 1, 'int'); + +$catAdmin = new ModuleAdmin(); +switch ($op) +{ + case "list_cat": + default: + echo $catAdmin->addNavigation('categories.php'); + if ($status_menu == 1){ + $catAdmin->addItemButton(_AM_XPDF_NEWCAT, 'categories.php?op=new_cat', 'add'); + }else{ + $catAdmin->addItemButton(_AM_XPDF_CATLIST, 'categories.php?op=list_cat', 'list'); + $catAdmin->addItemButton(_AM_XPDF_NEWCAT, 'categories.php?op=new_cat', 'add'); + } + echo $catAdmin->renderButton(); + $criteria = new CriteriaCompo(); + $criteria->setSort("cat_id"); + $criteria->setOrder("ASC"); + $numrows = $catHandler->getCount(); + $cat_arr = $catHandler->getall($criteria); + + //Affichage du tableau + if ($numrows>0) + { + echo "<table width='100%' cellspacing='1' class='outer'> + <tr> + <th class='center'>"._ID."</th> + <th class='center'>"._TITLE."</th> + <th class='center'>"._IMAGE."</th> + <th class='center'>"._DESCRIPTION."</th> + <th class='center'>"._WEIGHT."</th> + <th class='center'>"._FORMACTION."</th> + </tr>"; + + $class = "odd"; + + foreach (array_keys($cat_arr) as $i) + { + echo "<tr class='".$class."'>"; + $class = ($class == "even") ? "odd" : "even"; + + $cat =& $catHandler->get($cat_arr[$i]->getVar("cat_pid")); + $cat_cat = $cat->getVar("cat_pid"); + echo "<td class='center'>".$cat_arr[$i]->getVar("cat_id")."</td>"; + echo "<td class='center'>".$cat_arr[$i]->getVar("cat_title")."</td>"; + echo "<td class='center'><img src='".XOOPS_UPLOAD_URL."/xpdf/images/cat/".$cat_arr[$i]->getVar("cat_imgurl")."' height='10px' title='cat_imgurl' alt='cat_imgurl'></td>"; + echo "<td class='center'>".$cat_arr[$i]->getVar("cat_description")."</td>"; + echo "<td class='center'>".$cat_arr[$i]->getVar("cat_weight")."</td>"; + + echo "<td align='center' width='10%'> + <a href='categories.php?op=edit_cat&cat_id=".$cat_arr[$i]->getVar("cat_id")."'><img src=".$pathImageIcon."/edit.png alt='"._EDIT."' title='"._EDIT."'></a> + <a href='categories.php?op=delete_cat&cat_id=".$cat_arr[$i]->getVar("cat_id")."'><img src=".$pathImageIcon."/delete.png alt='"._DELETE."' title='"._DELETE."'></a> + </td>"; + echo "</tr>"; + } + echo "</table><br><br>"; + } + break; + + case "new_cat": + echo $catAdmin->addNavigation("categories.php"); + $catAdmin->addItemButton(_AM_XPDF_CATLIST, 'categories.php?op=list_cat', 'list'); + echo $catAdmin->renderButton(); + + $obj =& $catHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case "save_cat": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("categories.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["cat_id"])) { + $obj =& $catHandler->get($_REQUEST["cat_id"]); + } 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 = XOOPS_UPLOAD_PATH."/xpdf/images/cat/"; + $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS["xoopsModuleConfig"]["cat_imgurl_mimetypes"], + $GLOBALS["xoopsModuleConfig"]["cat_imgurl_size"], null, null); + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + $uploader->setPrefix("cat_imgurl_") ; + $uploader->fetchMedia($_POST['xoops_upload_file'][0]); + if (!$uploader->upload()) { + $errors = $uploader->getErrors(); + redirect_header("javascript:history.go(-1)",3, $errors); + } else { + $obj->setVar("cat_imgurl", $uploader->getSavedFileName()); + } + } else { + $obj->setVar("cat_imgurl", $_REQUEST["cat_imgurl"]); + } + //Form cat_description + $obj->setVar("cat_description", $_REQUEST["cat_description"]); + //Form cat_weight + $obj->setVar("cat_weight", $_REQUEST["cat_weight"]); + + + if ($catHandler->insert($obj)) { + redirect_header("categories.php?op=list_cat", 2, _AM_XPDF_FORMOK); + } + + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + $form->display(); + break; + + case "edit_cat": + echo $catAdmin->addNavigation("categories.php"); + $catAdmin->addItemButton(_AM_XPDF_NEWCAT, 'categories.php?op=new_cat', 'add'); + $catAdmin->addItemButton(_AM_XPDF_CATLIST, 'categories.php?op=list_cat', 'list'); + echo $catAdmin->renderButton(); + $obj = $catHandler->get($_REQUEST["cat_id"]); + $form = $obj->getForm(); + $form->display(); + break; + + case "delete_cat": + $obj =& $catHandler->get($_REQUEST["cat_id"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("categories.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($catHandler->delete($obj)) { + redirect_header("categories.php", 3, _AM_XPDF_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array("ok" => 1, "cat_id" => $_REQUEST["cat_id"], "op" => "delete_cat"), $_SERVER["REQUEST_URI"], sprintf(_AM_XPDF_FORMSUREDEL, $obj->getVar("cat"))); + } + break; +} +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/xpdf/releases/1.0/xpdf/admin/documents.php =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/admin/documents.php (rev 0) +++ XoopsModules/xpdf/releases/1.0/xpdf/admin/documents.php 2012-03-14 18:44:26 UTC (rev 9131) @@ -0,0 +1,318 @@ +<?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) + * **************************************************************************** + * XPDF - 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 xpdf + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sun 2012/02/05 1:04:25 : Timgno Exp $ + * **************************************************************************** + */ +include "admin_header.php"; +xoops_cp_header(); +global $pathImageIcon; + +//On recupere la valeur de l argument op dans l URL$ +$op = xpdf_CleanVars($_REQUEST, 'op', 'list_doc', 'string'); +$status_menu = xpdf_CleanVars($_REQUEST, 'status_display', 1, 'int'); + +$docAdmin = new ModuleAdmin(); +switch ($op) +{ + case "list_doc": + default: + echo $docAdmin->addNavigation('documents.php'); + if ($status_menu == 1){ + $docAdmin->addItemButton(_AM_XPDF_NEWDOC, 'documents.php?op=new_doc', 'add'); + }else{ + $docAdmin->addItemButton(_AM_XPDF_DOCLIST, 'documents.php?op=list_doc', 'list'); + $docAdmin->addItemButton(_AM_XPDF_NEWDOC, 'documents.php?op=new_doc', 'add'); + } + echo $docAdmin->renderButton(); + $criteria = new CriteriaCompo(); + $criteria->setSort("doc_id"); + $criteria->setOrder("ASC"); + $numrows = $docHandler->getCount(); + $doc_arr = $docHandler->getall($criteria); + + //Affichage du tableau + if ($numrows>0) + { + echo "<table cellspacing='1' class='outer width100'> + <tr> + <th class='center'>"._ID."</th> + <th class='center'>"._CATEGORY."</th> + <th class='center'>"._TITLE."</th> + <th class='center'>"._SUBJECT."</th> + <th class='center'>"._SUBMITTER."</th> + <th class='center'>"._CREATED."</th> + <th class='center'>"._PUBLISHED."</th> + <th class='center'>"._WEIGHT."</th> + <th class='center'>"._STATUS."</th> + <th class='center'>"._WAITING."</th> + <th class='center'>"._ONLINE."</th> + <th class='center'>"._FORMACTION."</th> + </tr>"; + + $class = "odd"; + + foreach (array_keys($doc_arr) as $i) + { + echo "<tr class='".$class."'>"; + $class = ($class == "even") ? "odd" : "even"; + + echo "<td class='center'>".$doc_arr[$i]->getVar("doc_id")."</td>"; + $cat =& $catHandler->get($doc_arr[$i]->getVar("doc_cid")); + $doc_cat = $cat->getVar("cat_id"); + echo "<td class='center'>".$doc_cat."</td>"; + echo "<td class='center'>".$doc_arr[$i]->getVar("doc_title")."</td>"; + echo "<td class='center'>".$doc_arr[$i]->getVar("doc_subject")."</td>"; + echo "<td class='center'>".XoopsUser::getUnameFromId($doc_arr[$i]->getVar("doc_submitter"),"S")."</td>"; + echo "<td class='center'>".formatTimeStamp($doc_arr[$i]->getVar("doc_created"),"S")."</td>"; + echo "<td class='center'>".formatTimeStamp($doc_arr[$i]->getVar("doc_published"),"S")."</td>"; + echo "<td class='center'>".$doc_arr[$i]->getVar("doc_weight")."</td>"; + + if ( $doc_arr[$i]->getVar("doc_status") == 1 ) { + echo "<td class='center'><a href='./documents.php?op=delete_pdf_file&doc_id='".$doc_arr[$i]->getVar("doc_id")."&doc_status=0' title='"._AM_XPDF_DELETEPDF."'><img src=".$pathImageIcon."/green_ball.png border='0' alt='"._AM_XPDF_DELETEPDF."' /></a></td>"; + } else { + echo "<td class='center'><a href='./documents.php?op=create_pdf_file&doc_id='".$doc_arr[$i]->getVar("doc_id")."&doc_status=1' title='"._AM_XPDF_CREATEPDF."'><img src=".$pathImageIcon."/red_ball.png border='0' alt='"._AM_XPDF_CREATEPDF."' /></a></td>"; + } + + if ( $doc_arr[$i]->getVar("doc_waiting") == 1 ) { + echo "<td class='center'><a href='./documents.php?op=approve_doc&doc_id='".$doc_arr[$i]->getVar("doc_id")."&doc_waiting=0' title='"._AM_XPDF_CREATEPDF."'><img src=".$pathImageIcon."/orange_ball.png border='0' alt='' /></a></td>"; + } else { + echo "<td class='center'><img src=".$pathImageIcon."/grey_ball.png border='0' alt='' /></td>"; + } + + if ( $doc_arr[$i]->getVar("doc_online") == 1 ) { + echo "<td class='center'><a href='./documents.php?op=update_online_doc&doc_id=".$doc_arr[$i]->getVar("doc_id")."&doc_online=0'><img src=".$pathImageIcon."/on.png border='0' alt='"._ONLINE."' title='"._ONLINE."'></a></td>"; + } else { + echo "<td class='center'><a href='./documents.php?op=update_online_doc&doc_id=".$doc_arr[$i]->getVar("doc_id")."&doc_online=1'><img src=".$pathImageIcon."/off.png border='0' alt='"._OFFLINE."' title='"._OFFLINE."'></a></td>"; + } + + echo "<td class='center width10'> + <a href='documents.php?op=edit_doc&doc_id=".$doc_arr[$i]->getVar("doc_id")."'><img src=".$pathImageIcon."/edit.png alt='"._EDIT."' title='"._EDIT."'></a> + <a href='documents.php?op=delete_doc&doc_id=".$doc_arr[$i]->getVar("doc_id")."'><img src=".$pathImageIcon."/delete.png alt='"._DELETE."' title='"._DELETE."'></a> + </td>"; + echo "</tr>"; + } + echo "</table><br><br>"; + } + break; + + case "new_doc": + echo $docAdmin->addNavigation("documents.php"); + $docAdmin->addItemButton(_AM_XPDF_DOCLIST, 'documents.php?op=list_doc', 'list'); + echo $docAdmin->renderButton(); + + $obj =& $docHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case "save_doc": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("documents.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + $doc_id = xpdf_CleanVars($_REQUEST, 'doc_id', 1, 'int'); + if (isset($_REQUEST["doc_id"])) { + $obj =& $docHandler->get($doc_id); + } else { + $obj =& $docHandler->create(); + } + + //Form doc_cid + $obj->setVar("doc_cid", $_REQUEST["doc_cid"]); + //Form doc_title + $obj->setVar("doc_title", $_REQUEST["doc_title"]); + //Form doc_description + $obj->setVar("doc_description", $_REQUEST["doc_description"]); + //Form doc_subject + $obj->setVar("doc_subject", $_REQUEST["doc_subject"]); + //Form doc_description + $obj->setVar("doc_keywords", $_REQUEST["doc_keywords"]); + //Form doc_submitter + $obj->setVar("doc_submitter", $_REQUEST["doc_submitter"]); + //Form doc_created + $obj->setVar("doc_created", strtotime($_REQUEST["doc_created"])); + //Form doc_created + $obj->setVar("doc_published", strtotime($_REQUEST["doc_published"])); + //Form doc_weight + $obj->setVar("doc_weight", $_REQUEST["doc_weight"]); + //Form doc_status + $verif_doc_status = ($_REQUEST["doc_status"] == 1) ? "1" : "0"; + $obj->setVar("doc_status", $verif_doc_status); + //Form doc_waiting + $verif_doc_waiting = ($_REQUEST["doc_waiting"] == 1) ? "1" : "0"; + $obj->setVar("doc_waiting", $verif_doc_waiting); + //Form doc_online + $verif_doc_online = ($_REQUEST["doc_online"] == 1) ? "1" : "0"; + $obj->setVar("doc_online", $verif_doc_online); + + if ($docHandler->insert($obj)) { + redirect_header("documents.php?op=list_doc", 2, _AM_XPDF_FORMOK); + } + + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + $form->display(); + break; + + case "create_pdf_file": + if (isset($_REQUEST["doc_id"])) { + $obj =& $docHandler->get($_REQUEST["doc_id"]); + } + $obj->setVar("doc_status", $_REQUEST["doc_status"]); + if ($docHandler->insert($obj)) { + redirect_header("documents.php", 3, _AM_XPDF_FILECREATEDOK); + } + echo $obj->getHtmlErrors(); + //include_once XOOPS_URL.'/Frameworks/tcpdf/tcpdf.php'; + require_once XOOPS_ROOT_PATH.'/Frameworks/tcpdf/tcpdf.php'; + $filename = XOOPS_ROOT_PATH.'/Frameworks/tcpdf/config/lang/'._LANGCODE.'.php'; + if(file_exists($filename)) { + include_once $filename; + } else { + include_once XOOPS_ROOT_PATH.'/Frameworks/tcpdf/config/lang/en.php'; + } + // create new PDF document + $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); + // set document information + $pdf->SetCreator(PDF_CREATOR); + $pdf->SetAuthor($obj->getVar("doc_submitter")); + $pdf->SetTitle($obj->getVar("doc_title", 's')); + $pdf->SetSubject($obj->getVar("doc_subject"));//'XPDF Test' + $pdf->SetKeywords($obj->getVar("doc_keywords"));//'XPDF, PDF, example, test, guide' + + // set default header data + $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING); + + //set margins + $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP + 10, PDF_MARGIN_RIGHT); + //set auto page breaks + $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); + $pdf->SetHeaderMargin(PDF_MARGIN_HEADER); + $pdf->SetFooterMargin(PDF_MARGIN_FOOTER); + $pdf->setImageScale(1); //set image scale factor + + $pdf->setLanguageArray($l); //set language items + + //initialize document + $pdf->AliasNbPages(); + + // Add a page + // This method has several options, check the source code documentation for more information. + $pdf->AddPage(); + $description = $obj->getVar("doc_description", 's'); + // Print text using writeHTML() + $pdf->writeHTML($description, true, 0); + + // --------------------------------------------------------- + // Close and output PDF document + // This method has several options, check the source code documentation for more information. + $pdf_file = XOOPS_UPLOAD_PATH."/xpdf/doc/".str_replace(" ", "_", strtolower($obj->getVar("doc_title"))).".pdf"; + $pdf->Output($pdf_file, 'F'); + break; + + case "delete_pdf_file": + /*if (isset($_REQUEST["doc_id"])) { + $obj =& $docHandler->get($_REQUEST["doc_id"]); + } + + if ($docHandler->delete($obj)) { + redirect_header("documents.php", 3, _AM_XPDF_FILEDELETEDOK); + }*/ + + $obj->setVar("doc_status", $_REQUEST["doc_status"]); + $obj =& $docHandler->get($_REQUEST['doc_id']); + if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header('documents.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + } + if ($docHandler->delete($obj)) { + $GLOBALS['xoopsDB']->queryF("DELETE FROM ".$GLOBALS['xoopsDB']->prefix("xpdf_doc")." WHERE doc_id = ".$_REQUEST['doc_id']); + redirect_header('documents.php', 3, _AM_XPDF_FILEDELETEDOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array('ok' => 1, 'doc_id' => $_REQUEST['doc_id'], 'op' => 'delete_doc'), $_SERVER['REQUEST_URI'], sprintf(_AM_XPDF_FORMSUREDEL, $obj->getVar('doc_title'))); + } + break; + + case "edit_doc": + echo $docAdmin->addNavigation("documents.php"); + $docAdmin->addItemButton(_AM_XPDF_NEWDOC, 'documents.php?op=new_doc', 'add'); + $docAdmin->addItemButton(_AM_XPDF_DOCLIST, 'documents.php?op=list_doc', 'list'); + echo $docAdmin->renderButton(); + $obj = $docHandler->get($_REQUEST["doc_id"]); + $form = $obj->getForm(); + $form->display(); + break; + + case "approve_doc": + if (isset($_REQUEST["doc_id"])) { + $obj =& $docHandler->get($_REQUEST["doc_id"]); + } + $obj->setVar("doc_waiting", $_REQUEST["doc_waiting"]); + if ($docHandler->insert($obj)) { + redirect_header("documents.php", 3, _AM_XPDF_FILEAPPROVATEDOK); + } + echo $obj->getHtmlErrors(); + break; + + case "delete_doc": + $obj =& $docHandler->get($_REQUEST["doc_id"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("documents.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($docHandler->delete($obj)) { + redirect_header("documents.php", 3, _AM_XPDF_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array("ok" => 1, "doc_id" => $_REQUEST["doc_id"], "op" => "delete_doc"), $_SERVER["REQUEST_URI"], sprintf(_AM_XPDF_FORMSUREDEL, $obj->getVar("doc_title"))); + } + break; + case "update_online_doc": + if (isset($_REQUEST["doc_id"])) { + $obj =& $docHandler->get($_REQUEST["doc_id"]); + } + $obj->setVar("doc_online", $_REQUEST["doc_online"]); + if ($docHandler->insert($obj)) { + redirect_header("documents.php", 3, _AM_XPDF_FORMOK); + } + echo $obj->getHtmlErrors(); + break; +} +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/xpdf/releases/1.0/xpdf/admin/index.html =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/admin/index.html (rev 0) +++ XoopsModules/xpdf/releases/1.0/xpdf/admin/index.html 2012-03-14 18:44:26 UTC (rev 9131) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xpdf/releases/1.0/xpdf/admin/index.php =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/admin/index.php (rev 0) +++ XoopsModules/xpdf/releases/1.0/xpdf/admin/index.php 2012-03-14 18:44:26 UTC (rev 9131) @@ -0,0 +1,64 @@ +<?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) + * **************************************************************************** + * XPDF - 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 xpdf + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sun 2012/02/05 1:04:25 : Timgno Exp $ + * **************************************************************************** + */ + +include "admin_header.php"; +xoops_cp_header(); + + $indexAdmin = new ModuleAdmin(); + + //count "total cat" + $count_cat = $catHandler->getCount(); + //count "total doc" + $count_doc = $docHandler->getCount(); + //count "online" + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria("doc_online", 1)); + $doc_online = $docHandler->getCount($criteria); + // InfoBox cat + $indexAdmin->addInfoBox(_AM_XPDF_CAT); + $indexAdmin->addInfoBoxLine(_AM_XPDF_CAT,_AM_XPDF_THEREARE_CAT, $count_cat); + // InfoBox doc + $indexAdmin->addInfoBox(_AM_XPDF_DOC); + $indexAdmin->addInfoBoxLine(_AM_XPDF_DOC,_AM_XPDF_THEREARE_DOC, $count_doc); + $indexAdmin->addInfoBoxLine(_AM_XPDF_DOC,_AM_XPDF_THEREARE_DOC_ONLINE, $doc_online); + // Render Index + echo $indexAdmin->addNavigation("index.php"); + echo $indexAdmin->renderIndex(); + +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/xpdf/releases/1.0/xpdf/admin/menu.php =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/admin/menu.php (rev 0) +++ XoopsModules/xpdf/releases/1.0/xpdf/admin/menu.php 2012-03-14 18:44:26 UTC (rev 9131) @@ -0,0 +1,75 @@ +<?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) + * **************************************************************************** + * XPDF - 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 xpdf + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sun 2012/02/05 1:04:25 : 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_XPDF_ADMENU1; +$adminmenu[$i]["link"] = "admin/index.php"; +//$adminmenu[$i]["desc"] = _MI_XPDF_ADMENU1_DESC; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/home.png"; +$i++; +$adminmenu[$i]["title"] = _MI_XPDF_ADMENU2; +$adminmenu[$i]["link"] = "admin/categories.php"; +//$adminmenu[$i]["desc"] = _MI_XPDF_ADMENU2_DESC +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/pdf_category.png"; +$i++; +$adminmenu[$i]["title"] = _MI_XPDF_ADMENU3; +$adminmenu[$i]["link"] = "admin/documents.php"; +//$adminmenu[$i]["desc"] = _MI_XPDF_ADMENU3_DESC +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/pdf_document.png"; +$i++; +$adminmenu[$i]["title"] = _PERMISSIONS; +$adminmenu[$i]["link"] = "admin/permissions.php"; +//$adminmenu[$i]["desc"] = _MI_XPDF_ADMENU4_DESC +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/permissions.png"; +$i++; +$adminmenu[$i]["title"] = _ABOUT; +$adminmenu[$i]["link"] = "admin/about.php"; +//$adminmenu[$i]["desc"] = _MI_XPDF_ADMENU5_DESC; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/about.png"; +unset( $i ); +?> \ No newline at end of file Added: XoopsModules/xpdf/releases/1.0/xpdf/admin/permissions.php =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/admin/permissions.php (rev 0) +++ XoopsModules/xpdf/releases/1.0/xpdf/admin/permissions.php 2012-03-14 18:44:26 UTC (rev 9131) @@ -0,0 +1,106 @@ +<?php +/** + * TDMArticle + * + * 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 Gregory Mage (Aka Mage) + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @author Gregory Mage (Aka Mage) + */ + +include 'admin_header.php'; +include_once XOOPS_ROOT_PATH.'/class/xoopsform/grouppermform.php'; +if( !empty($_POST["submit"]) ) +{ + redirect_header( XOOPS_URL."/modules/".$xoopsModule->dirname()."/admin/permissions.php" , 1 , _MP_GPERMUPDATED ); +} +xoops_cp_header(); + +$permissions_admin = new ModuleAdmin(); +echo $permissions_admin->addNavigation("permissions.php"); + +$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_XPDF_APPROVEFORM."</option> + <option value='2'".$selected[1].">"._AM_XPDF_SUBMITFORM."</option> + <option value='3'".$selected[2].">"._AM_XPDF_VIEWFORM."</option> + <option value='4'".$selected[3].">"._AM_XPDF_DOWNFORM."</option> + <option value='5'".$selected[4].">"._AM_XPDF_ACCESSFORM."</option> + </select> + </td> + </tr> + </table> +</form>"; + +$module_id = $xoopsModule->getVar("mid"); + +switch($permtoset) +{ + case 1: + $titleForm = _AM_XPDF_APPROVEFORM; + $perm_name = "xpdf_approve"; + $perm_desc = _AM_XPDF_APPROVEFORM_DESC; + break; + case 2: + $titleForm = _AM_XPDF_SUBMITFORM; + $perm_name = "xpdf_submit"; + $perm_desc = _AM_XPDF_SUBMITFORM_DESC; + break; + case 3: + $titleForm = _AM_XPDF_VIEWFORM; + $perm_name = "xpdf_view"; + $perm_desc = _AM_XPDF_VIEWFORM_DESC; + break; + case 4: + $titleForm = _AM_XPDF_DOWNFORM; + $perm_name = "xpdf_down"; + $perm_desc = _AM_XPDF_DOWNFORM_DESC; + break; + case 5: + $titleForm = _AM_XPDF_ACCESSFORM; + $perm_name = "xpdf_ac"; + $perm_desc = _AM_XPDF_ACCESSFORM_DESC; + $global_perms_array = array( + '4' => _AM_XPDF_PERMISSIONS_4 , + '8' => _AM_XPDF_PERMISSIONS_8 , + '16' => _AM_XPDF_PERMISSIONS_16 , + '32' => _AM_XPDF_PERMISSIONS_32 , + '64' => _AM_XPDF_PERMISSIONS_64 + ); + break; +} + +$permform = new XoopsGroupPermForm($titleForm, $module_id, $perm_name, $perm_desc, "admin/permissions.php"); +if ($permtoset == 5){ + foreach( $global_perms_array as $perm_id => $perm_name ) { + $permform->addItem($perm_id , $perm_name) ; + } +} else { + $criteria = new CriteriaCompo(); + $criteria->setSort('cat_title'); + $criteria->setOrder('ASC'); + $cat_arr = $catHandler->getall($criteria); + foreach (array_keys($cat_arr) as $i) { + $permform->addItem($cat_arr[$i]->getVar('cat_id'), $cat_arr[$i]->getVar('cat_title')); + } +} +echo $permform->render(); +echo "<br /><br /><br /><br />\n"; +unset ($permform); + +include("admin_footer.php"); +?> \ No newline at end of file Added: XoopsModules/xpdf/releases/1.0/xpdf/blocks/blocks_doc.php =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/blocks/blocks_doc.php (rev 0) +++ XoopsModules/xpdf/releases/1.0/xpdf/blocks/blocks_doc.php 2012-03-14 18:44:26 UTC (rev 9131) @@ -0,0 +1,114 @@ +<?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) + * **************************************************************************** + * XPDF - 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 xpdf + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sun 2012/02/05 1:04:25 : Timgno Exp $ + * **************************************************************************** + */ + +include_once XOOPS_ROOT_PATH."/modules/xpdf/include/functions.php"; + +function b_xpdf_doc($options) { + include_once XOOPS_ROOT_PATH."/modules/xpdf/class/doc.php"; + $myts =& MyTextSanitizer::getInstance(); + + $doc = array(); + $type_block = $options[0]; + $nb_doc = $options[1]; + $lenght_title = $options[2]; + + $docHandler =& xoops_getModuleHandler("xpdf_doc", "xpdf"); + $criteria = new CriteriaCompo(); + array_shift($options); + array_shift($options); + array_shift($options); + + switch ($type_block) + { + // pour le bloc: doc recents + case "recent": + $criteria->add(new Criteria("doc_online", 1)); + $criteria->setSort("doc_created"); + $criteria->setOrder("DESC"); + break; + // pour le bloc: doc du jour + case "day": + $criteria->add(new Criteria("doc_online", 1)); + $criteria->add(new Criteria("doc_created", strtotime(date("Y/m/d")), ">=")); + $criteria->add(new Criteria("doc_created", strtotime(date("Y/m/d"))+86400, "<=")); + $criteria->setSort("doc_created"); + $criteria->setOrder("ASC"); + break; + // pour le bloc: doc aléatoires + case "random": + $criteria->add(new Criteria("doc_online", 1)); + $criteria->setSort("RAND()"); + break; + } + + $criteria->setLimit($nb_doc); + $doc_arr = $docHandler->getall($criteria); + foreach (array_keys($doc_arr) as $i) + { + $doc[$i]["doc_id"] = $doc_arr[$i]->getVar("doc_id"); + $doc[$i]["doc_cid"] = $doc_arr[$i]->getVar("doc_cid"); + $doc[$i]["doc_title"] = $doc_arr[$i]->getVar("doc_title"); + $doc[$i]["doc_submitter"] = $doc_arr[$i]->getVar("doc_submitter"); + $doc[$i]["doc_created"] = $doc_arr[$i]->getVar("doc_created"); + $doc[$i]["doc_weight"] = $doc_arr[$i]->getVar("doc_weight"); + $doc[$i]["doc_status"] = $doc_arr[$i]->getVar("doc_status"); + $doc[$i]["doc_waiting"] = $doc_arr[$i]->getVar("doc_waiting"); + $doc[$i]["doc_online"] = $doc_arr[$i]->getVar("doc_online"); + + } + return $doc; +} + +function b_xpdf_doc_edit($options) { + $form = ""._MB_XPDF_DOC_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_XPDF_DOC_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_XPDF_DOC_CATTODISPLAY."<br /><select name=\"options[]\" multiple=\"multiple\" size=\"5\">"; + $form .= "<option value=\"0\" " . (array_search(0, $options) === false ? "" : "selected=\"selected\"") . ">" ._MB_XPDF_DOC_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/xpdf/releases/1.0/xpdf/blocks/index.html =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/blocks/index.html (rev 0) +++ XoopsModules/xpdf/releases/1.0/xpdf/blocks/index.html 2012-03-14 18:44:26 UTC (rev 9131) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xpdf/releases/1.0/xpdf/class/index.html =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/class/index.html (rev 0) +++ XoopsModules/xpdf/releases/1.0/xpdf/class/index.html 2012-03-14 18:44:26 UTC (rev 9131) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xpdf/releases/1.0/xpdf/class/xpdf_cat.php =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/class/xpdf_cat.php (rev 0) +++ XoopsModules/xpdf/releases/1.0/xpdf/class/xpdf_cat.php 2012-03-14 18:44:26 UTC (rev 9131) @@ -0,0 +1,169 @@ +<?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) + * **************************************************************************** + * XPDF - 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 xpdf + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sun 2012/02/05 1:04:25 : Timgno Exp $ + * **************************************************************************** + */ +if (!defined("XOOPS_ROOT_PATH")) { + die("XOOPS root path not defined"); +} + +if (!class_exists("XoopsPersistableObjectHandler")) { + include_once XOOPS_ROOT_PATH."/modules/xpdf/class/object.php"; +} + +class xpdf_cat extends XoopsObject +{ + //Constructor + function __construct() + { + $this->XoopsObject(); + $this->initVar("cat_id", XOBJ_DTYPE_INT, null, false, 5); + $this->initVar("cat_pid", XOBJ_DTYPE_INT, null, false, 5); + $this->initVar("cat_title", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("cat_imgurl", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("cat_description", XOBJ_DTYPE_TXTAREA, null, false); + $this->initVar("cat_weight", XOBJ_DTYPE_INT, null, false, 11); + } + + function xpdf_cat() + { + $this->__construct(); + } + + function getForm($action = false) + { + if ($action === false) { + $action = $_SERVER["REQUEST_URI"]; + } + + $title = $this->isNew() ? sprintf(_AM_XPDF_CAT_ADD) : sprintf(_AM_XPDF_CAT_EDIT); + + include_once(XOOPS_ROOT_PATH."/class/... [truncated message content] |
From: <be...@us...> - 2012-03-18 06:10:04
|
Revision: 9151 http://xoops.svn.sourceforge.net/xoops/?rev=9151&view=rev Author: beckmi Date: 2012-03-18 06:09:54 +0000 (Sun, 18 Mar 2012) Log Message: ----------- Adding Google Maps, converted to X 2.5.x Admin GUI Modified Paths: -------------- XoopsModules/news/branches/mamba/news/admin/about.php XoopsModules/news/branches/mamba/news/admin/admin_footer.php XoopsModules/news/branches/mamba/news/admin/admin_header.php XoopsModules/news/branches/mamba/news/admin/index.php XoopsModules/news/branches/mamba/news/admin/menu.php XoopsModules/news/branches/mamba/news/class/class.newsstory.php XoopsModules/news/branches/mamba/news/docs/lang.diff XoopsModules/news/branches/mamba/news/language/english/admin.php XoopsModules/news/branches/mamba/news/xoops_version.php Added Paths: ----------- XoopsModules/googlemaps/ XoopsModules/googlemaps/branches/ XoopsModules/googlemaps/releases/ XoopsModules/googlemaps/trunk/ XoopsModules/googlemaps/trunk/googlemaps/ XoopsModules/googlemaps/trunk/googlemaps/admin/ XoopsModules/googlemaps/trunk/googlemaps/admin/about.php XoopsModules/googlemaps/trunk/googlemaps/admin/admin_footer.php XoopsModules/googlemaps/trunk/googlemaps/admin/admin_header.php XoopsModules/googlemaps/trunk/googlemaps/admin/index.html XoopsModules/googlemaps/trunk/googlemaps/admin/index.php XoopsModules/googlemaps/trunk/googlemaps/admin/main.php XoopsModules/googlemaps/trunk/googlemaps/admin/menu.php XoopsModules/googlemaps/trunk/googlemaps/admin/sqlupdate.php XoopsModules/googlemaps/trunk/googlemaps/admin/sqlupdate2.php XoopsModules/googlemaps/trunk/googlemaps/docs/ XoopsModules/googlemaps/trunk/googlemaps/docs/UPGRADE.txt XoopsModules/googlemaps/trunk/googlemaps/docs/changelog.txt XoopsModules/googlemaps/trunk/googlemaps/docs/credits.txt XoopsModules/googlemaps/trunk/googlemaps/docs/index.html XoopsModules/googlemaps/trunk/googlemaps/docs/install.txt XoopsModules/googlemaps/trunk/googlemaps/docs/lang_diff.txt XoopsModules/googlemaps/trunk/googlemaps/docs/license.txt XoopsModules/googlemaps/trunk/googlemaps/docs/readme.txt XoopsModules/googlemaps/trunk/googlemaps/googlemaps.css XoopsModules/googlemaps/trunk/googlemaps/images/ XoopsModules/googlemaps/trunk/googlemaps/images/icons/ XoopsModules/googlemaps/trunk/googlemaps/images/icons/32/ XoopsModules/googlemaps/trunk/googlemaps/images/icons/32/categorysort.png XoopsModules/googlemaps/trunk/googlemaps/images/icons/32/index.html XoopsModules/googlemaps/trunk/googlemaps/images/icons/index.html XoopsModules/googlemaps/trunk/googlemaps/images/index.html XoopsModules/googlemaps/trunk/googlemaps/images/location.png XoopsModules/googlemaps/trunk/googlemaps/images/logo.png XoopsModules/googlemaps/trunk/googlemaps/images/meet.png XoopsModules/googlemaps/trunk/googlemaps/images/profil.png XoopsModules/googlemaps/trunk/googlemaps/index.php XoopsModules/googlemaps/trunk/googlemaps/language/ XoopsModules/googlemaps/trunk/googlemaps/language/english/ XoopsModules/googlemaps/trunk/googlemaps/language/english/admin.php XoopsModules/googlemaps/trunk/googlemaps/language/english/help/ XoopsModules/googlemaps/trunk/googlemaps/language/english/help/help.html XoopsModules/googlemaps/trunk/googlemaps/language/english/help/index.html XoopsModules/googlemaps/trunk/googlemaps/language/english/index.html XoopsModules/googlemaps/trunk/googlemaps/language/english/main.php XoopsModules/googlemaps/trunk/googlemaps/language/english/modinfo.php XoopsModules/googlemaps/trunk/googlemaps/language/french/ XoopsModules/googlemaps/trunk/googlemaps/language/french/admin.php XoopsModules/googlemaps/trunk/googlemaps/language/french/changelog_fr.txt XoopsModules/googlemaps/trunk/googlemaps/language/french/help/ XoopsModules/googlemaps/trunk/googlemaps/language/french/help/help.html XoopsModules/googlemaps/trunk/googlemaps/language/french/help/index.html XoopsModules/googlemaps/trunk/googlemaps/language/french/index.html XoopsModules/googlemaps/trunk/googlemaps/language/french/main.php XoopsModules/googlemaps/trunk/googlemaps/language/french/modinfo.php XoopsModules/googlemaps/trunk/googlemaps/language/german/ XoopsModules/googlemaps/trunk/googlemaps/language/german/admin.php XoopsModules/googlemaps/trunk/googlemaps/language/german/help/ XoopsModules/googlemaps/trunk/googlemaps/language/german/help/help.html XoopsModules/googlemaps/trunk/googlemaps/language/german/help/index.html XoopsModules/googlemaps/trunk/googlemaps/language/german/index.html XoopsModules/googlemaps/trunk/googlemaps/language/german/main.php XoopsModules/googlemaps/trunk/googlemaps/language/german/modinfo.php XoopsModules/googlemaps/trunk/googlemaps/language/index.html XoopsModules/googlemaps/trunk/googlemaps/language/schinese/ XoopsModules/googlemaps/trunk/googlemaps/language/schinese/admin.php XoopsModules/googlemaps/trunk/googlemaps/language/schinese/help/ XoopsModules/googlemaps/trunk/googlemaps/language/schinese/help/help.html XoopsModules/googlemaps/trunk/googlemaps/language/schinese/help/index.html XoopsModules/googlemaps/trunk/googlemaps/language/schinese/index.html XoopsModules/googlemaps/trunk/googlemaps/language/schinese/main.php XoopsModules/googlemaps/trunk/googlemaps/language/schinese/modinfo.php XoopsModules/googlemaps/trunk/googlemaps/language/tchinese/ XoopsModules/googlemaps/trunk/googlemaps/language/tchinese/admin.php XoopsModules/googlemaps/trunk/googlemaps/language/tchinese/help/ XoopsModules/googlemaps/trunk/googlemaps/language/tchinese/help/help.html XoopsModules/googlemaps/trunk/googlemaps/language/tchinese/help/index.html XoopsModules/googlemaps/trunk/googlemaps/language/tchinese/index.html XoopsModules/googlemaps/trunk/googlemaps/language/tchinese/main.php XoopsModules/googlemaps/trunk/googlemaps/language/tchinese/modinfo.php XoopsModules/googlemaps/trunk/googlemaps/managepoint.php XoopsModules/googlemaps/trunk/googlemaps/sql/ XoopsModules/googlemaps/trunk/googlemaps/sql/index.html XoopsModules/googlemaps/trunk/googlemaps/sql/indexes.sql XoopsModules/googlemaps/trunk/googlemaps/sql/mysql.sql XoopsModules/googlemaps/trunk/googlemaps/sql/zoom.sql XoopsModules/googlemaps/trunk/googlemaps/templates/ XoopsModules/googlemaps/trunk/googlemaps/templates/googlemaps_index_location.html XoopsModules/googlemaps/trunk/googlemaps/templates/googlemaps_index_userprofile.html XoopsModules/googlemaps/trunk/googlemaps/templates/index.html XoopsModules/googlemaps/trunk/googlemaps/xoops_version.php Added: XoopsModules/googlemaps/trunk/googlemaps/admin/about.php =================================================================== --- XoopsModules/googlemaps/trunk/googlemaps/admin/about.php (rev 0) +++ XoopsModules/googlemaps/trunk/googlemaps/admin/about.php 2012-03-18 06:09:54 UTC (rev 9151) @@ -0,0 +1,29 @@ +<?php +/** + * Marquee module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project (http://www.xoops.org) + * @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License} + * @package Marquee + * @since 2.5.0 + * @author Mage, Mamba + * @version $Id $ + **/ + +include_once dirname(__FILE__) . '/admin_header.php'; + +xoops_cp_header(); + +$aboutAdmin = new ModuleAdmin(); + +echo $aboutAdmin->addNavigation('about.php'); +echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); + +include 'admin_footer.php'; \ No newline at end of file Added: XoopsModules/googlemaps/trunk/googlemaps/admin/admin_footer.php =================================================================== --- XoopsModules/googlemaps/trunk/googlemaps/admin/admin_footer.php (rev 0) +++ XoopsModules/googlemaps/trunk/googlemaps/admin/admin_footer.php 2012-03-18 06:09:54 UTC (rev 9151) @@ -0,0 +1,27 @@ +<?php +/** + * Google Maps module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License + * @package googlemaps + * @since 0.9 + * @author Mamba (www.xoops.org) + * @version $Id $ +**/ + +echo "<div class='adminfooter'>\n" + ." <div style='text-align: center;'>\n" + ." <a href='http://www.xoops.org' target='_blank'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" + ." </div>\n" + ." " . _AM_GMAPS_ADMIN_FOOTER . "\n" + ."</div>"; + +xoops_cp_footer(); \ No newline at end of file Added: XoopsModules/googlemaps/trunk/googlemaps/admin/admin_header.php =================================================================== --- XoopsModules/googlemaps/trunk/googlemaps/admin/admin_header.php (rev 0) +++ XoopsModules/googlemaps/trunk/googlemaps/admin/admin_header.php 2012-03-18 06:09:54 UTC (rev 9151) @@ -0,0 +1,42 @@ +<?php +/** + * Marquee module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License + * @package Marquee + * @since 2.5.0 + * @author XOOPS Module Team + * @version $Id $ +**/ + +$path = dirname(dirname(dirname(dirname(__FILE__)))); +include_once $path . '/mainfile.php'; +include_once $path . '/include/cp_functions.php'; +require_once $path . '/include/cp_header.php'; + +global $xoopsModule; + +$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname'); + +// Load language files +xoops_loadLanguage('admin', $thisModuleDir); +xoops_loadLanguage('modinfo', $thisModuleDir); +xoops_loadLanguage('main', $thisModuleDir); + +$pathIcon16 = '../'.$xoopsModule->getInfo('icons16'); +$pathIcon32 = '../'.$xoopsModule->getInfo('icons32'); +$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); + +if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){ + include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'); + }else{ + redirect_header("../../../admin.php", 5, _AM_GMAPS_MODULEADMIN_MISSING, false); + } \ No newline at end of file Added: XoopsModules/googlemaps/trunk/googlemaps/admin/index.html =================================================================== --- XoopsModules/googlemaps/trunk/googlemaps/admin/index.html (rev 0) +++ XoopsModules/googlemaps/trunk/googlemaps/admin/index.html 2012-03-18 06:09:54 UTC (rev 9151) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/googlemaps/trunk/googlemaps/admin/index.php =================================================================== --- XoopsModules/googlemaps/trunk/googlemaps/admin/index.php (rev 0) +++ XoopsModules/googlemaps/trunk/googlemaps/admin/index.php 2012-03-18 06:09:54 UTC (rev 9151) @@ -0,0 +1,43 @@ +<?php +/** + * Private message + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package MRBS + * @since 1.41 + * @author jobrazo + * @version $Id: admin.php $ + */ + +require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; +include_once dirname(__FILE__) . '/admin_header.php'; + +xoops_cp_header(); + + $indexAdmin = new ModuleAdmin(); + +//----------------------- + +$result=$xoopsDB->query("select count(*) from ".$xoopsDB->prefix("gmap_points")); +list($numrows) = $xoopsDB->fetchRow($result); + +$indexAdmin->addInfoBox(_MD_GMAPS_DASHBOARD); + +$indexAdmin->addInfoBoxLine( + _MD_GMAPS_DASHBOARD, _MD_THEREARE , $numrows, 'Green' +); +//---------------------------- + + + echo $indexAdmin->addNavigation('index.php'); + echo $indexAdmin->renderIndex(); + +include "admin_footer.php"; \ No newline at end of file Added: XoopsModules/googlemaps/trunk/googlemaps/admin/main.php =================================================================== --- XoopsModules/googlemaps/trunk/googlemaps/admin/main.php (rev 0) +++ XoopsModules/googlemaps/trunk/googlemaps/admin/main.php 2012-03-18 06:09:54 UTC (rev 9151) @@ -0,0 +1,984 @@ +<?php +############################################################################### +# Phatblokes adaption of google maps v.1.0 for Xoops 2.x # +# Writen by Phatbloke (pha...@wo...) # +# ------------------------------------------------------------------------- # +# # +# ------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# ------------------------------------------------------------------------ # +############################################################################### +include '../../../include/cp_header.php'; +if ( file_exists("../language/".$xoopsConfig['language']."/main.php") ) { + include "../language/".$xoopsConfig['language']."/main.php"; +} else { + include "../language/english/main.php"; +} +//include '../include/functions.php'; +include_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; +include_once XOOPS_ROOT_PATH."/class/xoopslists.php"; +include_once XOOPS_ROOT_PATH."/include/xoopscodes.php"; +include_once XOOPS_ROOT_PATH.'/class/module.errorhandler.php'; +$myts =& MyTextSanitizer::getInstance(); +$eh = new ErrorHandler; + +// Display the main contents + +function main() +{ + global $xoopsDB, $xoopsModule; + xoops_cp_header(); + + xoops_cp_footer(); +} + +// Add in a new category + +function catAdd() +{ + global $xoopsDB, $xoopsModule, $xoopsModuleConfig; + xoops_cp_header(); + + //Display the map + echo"<script src=\"http://maps.google.com/maps?file=api&v=2.x&key=".$xoopsModuleConfig['api']."\" type=\"text/javascript\"></script >\n"; + echo"<script type=\"text/javascript\">\n"; + echo"//<![CDATA[ \n"; + echo"function loadMap(){\n"; + //echo"function GPoint2(x,y) { return new GLatLng(y,x); }\n"; + echo"var map = new GMap2(document.getElementById(\"map\"));\n"; + echo"map.setCenter(new GLatLng(0, 0), 1);\n"; + echo"map.addControl(new GLargeMapControl());\n"; + echo"map.addControl(new GMapTypeControl());\n"; + echo"GEvent.addListener(map, \"click\", function(overlay, point){\n"; + echo"map.clearOverlays();\n"; + //echo"GEvent.addListener(map, 'zoomend', function() {\n"; + echo"document.getElementById(\"zoom\").value = map.getZoom();\n"; + //echo"});\n"; + echo"if (point) {\n"; + echo"map.addOverlay(new GMarker(point,{draggable:true}));\n"; + echo"map.panTo(point);\n"; + echo"lat = point.y;\n"; + echo"lon = point.x;\n"; + echo"document.getElementById(\"lat\").value = lat;\n"; + echo"document.getElementById(\"lon\").value = lon;\n"; + echo"}\n"; + echo"});\n"; + echo"}\n"; + echo"// arrange for our onload handler to 'listen' for onload events\n"; + echo"if (window.attachEvent) {\n"; + echo"window.attachEvent(\"onload\", function() {\n"; + echo"loadMap(); // Internet Explorer\n"; + echo"});\n"; + echo"} else {\n"; + echo"window.addEventListener(\"load\", function() {\n"; + echo"loadMap(); // Firefox and standard browsers\n"; + echo"}, false);\n"; + echo"}\n"; + echo"//]]>\n"; + echo"</script >\n"; + + echo"<table width='100%' class='outer' cellspacing='1'><tr><th colspan='2'>"._MD_ADDNEWCAT."</th></tr>"; + echo "<form method=post action=main.php>\n"; + echo "<tr valign='top' align='center'><td class='head' colspan='2'><div id='map' style='height: 400px'></div ></td></tr>"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_CAT."</td>"; + echo "<td class='even'><input type=text name=title size=50 maxlength=100></td></tr>"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_CATLONGITUDE."</td>"; + echo "<td class='even'><input id=lon type=text name=lon size=50 maxlength=250></td></tr>"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_CATLATITUDE."</td>"; + echo "<td class='even'><input id=lat type=text name=lat size=50 maxlength=250></td></tr>"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_ZOOM."</td>"; + echo "<td class='even'><input id=zoom type=text name=zoom size=50 maxlength=250></td></tr>"; + echo "<input type=\"hidden\" name=\"op\" value=\"catInsert\"></input>"; + echo "<tr valign='top' align='left'><td class='head'></td><td class='even'><input type='submit' class='formButton' name='post' id='post' value='"._MD_ADD."' accesskey=\"s\" /></form></td></tr></table>"; + xoops_cp_footer(); +} + +//Insert the category into the DB + +function catInsert() +{ + global $xoopsConfig, $xoopsDB, $myts, $xoopsUser, $xoopsModule, $eh; + $title = $myts->makeTboxData4Save($_POST["title"]); + $lat = $myts->makeTboxData4Save($_POST["lat"]); + $lon = $myts->makeTboxData4Save($_POST["lon"]); + $zoom = $myts->makeTboxData4Save($_POST["zoom"]); + $errormsg = ''; + // Check if Title exist + if ( $title == "" ) { + $errormsg .= "<h4 style='color: #ff0000'>"; + $errormsg .= _MD_ERRORTITLE."</h4>"; + $error =1; + } + if ( $error == 1 ) { + xoops_cp_header(); + echo $errormsg; + xoops_cp_footer(); + exit(); + } + list($order) = $xoopsDB->fetchRow($xoopsDB->query("SELECT MAX(`order`) FROM ".$xoopsDB->prefix("gmap_category"))); + $order++; + //$sql = "INSERT INTO ".$xoopsDB->prefix("gmap_category")." ( `map_id` , `lat` , `lon` , `name` , `zoom` ,`active` , `order`) VALUES ('', '$lat', '$lon', '$title', $zoom, '1', '$order')"; + $sql = "INSERT INTO ".$xoopsDB->prefix("gmap_category")." ( `lat` , `lon` , `name` , `zoom` ,`active` , `order`) VALUES ('$lat', '$lon', '$title', $zoom, '1', '$order')"; + $xoopsDB->query($sql) or $eh->show("0013"); + if ( $newid == 0 ) { + $newid = $xoopsDB->getInsertId(); + } + redirect_header("main.php?op=linksConfigMenu",1,_MD_NEWCATADDED); +} + +//Modify a category select page to choose which cat to mod + +function catMod() +{ + + global $xoopsDB; + $result2 = $xoopsDB->query("select count(*) from ".$xoopsDB->prefix("gmap_category").""); + list($numrows2) = $xoopsDB->fetchRow($result2); + if ( $numrows2 > 0 ) { + $result1 = $xoopsDB->query("select map_id, name from ".$xoopsDB->prefix("gmap_category").""); + $i = 0; + while ($array = $xoopsDB->fetchArray($result1)) { + $entry[$i]['map_id'] = $array['map_id']; + $entry[$i]['name'] = $array['name']; + $i++; + } + xoops_cp_header(); + echo"<table width='100%' class='outer' cellspacing='1'><tr><th colspan='2'>"._MD_MODCAT."</th></tr>"; + echo "<form method=get action=\"main.php\">\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_CATID."</td>"; + echo "<td class='even'><select size='1' name='lid'>"; + echo "<option value=' '>------</option>"; + $count_msg = count($entry); + for ( $i = 0; $i < $count_msg; $i++ ) { + echo "<option value='".$entry[$i]['map_id']."'>".$entry[$i]['name']."</option>"; + } + echo "</select></td></tr>"; + echo "<input type=hidden name=fct value=mypoints>\n"; + echo "<input type=hidden name=op value=modCat><br /><br />\n"; + echo "<tr valign='top' align='left'><td class='head'></td><td class='even'><input type='submit' class='formButton' name='post' id='post' value='"._MD_MODIFY."' accesskey=\"s\" /></form></td></tr></table>"; + xoops_cp_footer(); + }else{ + redirect_header("index.php",1,_MD_NOCATS); + } + +} + +//Modify the selected category + +function modCat() +{ + global $xoopsDB, $myts, $eh, $mytree, $xoopsConfig, $xoopsModuleConfig; + $lid = $_GET['lid']; + $result = $xoopsDB->query("select map_id, lat, lon, zoom, name from ".$xoopsDB->prefix("gmap_category")." where map_id=$lid") or $eh->show("0013"); + list($map_id, $lat, $lon, $zoom, $name) = $xoopsDB->fetchRow($result); + $name = $myts->makeTboxData4Edit($name); + $lat = $myts->makeTboxData4Edit($lat); + $lon = $myts->makeTboxData4Edit($lon); + $zoom = $myts->makeTboxData4Edit($zoom); + xoops_cp_header(); + + //Display the map + + echo"<script src=\"http://maps.google.com/maps?file=api&v=2.x&key=".$xoopsModuleConfig['api']."\" type=\"text/javascript\"></script >\n"; + echo"<script type=\"text/javascript\">\n"; + echo"//<![CDATA[ \n"; + echo"function loadMap(){\n"; + //echo"function GPoint2(x,y) { return new GLatLng(y,x); }\n"; + echo"var map = new GMap2(document.getElementById(\"map\"));\n"; + echo"map.addControl(new GLargeMapControl());\n"; + echo"map.addControl(new GMapTypeControl());\n"; + echo"map.setCenter(new GLatLng(".$lat.",".$lon."), ".$zoom.");\n"; + echo"map.addOverlay(new GMarker(new GLatLng(".$lat.",".$lon."),{draggable:true}));\n"; + echo"GEvent.addListener(map, \"click\", function(overlay, point){\n"; + echo"map.clearOverlays();\n"; + //echo"GEvent.addListener(map, 'zoomend', function() {\n"; + echo"document.getElementById(\"zoom\").value = map.getZoom();\n"; + //echo"});\n"; + echo"if (point) {\n"; + echo"map.addOverlay(new GMarker(point));\n"; + echo"map.panTo(point);\n"; + echo"lat = point.y;\n"; + echo"lon = point.x;\n"; + echo"document.getElementById(\"lat\").value = lat;\n"; + echo"document.getElementById(\"lon\").value = lon;\n"; + echo"}\n"; + echo"});\n"; + echo"}\n"; + echo"// arrange for our onload handler to 'listen' for onload events\n"; + echo"if (window.attachEvent) {\n"; + echo"window.attachEvent(\"onload\", function() {\n"; + echo"loadMap(); // Internet Explorer\n"; + echo"});\n"; + echo"} else {\n"; + echo"window.addEventListener(\"load\", function() {\n"; + echo"loadMap(); // Firefox and standard browsers\n"; + echo"}, false);\n"; + echo"}\n"; + echo"//]]>\n"; + echo"</script >\n"; + + echo"<table width='100%' class='outer' cellspacing='1'><tr><th colspan='2'>"._MD_MODCAT."</th></tr>"; + echo "<form method=post action=\"main.php\">\n"; + echo "<tr valign='top' align='center'><td class='head' colspan='2'><div id='map' style='height: 400px'></div ></td></tr>"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_CAT."</td>"; + echo "<td class='even'><input type=text name=name value=\"$name\" size=50 maxlength=100></input></td></tr>\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_LONGITUDE."</td>"; + echo "<td class='even'><input type=text id=lon name=lon value=\"$lon\" size=50 maxlength=100></input></td></tr>\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_LATITUDE."</td>"; + echo "<td class='even'><input type=text id=lat name=lat value=\"$lat\" size=50 maxlength=100></input></td></tr>\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_ZOOM."</td>"; + echo "<td class='even'><input type=text name=zoom id=zoom value=\"$zoom\" size=50 maxlength=100></input></td></tr>\n"; + echo "<input type=hidden name=lid value=$map_id></input>\n"; + echo "<input type=hidden name=op value=modCatS>\n"; + echo "<tr valign='top' align='left'><td class='head'></td><td class='even'><table><tr><td class='even'><input type='submit' class='formButton' name='post' id='post' value='"._MD_MODIFY."' accesskey=\"s\" /></form></td>"; + echo "<td class='even'>".myTextForm("main.php?op=delCat&lid=".$lid , _MD_DELETE)."</td>"; + echo "<td class='even'>".myTextForm("main.php?op=linksConfigMenu", _MD_CANCEL)."</td>"; + echo "</tr></table></td></tr></table>"; + xoops_cp_footer(); +} + +// Insert the modified category into the DB +function modCatS() +{ + global $xoopsDB, $myts, $eh; + $name = $myts->makeTboxData4Save($_POST["name"]); + $lat = $myts->makeTboxData4Save($_POST["lat"]); + $lon = $myts->makeTboxData4Save($_POST["lon"]); + $zoom = $myts->makeTboxData4Save($_POST["zoom"]); + $xoopsDB->query("update ".$xoopsDB->prefix("gmap_category")." set name='$name', lat='$lat', lon='$lon',zoom='$zoom'where map_id=".$_POST['lid']."") or $eh->show("0013"); + redirect_header("index.php",1,_MD_DBUPDATED); + exit(); +} + +//Add in a new point +function pointAdd() +{ + global $xoopsDB, $xoopsModule, $xoopsModuleConfig; + $result2 = $xoopsDB->query("select count(*) from ".$xoopsDB->prefix("gmap_category").""); + list($numrows2) = $xoopsDB->fetchRow($result2); + if ( $numrows2 > 0 ) { + $result1 = $xoopsDB->query("select map_id, name from ".$xoopsDB->prefix("gmap_category").""); + $i = 0; + while ($array = $xoopsDB->fetchArray($result1)) { + $entry[$i]['map_id'] = $array['map_id']; + $entry[$i]['name'] = $array['name']; + $i++; + } + xoops_cp_header(); + echo"<script src=\"http://maps.google.com/maps?file=api&v=2.x&key=".$xoopsModuleConfig['api']."\" type=\"text/javascript\"></script >\n"; + echo"<script type=\"text/javascript\">\n"; + echo"//<![CDATA[ \n"; + echo"function loadMap(){\n"; + //echo"function GPoint2(x,y) { return new GLatLng(y,x); }\n"; + echo"var map = new GMap2(document.getElementById(\"map\"));\n"; + echo"map.addControl(new GLargeMapControl());\n"; + echo"map.addControl(new GMapTypeControl());\n"; + echo"map.setCenter(new GLatLng(0, 0), 1);\n"; + echo"GEvent.addListener(map, \"click\", function(overlay, point){\n"; + echo"map.clearOverlays();\n"; + //echo"GEvent.addListener(map, 'zoomend', function() {\n"; + echo"document.getElementById(\"zoom\").value = map.getZoom();\n"; + //echo"});\n"; + echo"if (point) {\n"; + echo"map.addOverlay(new GMarker(point,{draggable:true}));\n"; + echo"map.panTo(point);\n"; + echo"lat = point.y;\n"; + echo"lon = point.x;\n"; + echo"document.getElementById(\"lat\").value = lat;\n"; + echo"document.getElementById(\"lon\").value = lon;\n"; + echo"}\n"; + echo"});\n"; + echo"}\n"; + echo"// arrange for our onload handler to 'listen' for onload events\n"; + echo"if (window.attachEvent) {\n"; + echo"window.attachEvent(\"onload\", function() {\n"; + echo"loadMap(); // Internet Explorer\n"; + echo"});\n"; + echo"} else {\n"; + echo"window.addEventListener(\"load\", function() {\n"; + echo"loadMap(); // Firefox and standard browsers\n"; + echo"}, false);\n"; + echo"}\n"; + echo"//]]>\n"; + echo"</script >\n"; + + echo"<table width='100%' class='outer' cellspacing='1'><tr><th colspan='2'>"._MD_ADDNEWPOINT."</th></tr>"; + echo "<form method=post action=\"main.php\">\n"; + echo "<tr valign='top' align='center'><td class='head' colspan='2'><div id='map' style='height: 400px'></div ></td></tr>"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_LOCATION."</td>"; + echo "<td class='even'><input type=text name=title size=50 maxlength=100></td><tr>\n"; + + echo "<tr valign='top' align='left'><td class='head'>"._MD_LONGITUDE."</td>"; + echo "<td class='even'><input id=lon type=text name=lon size=50 maxlength=250></td><tr>\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_LATITUDE."</td>"; + echo "<td class='even'><input id=lat type=text name=lat size=50 maxlength=250></td><tr>\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_ZOOM."</td>"; + echo "<td class='even'><input id=zoom type=text name=zoom size=50 maxlength=250></td><tr>\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_CATEGORYC."</td>"; + echo "<td class='even'><select size='1' name='category'>"; + $count_msg = count($entry); + for ( $i = 0; $i < $count_msg; $i++ ) { + echo "<option value='".$entry[$i]['map_id']."'>".$entry[$i]['name']."</option>"; + } + echo "</select></td></tr>\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_DESCRIPTIONC."</td>"; + echo "<td class='even'>"; + xoopsCodeTarea("description",60,8); + xoopsSmilies("description"); + echo "</td></tr>\n"; + echo "<input type=\"hidden\" name=\"op\" value=\"pointInsert\"></input>\n"; + echo "<tr valign='top' align='left'><td class='head'></td><td class='even'><input type='submit' class='formButton' name='post' id='post' value='"._MD_ADD."' accesskey=\"s\" /></form></td></tr></table>"; + xoops_cp_footer(); + }else{ + redirect_header("main.php?op=catAdd",1,_MD_NOCATSADD); + } +} + +//Insert the new point into the DB +function pointInsert() +{ + global $xoopsConfig, $xoopsDB, $myts, $xoopsUser, $xoopsModule, $eh; + $title = $myts->makeTboxData4Save($_POST["title"]); + $lat = $myts->makeTboxData4Save($_POST["lat"]); + $lon = $myts->makeTboxData4Save($_POST["lon"]); + $zoom = $myts->makeTboxData4Save($_POST["zoom"]); + $category = $myts->makeTboxData4Save($_POST["category"]); + $description = $myts->makeTareaData4Save($_POST["description"]); + $submitter = $xoopsUser->uid(); + $date = time(); + $errormsg = ''; + // Check if Title exist + if ( $title == "" ) { + $errormsg .= "<h4 style='color: #ff0000'>"; + $errormsg .= _MD_ERRORTITLE."</h4>"; + $error =1; + } + + // Check if Description exist + if ( $description == "" ) { + $errormsg .= "<h4 style='color: #ff0000'>"; + $errormsg .= _MD_ERRORDESC."</h4>"; + $error =1; + } + if ( $error == 1 ) { + xoops_cp_header(); + echo $errormsg; + xoops_cp_footer(); + exit(); + } + list($order) = $xoopsDB->fetchRow($xoopsDB->query("SELECT MAX(`order`) FROM ".$xoopsDB->prefix("gmap_points")." WHERE `map_id` = ".$category)); + $order++; + $sql = "INSERT INTO ".$xoopsDB->prefix("gmap_points")." (`map_id` , `lat` , `lon` , `title` , `html` , `zoom` , `submitter` , `status` , `date`, `order`) VALUES ('$category', '$lat', '$lon', '$title', '$description', '$zoom','$submitter', '1', '$date', '$order')"; + $xoopsDB->query($sql) or $eh->show("0013"); + if ( $newid == 0 ) { + $newid = $xoopsDB->getInsertId(); + } + redirect_header("main.php?op=linksConfigMenu",1,_MD_NEWPOINTADDED); +} + +//Modify a point select page to choose which point to mod + +function pointMod() +{ + + global $xoopsDB; + $result2 = $xoopsDB->query("select count(*) from ".$xoopsDB->prefix("gmap_points").""); + list($numrows2) = $xoopsDB->fetchRow($result2); + if ( $numrows2 > 0 ) { + $result1 = $xoopsDB->query("select id, title from ".$xoopsDB->prefix("gmap_points").""); + $i = 0; + while ($array = $xoopsDB->fetchArray($result1)) { + $entry[$i]['id'] = $array['id']; + $entry[$i]['title'] = $array['title']; + $i++; + } + xoops_cp_header(); + echo "<table width='100%' class='outer' cellspacing='1'><tr><th colspan='2'>"._MD_MODPOINT."</th></tr>"; + echo "<form method=get action=\"main.php\">\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_POINTID."</td>"; + echo "<td class='even'><select size='1' name='lid'>"; + echo "<option value=' '>------</option>"; + $count_msg = count($entry); + for ( $i = 0; $i < $count_msg; $i++ ) { + echo "<option value='".$entry[$i]['id']."'>".$entry[$i]['title']."</option>"; + } + echo "</select></td></tr>\n"; + echo "<input type=hidden name=fct value=mypoints>\n"; + echo "<input type=hidden name=op value=modPoint><br /><br />\n"; + echo "<tr valign='top' align='left'><td class='head'></td><td class='even'><input type='submit' class='formButton' name='post' id='post' value='"._MD_MODIFY."' accesskey=\"s\" /></form></td></tr></table>"; + xoops_cp_footer(); + }else{ + redirect_header("index.php",1,_MD_NOPOINTS); + } + +} + +//Modify the point + +function modPoint() +{ + global $xoopsDB, $myts, $eh, $mytree, $xoopsConfig, $xoopsModuleConfig; + $lid = $_GET['lid']; + $result = $xoopsDB->query("select id, lat, lon, zoom, map_id, title, html from ".$xoopsDB->prefix("gmap_points")." where id=$lid") or $eh->show("0013"); + list($id, $lat, $lon, $zoom, $map_id, $title, $html) = $xoopsDB->fetchRow($result); + $title = $myts->makeTboxData4Edit($title); + $lat = $myts->makeTboxData4Edit($lat); + $lon = $myts->makeTboxData4Edit($lon); + $zoom = $myts->makeTboxData4Edit($zoom); + $map_id = $myts->makeTboxData4Edit($map_id); + $GLOBALS['html'] = $myts->makeTareaData4Edit($html); + $result1 = $xoopsDB->query("select map_id, name from ".$xoopsDB->prefix("gmap_category").""); + $i = 0; + while ($array = $xoopsDB->fetchArray($result1)) { + $entry[$i]['map_id'] = $array['map_id']; + $entry[$i]['name'] = $array['name']; + $i++; + } + xoops_cp_header(); + + //Display Map + + echo"<script src=\"http://maps.google.com/maps?file=api&v=2.x&key=".$xoopsModuleConfig['api']."\" type=\"text/javascript\"></script >\n"; + echo"<script type=\"text/javascript\">\n"; + echo"//<![CDATA[ \n"; + echo"function loadMap(){\n"; + //echo"function GPoint2(x,y) { return new GLatLng(y,x); }\n"; + echo"var map = new GMap2(document.getElementById(\"map\"));\n"; + echo"map.addControl(new GLargeMapControl());\n"; + echo"map.addControl(new GMapTypeControl());\n"; + echo"map.setCenter(new GLatLng(".$lat.",".$lon."), ".$zoom.");\n"; + echo"map.addOverlay(new GMarker(new GLatLng(".$lat.",".$lon."),{draggable:true}));\n"; + echo"GEvent.addListener(map, \"click\", function(overlay, point){\n"; + echo"map.clearOverlays();\n"; + //echo"GEvent.addListener(map, 'zoomend', function() {\n"; + echo"document.getElementById(\"zoom\").value = map.getZoom();\n"; + //echo"});\n"; + echo"if (point) {\n"; + echo"map.addOverlay(new GMarker(point));\n"; + echo"map.panTo(point);\n"; + echo"lat = point.y;\n"; + echo"lon = point.x;\n"; + echo"document.getElementById(\"lat\").value = lat;\n"; + echo"document.getElementById(\"lon\").value = lon;\n"; + echo"}\n"; + echo"});\n"; + echo"}\n"; + echo"// arrange for our onload handler to 'listen' for onload events\n"; + echo"if (window.attachEvent) {\n"; + echo"window.attachEvent(\"onload\", function() {\n"; + echo"loadMap(); // Internet Explorer\n"; + echo"});\n"; + echo"} else {\n"; + echo"window.addEventListener(\"load\", function() {\n"; + echo"loadMap(); // Firefox and standard browsers\n"; + echo"}, false);\n"; + echo"}\n"; + echo"//]]>\n"; + echo"</script >\n"; + + echo"<table width='100%' class='outer' cellspacing='1'><tr><th colspan='2'>"._MD_MODPOINT."</th></tr>"; + echo "<form method=post action=\"main.php\">\n"; + echo "<tr valign='top' align='center'><td class='head' colspan='2'><div id='map' style='height: 400px'></div ></td></tr>"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_LOCATION."</td>"; + echo "<td class='even'><input type=text name=title value=\"$title\" size=50 maxlength=100></input></td></tr>\n"; + + echo "<tr valign='top' align='left'><td class='head'>"._MD_LONGITUDE."</td>"; + echo "<td class='even'><input type=text id=lon name=lon value=\"$lon\" size=50 maxlength=100></input></td></tr>\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_LATITUDE."</td>"; + echo "<td class='even'><input type=text id=lat name=lat value=\"$lat\" size=50 maxlength=100></input></td></tr>\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_ZOOM."</td>"; + echo "<td class='even'><input type=text name=zoom id=zoom value=\"$zoom\" size=50 maxlength=100></input></td></tr>\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_CATEGORYC."</td>"; + echo "<td class='even'><select size='1' name='map_id'>"; + $count_msg = count($entry); + for ( $i = 0; $i < $count_msg; $i++ ) { + if ( $map_id == $entry[$i]['map_id'] ) { + $opt_selected = "selected='selected'"; + }else{ + $opt_selected = ""; + } + echo "<option value='".$entry[$i]['map_id']."' $opt_selected >".$entry[$i]['name']."</option>"; + } + echo "</select></td></tr>\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_DESCRIPTIONC."</td>"; + echo "<td class='even'>"; + xoopsCodeTarea("html",60,8); + xoopsSmilies("html"); + echo "</td></tr>\n"; + echo "<input type=hidden name=lid value=$id></input>\n"; + echo "<input type=hidden name=op value=modPointS>\n"; + echo "<tr valign='top' align='left'><td class='head'></td><td class='even'><table><tr><td class='even'><input type='submit' class='formButton' name='post' id='post' value='"._MD_MODIFY."' accesskey=\"s\" /></form>"; + echo "<td class='even'>".myTextForm("main.php?op=delPoint&lid=".$lid , _MD_DELETE)."</td>"; + echo "<td class='even'>".myTextForm("main.php?op=linksConfigMenu", _MD_CANCEL)."</td>"; + echo "</tr></table></td></tr></table>"; + xoops_cp_footer(); +} + +//Insert the modified point into the DB + +function modPointS() +{ + global $xoopsDB, $myts, $eh; + $title = $myts->makeTboxData4Save($_POST["title"]); + $map_id = $_POST["map_id"]; + $lat = $myts->makeTboxData4Save($_POST["lat"]); + $lon = $myts->makeTboxData4Save($_POST["lon"]); + $zoom = $myts->makeTboxData4Save($_POST["zoom"]); + $html = $myts->makeTareaData4Save($_POST["html"]); + $xoopsDB->query("update ".$xoopsDB->prefix("gmap_points")." set map_id='$map_id', title='$title', lat='$lat', lon='$lon',zoom='$zoom',html='$html', status=2, date=".time()." where id=".$_POST['lid']."") or $eh->show("0013"); + redirect_header("index.php",1,_MD_DBUPDATED); + exit(); +} + +//Delete a Category + +function delCat() +{ + global $xoopsDB, $eh, $xoopsModule; + $sql = sprintf("DELETE FROM %s WHERE map_id = %u", $xoopsDB->prefix("gmap_category"), $_GET['lid']); + $xoopsDB->query($sql) or $eh->show("0013"); + redirect_header("index.php",1,_MD_CATDELETED); + exit(); +} + +//Delete a point + +function delPoint() +{ + global $xoopsDB, $eh, $xoopsModule; + $sql = sprintf("DELETE FROM %s WHERE id = %u", $xoopsDB->prefix("gmap_points"), $_GET['lid']); + $xoopsDB->query($sql) or $eh->show("0013"); + redirect_header("index.php",1,_MD_POINTDELETED); + exit(); +} + +//Add a new polyline + +function plAdd() +{ + + global $xoopsDB; + $result2 = $xoopsDB->query("select count(*) from ".$xoopsDB->prefix("gmap_points").""); + list($numrows2) = $xoopsDB->fetchRow($result2); + if ( $numrows2 > 1 ) { + $result1 = $xoopsDB->query("select id, title from ".$xoopsDB->prefix("gmap_points").""); + $i = 0; + while ($array = $xoopsDB->fetchArray($result1)) { + $entry[$i]['id'] = $array['id']; + $entry[$i]['title'] = $array['title']; + $i++; + } + $result3 = $xoopsDB->query("select map_id, name from ".$xoopsDB->prefix("gmap_category").""); + $i = 0; + while ($array = $xoopsDB->fetchArray($result3)) { + $centry[$i]['map_id'] = $array['map_id']; + $centry[$i]['name'] = $array['name']; + $i++; + } + xoops_cp_header(); + echo "<table width='100%' class='outer' cellspacing='1'><tr><th colspan='2'>"._MD_PLADD."</th></tr>"; + echo "<form method=post action=\"main.php\">\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_PLID1."</td>"; + echo "<td class='even'><select size='1' name='lid'>"; + echo "<option value=' '>------</option>"; + $count_msg = count($entry); + for ( $i = 0; $i < $count_msg; $i++ ) { + echo "<option value='".$entry[$i]['id']."'>".$entry[$i]['title']."</option>"; + } + echo "</select></td></tr>\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_PLID2."</td>"; + echo "<td class='even'><select size='1' name='lid2'>"; + echo "<option value=' '>------</option>"; + $count_msg = count($entry); + for ( $i = 0; $i < $count_msg; $i++ ) { + echo "<option value='".$entry[$i]['id']."'>".$entry[$i]['title']."</option>"; + } + echo "</select></td></tr>\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_CATEGORYC."</td>"; + echo "<td class='even'><select size='1' name='map_id'>"; + $count_msg = count($centry); + for ( $i = 0; $i < $count_msg; $i++ ) { + echo "<option value='".$centry[$i]['map_id']."'>".$centry[$i]['name']."</option>"; + } + echo "</select></td></tr>\n"; + echo "<input type=hidden name=fct value=mypoints>\n"; + echo "<input type=hidden name=op value=plInsert><br /><br />\n"; + echo "<tr valign='top' align='left'><td class='head'></td><td class='even'><input type='submit' class='formButton' name='post' id='post' value='"._MD_ADD."' accesskey=\"s\" /></form></td></tr></table>"; + xoops_cp_footer(); + }else{ + redirect_header("index.php",1,_MD_NOPOINTS); + } +} + +//Insert the polyline into the DB + +function plInsert() +{ + global $xoopsConfig, $xoopsDB, $myts, $xoopsUser, $xoopsModule, $eh; + $point_id1 = $_POST["lid"]; + $point_id2 = $_POST["lid2"]; + $map_id = $_POST["map_id"]; + $errormsg = ''; + // Check if point exists + if ( $point_id1 == "" | $point_id2 == "") { + $errormsg .= "<h4 style='color: #ff0000'>"; + $errormsg .= _MD_ERRORPOINT."</h4>"; + $error =1; + } + + + if ( $error == 1 ) { + xoops_cp_header(); + echo $errormsg; + xoops_cp_footer(); + exit(); + } + $sql = "INSERT INTO ".$xoopsDB->prefix("gmap_pl")." (`map_id` , `point_id1` , `point_id2`, `active`) VALUES ('$map_id', '$point_id1', '$point_id2', '1')"; + $xoopsDB->query($sql) or $eh->show("0013"); + redirect_header("main.php?op=linksConfigMenu",1,_MD_NEWPLADDED); +} + +//modify a polyline select page + +function plMod() +{ + + global $xoopsDB; + $result2 = $xoopsDB->query("select count(*) from ".$xoopsDB->prefix("gmap_pl").""); + list($numrows2) = $xoopsDB->fetchRow($result2); + if ( $numrows2 > 0 ) { + $result1 = $xoopsDB->query("select * from ".$xoopsDB->prefix("gmap_pl").""); + $i = 0; + while ($array = $xoopsDB->fetchArray($result1)) { + $entry[$i]['id'] = $array['id']; + $entry[$i]['point_id1'] = $array['point_id1']; + $result3 = $xoopsDB->query("select title from ".$xoopsDB->prefix("gmap_points")." WHERE id = ".$entry[$i]['point_id1'].""); + list($title) = $xoopsDB->fetchRow($result3); + $entry[$i]['point_name1'] = $title; + $entry[$i]['point_id2'] = $array['point_id2']; + $result4 = $xoopsDB->query("select title from ".$xoopsDB->prefix("gmap_points")." WHERE id = ".$entry[$i]['point_id2'].""); + list($title) = $xoopsDB->fetchRow($result4); + $entry[$i]['point_name2']= $title; + $i++; + } + xoops_cp_header(); + echo "<table width='100%' class='outer' cellspacing='1'><tr><th colspan='2'>"._MD_MODPL."</th></tr>"; + echo "<form method=get action=\"main.php\">\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_PLID."</td>"; + echo "<td class='even'><select size='1' name='lid'>"; + echo "<option value=' '>------</option>"; + $count_msg = count($entry); + for ( $i = 0; $i < $count_msg; $i++ ) { + echo "<option value='".$entry[$i]['id']."'>".$entry[$i]['point_name1']." -> ".$entry[$i]['point_name2']."</option>"; + } + echo "</select></td></tr>\n"; + echo "<input type=hidden name=fct value=mypoints>\n"; + echo "<input type=hidden name=op value=modPl><br /><br />\n"; + echo "<tr valign='top' align='left'><td class='head'></td><td class='even'><input type='submit' class='formButton' name='post' id='post' value='"._MD_MODIFY."' accesskey=\"s\" /></form></td></tr></table>"; + xoops_cp_footer(); + }else{ + redirect_header("index.php",1,_MD_NOPOINTS); + } + +} + +// Modify the polyline page + +function modPl() +{ + global $xoopsDB, $myts, $eh, $mytree, $xoopsConfig, $xoopsModuleConfig; + $lid = $_GET['lid']; + $result = $xoopsDB->query("select * from ".$xoopsDB->prefix("gmap_pl")." where id=$lid") or $eh->show("0013"); + list($id, $map_id, $point_id1, $point_id2) = $xoopsDB->fetchRow($result); + $result1 = $xoopsDB->query("select map_id, name from ".$xoopsDB->prefix("gmap_category").""); + $i = 0; + while ($array = $xoopsDB->fetchArray($result1)) { + $centry[$i]['map_id'] = $array['map_id']; + $centry[$i]['name'] = $array['name']; + $i++; + } + $result2 = $xoopsDB->query("select id, title from ".$xoopsDB->prefix("gmap_points").""); + $i = 0; + while ($array = $xoopsDB->fetchArray($result2)) { + $pentry[$i]['id'] = $array['id']; + $pentry[$i]['title'] = $array['title']; + $i++; + } + xoops_cp_header(); + echo "<table width='100%' class='outer' cellspacing='1'><tr><th colspan='2'>"._MD_MODPL."</th></tr>"; + echo "<form method=post action=\"index.php\">\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_PLID1."</td>"; + echo "<td class='even'><select size='1' name='lid'>"; + echo "<option value=' '>------</option>"; + $count_msg = count($pentry); + for ( $i = 0; $i < $count_msg; $i++ ) { + if ( $point_id1 == $pentry[$i]['id'] ) { + $opt_selected = "selected='selected'"; + }else{ + $opt_selected = ""; + } + echo "<option value='".$pentry[$i]['id']."' $opt_selected>".$pentry[$i]['title']."</option>"; + } + echo "</select></td></tr>\n"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_PLID2."</td>"; + echo "<td class='even'><select size='1' name='lid2'>"; + echo "<option value=' '>------</option>"; + $count_msg = count($pentry); + for ( $i = 0; $i < $count_msg; $i++ ) { + if ( $point_id2 == $pentry[$i]['id'] ) { + $opt_selected = "selected='selected'"; + }else{ + $opt_selected = ""; + } + echo "<option value='".$pentry[$i]['id']."' $opt_selected>".$pentry[$i]['title']."</option>"; + } + echo "</select></td></tr>"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_CATEGORYC."</td>"; + echo "<td class='even'><select size='1' name='map_id'>"; + $count_msg = count($centry); + for ( $i = 0; $i < $count_msg; $i++ ) { + if ( $map_id == $centry[$i]['map_id'] ) { + $opt_selected = "selected='selected'"; + }else{ + $opt_selected = ""; + } + echo "<option value='".$centry[$i]['map_id']."' $opt_selected>".$centry[$i]['name']."</option>"; + } + echo "</select></td></tr>\n"; + echo "<input type=hidden name=fct value=mypoints>\n"; + echo "<input type=hidden name=id value=$lid></input>\n"; + echo "<input type=hidden name=op value=modPlS><br /><br />\n"; + echo "<tr valign='top' align='left'><td class='head'></td><td class='even'><table><tr><td class='even'><input type='submit' class='formButton' name='post' id='post' value='"._MD_MODIFY."' accesskey=\"s\" /></form></td>"; + echo "<td class='even'>".myTextForm("main.php?op=delPl&lid=".$lid , _MD_DELETE)."</td>"; + echo "<td class='even'>".myTextForm("main.php?op=linksConfigMenu", _MD_CANCEL)."</td>"; + echo "</tr></table></td></tr></table>"; + xoops_cp_footer(); +} + +//submit the polyline to the DB + +function modPlS() +{ + global $xoopsDB, $myts, $eh; + $point_id1 = $_POST["lid"]; + $point_id2 = $_POST["lid2"]; + $map_id = $_POST["map_id"]; + $xoopsDB->query("update ".$xoopsDB->prefix("gmap_pl")." set map_id='$map_id', point_id1='$point_id1', point_id2='$point_id2', active=2 where id=".$_POST_['id']."") or $eh->show("0013"); + redirect_header("index.php",1,_MD_DBUPDATED); + exit(); +} + +//Delete a polyline + +function delPl() +{ + global $xoopsDB, $eh, $xoopsModule; + $sql = sprintf("DELETE FROM %s WHERE id = %u", $xoopsDB->prefix("gmap_pl"), $_GET['lid']); + $xoopsDB->query($sql) or $eh->show("0013"); + redirect_header("index.php",1,_MD_POINTDELETED); + exit(); +} + +//Order a Category + +function catOrder() +{ +global $xoopsDB,$myts, $eh; +$result = $xoopsDB->query("select `map_id`, `name`, `order` from ".$xoopsDB->prefix("gmap_category")." ORDER BY `order` ASC") or $eh->show("0013"); +$i = 0; + while ($array = $xoopsDB->fetchArray($result)) { + $entry[$i]['id'] = $array['map_id']; + $entry[$i]['name'] = $array['name']; + $entry[$i]['order'] = $array['order']; + $i++; + } +xoops_cp_header(); + echo"<table width='100%' class='outer' cellspacing='1'><tr><th colspan='2'>"._MD_CATORDER."</th></tr>"; + echo "<form method=post action=main.php>"; + + $count_msg = count($entry); + echo "<input type=hidden name=count value='".$count_msg."'>"; + for ( $i = 0; $i < $count_msg; $i++ ) { + echo "<tr valign='top' align='left'><td class='head'>".$entry[$i]['name']."</td><td class='even'><input type=text name=order".$i." value=".$entry[$i]['order']." size=3 maxlength=100></input></td></tr>\n"; + echo "<input type=hidden name=id".$i." value=".$entry[$i]['id'].">\n"; + } +echo "<input type=hidden name=op value=catOrderS>"; +echo "<tr valign='top' align='left'><td class='head'></td><td class='even'><input type='submit' class='formButton' name='post' id='post' value='"._MD_MODIFY."' accesskey=\"s\" /></form></td></tr></table>"; + xoops_cp_footer(); +} + +//Order a Category into the DB + +function catOrderS() +{ + global $xoopsDB, $myts, $eh; + + $count_msg = $_POST["count"]; + for ( $i = 0; $i < $count_msg; $i++ ) { + $id = $_POST["id".$i]; + $order = $_POST["order".$i]; + $xoopsDB->query("update ".$xoopsDB->prefix("gmap_category")." set `order`='$order' where map_id='$id'") or $eh->show("0013"); + } + redirect_header("index.php",1,_MD_DBUPDATED); + exit(); +} + +//Order a Point + +function pointOrder() +{ + global $xoopsDB,$myts, $eh; + if ($_POST['map_id'] != ""){ + $map_id = $_POST['map_id']; + $result = $xoopsDB->query("select `id`, `title`, `order` from ".$xoopsDB->prefix("gmap_points")." WHERE `map_id` = ".$map_id." ORDER BY `order` ASC") or $eh->show("0013"); + } + $i = 0; + while ($array = $xoopsDB->fetchArray($result)) { + $entry[$i]['id'] = $array['id']; + $entry[$i]['title'] = $array['title']; + $entry[$i]['order'] = $array['order']; + $i++; + } + $result1 = $xoopsDB->query("select map_id, name from ".$xoopsDB->prefix("gmap_category").""); + $i = 0; + while ($array = $xoopsDB->fetchArray($result1)) { + $centry[$i]['map_id'] = $array['map_id']; + $centry[$i]['name'] = $array['name']; + $i++; + } + xoops_cp_header(); + echo"<table width='100%' class='outer' cellspacing='1'><tr><th colspan='2'>"._MD_POINTORDER."</th></tr>"; + echo "<form method=post action=main.php>"; + echo "<tr valign='top' align='left'><td class='head'>"._MD_CATEGORYC."</td>"; + $count_msg = count($entry); + echo "<td class='even'><input type=hidden name=op value=pointOrder><select size='1' onchange=\"JavaScript:submit()\" name='map_id'>"; + echo "<option value=' '>------</option>"; + $count_msg2 = count($centry); + for ( $i = 0; $i < $count_msg2; $i++ ) { + if ( $map_id == $centry[$i]['map_id'] ) { + $opt_selected = "selected='selected'"; + }else{ + $opt_selected = ""; + } + echo "<option value='".$centry[$i]['map_id']."' $opt_selected >".$centry[$i]['name']."</option>"; + } + echo "</select></td></tr></form>"; + echo "<form method=post action=main.php>"; + echo "<input type=hidden name=count value='".$count_msg."'>"; + for ( $i = 0; $i < $count_msg; $i++ ) { + echo "<tr valign='top' align='left'><td class='head'>".$entry[$i]['title']."</td><td class='even'><input type=text name=order".$i." value=".$entry[$i]['order']." size=3 maxlength=100></input><input type=hidden name=id".$i." value=".$entry[$i]['id']."></td></tr>\n"; + } + echo "<input type=hidden name=op value=pointOrderS>"; + echo "<tr valign='top' align='left'><td class='head'></td><td class='even'><input type='submit' class='formButton' name='post' id='post' value='"._MD_MODIFY."' accesskey=\"s\" /></form></td></tr></table>"; + xoops_cp_footer(); +} + +//Submit the ordered point to the DB + +function pointOrderS() +{ + global $xoopsDB, $myts, $eh; + + $count_msg = $_POST["count"]; + for ( $i = 0; $i < $count_msg; $i++ ) { + $id = $_POST["id".$i]; + $order = $_POST["order".$i]; + $xoopsDB->query("update ".$xoopsDB->prefix("gmap_points")." set `order`='$order' where id='$id'") or $eh->show("0013"); + } + redirect_header("index.php",1,_MD_DBUPDATED); + exit(); +} + +if(!isset($_POST['op'])) { + $op = isset($_GET['op']) ? $_GET['op'] : 'main'; +} else { + $op = $_POST['op']; +} +switch ($op) { +case "catAdd": + catAdd(); + break; +case "catInsert": + catInsert(); + break; +case "pointAdd": + pointAdd(); + break; +case "pointInsert": + pointInsert(); + break; +case "plAdd": + plAdd(); + break; +case "plInsert": + plInsert(); + break; +case "plMod": + plMod(); + break; +case "modPl": + modPl(); + break; +case "modPlS": + modPlS(); + break; +case "pointMod": + pointMod(); + break; +case "modPoint": + modPoint(); + break; +case "modPointS": + modPointS(); + break; +case "catMod": + catMod(); + break; +case "modCat": + modCat(); + break; +case "modCatS": + modCatS(); + break; +case "delCat": + delCat(); + break; +case "delPoint": + delPoint(); + break; +case "delPl": + delPl(); + break; +case "pointDel": + pointDel(); + break; +case "pointOrder": + pointOrder(); + break; +case "pointOrderS": + pointOrderS(); + break; +case "catOrder": + catOrder(); + break; +case "catOrderS": + catOrderS(); + break; +case 'main': +default: + main(); + break; +} +?> Added: XoopsModules/googlemaps/trunk/googlemaps/admin/menu.php =================================================================== --- XoopsModules/googlemaps/trunk/googlemaps/admin/menu.php (rev 0) +++ XoopsModules/googlemaps/trunk/googlemaps/admin/menu.php 2012-03-18 06:09:54 UTC (rev 9151) @@ -0,0 +1,84 @@ +<?php +############################################################################### +# Phatblokes adaption of google maps v.1.0 for Xoops 2.x # +# Writen by Phatbloke (pha...@wo...) # +# ------------------------------------------------------------------------- # +# # +# ------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# ------------------------------------------------------------------------ # +############################################################################### + + +defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined"); + +$dirname = basename(dirname(dirname(__FILE__))); +$module_handler = xoops_gethandler('module'); +$module = $module_handler->getByDirname($dirname); +$pathIcon32 = $module->getInfo('icons32'); + +xoops_loadLanguage('admin', $dirname); + +$i = 0; + +// Index +$adminmenu[$i]['title'] = _MI_GMAPS_ADMENU0; +$adminmenu[$i]['link'] = "admin/index.php"; +$adminmenu[$i]["icon"] = $pathIcon32.'/home.png'; +$i++; + +$adminmenu[$i]['title'] = _MI_GMAPS_ADMENU2; +$adminmenu[$i]['link'] = "admin/main.php?op=catAdd"; +$adminmenu[$i]["icon"] = $pathIcon32.'/category.png'; + +$i++; +$adminmenu[$i]['title'] = _MI_GMAPS_ADMENU3; +$adminmenu[$i]['link'] = "admin/main.php?op=catMod"; +$adminmenu[$i]["icon"] = $pathIcon32.'/manage.png'; + +$i++; +$adminmenu[$i]['title'] = _MI_GMAPS_ADMENU4; +$adminmenu[$i]['link'] = "admin/main.php?op=catOrder"; +$adminmenu[$i]["icon"] = './images/icons/32/categorysort.png'; + +$i++; +$adminmenu[$i]['title'] = _MI_GMAPS_ADMENU5; +$adminmenu[$i]['link'] = "admin/main.php?op=pointAdd"; +$adminmenu[$i]["icon"] = $pathIcon32.'/add.png'; + +$i++; +$adminmenu[$i]['title'] = _MI_GMAPS_ADMENU6; +$adminmenu[$i]['link'] = "admin/main.php?op=pointMod"; +$adminmenu[$i]["icon"] = $pathIcon32.'/manage.png'; + +$i++; +$adminmenu[$i]['title'] = _MI_GMAPS_ADMENU7; +$adminmenu[$i]['link'] = "admin/main.php?op=pointOrder"; +$adminmenu[$i]["icon"] = $pathIcon32.'/compfile.png'; + +$i++; +$adminmenu[$i]['title'] = _MI_GMAPS_ADMENU8; +$adminmenu[$i]['link'] = "admin/main.php?op=plAdd"; +$adminmenu[$i]["icon"] = $pathIcon32.'/add.png'; + +$i++; +$adminmenu[$i]['title'] = _MI_GMAPS_ADMENU9; +$adminmenu[$i]['link'] = "admin/main.php?op=plMod"; +$adminmenu[$i]["icon"] = $pathIcon32.'/manage.png'; + +$i++; +$adminmenu[$i]['title'] = _MI_GMAPS_ABOUT; +$adminmenu[$i]['link'] = "admin/about.php"; +$adminmenu[$i]["icon"] = $pathIcon32.'/about.png'; \ No newline at end of file Added: XoopsModules/googlemaps/trunk/googlemaps/admin/sqlupdate.php =================================================================== --- XoopsModules/googlemaps/trunk/googlemaps/admin/sqlupdate.php (rev 0) +++ XoopsModules/googlemaps/trunk/googlemaps/admin/sqlupdate.php 2012-03-18 06:09:54 UTC (rev 9151) @@ -0,0 +1,63 @@ +<?php +// $Id: sqlupdate.php,v 1.1 2005/09/03 11:38:11 yoshis Exp $ +// Original Script by aotake , http://xoops.bmath.org/ +// +include('../../../include/cp_header.php'); +if( + (!defined('XOOPS_ROOT_PATH')) || + (!is_object($xoopsUser)) || + (!$xoopsUser->isAdmin()) ){ + exit(); +} +// MODULE/admin/ins_table.php?sqlfilename=$filename + +$sqlfile = "zoom.sql"; // <-- change here if you need. + + +global $xoopsDB; +global $xoopsModule; +$error = false; +$dirname = $xoopsModule->getvar("dirname"); +$db =& $xoopsDB; + +$sql_file_path = XOOPS_ROOT_PATH."/modules/".$dirname."/sql/".$sqlfile; +if (!file_exists($sql_file_path)) { + //$errs[] = "SQL file not found at <b>$sql_file_path</b>"; + //$error = true; + print "SQL file not found at <b>$sql_file_path</b>"; + exit (1); +} else { + $sql=''; + print "SQL file found at <b>$sql_file_path</b>.<br /> adjusting data..."; + include_once XOOPS_ROOT_PATH.'/class/database/sqlutility.php'; + $sql_query = fread(fopen($sql_file_path, 'r')... [truncated message content] |