From: <be...@us...> - 2012-01-21 16:30:36
|
Revision: 8771 http://xoops.svn.sourceforge.net/xoops/?rev=8771&view=rev Author: beckmi Date: 2012-01-21 16:30:26 +0000 (Sat, 21 Jan 2012) Log Message: ----------- Adding Zyspec's branch Added Paths: ----------- XoopsModules/xoopspartners/branches/zyspec/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/about.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/admin_footer.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/admin_header.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/index.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/main.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/menu.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/blocks/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/blocks/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/blocks/partners.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/class/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/class/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/class/partners.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/css/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/css/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/docs/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/docs/changelog.txt XoopsModules/xoopspartners/branches/zyspec/xoopspartners/docs/credits.txt XoopsModules/xoopspartners/branches/zyspec/xoopspartners/docs/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/docs/install.txt XoopsModules/xoopspartners/branches/zyspec/xoopspartners/docs/lang_diff.txt XoopsModules/xoopspartners/branches/zyspec/xoopspartners/docs/licence.txt XoopsModules/xoopspartners/branches/zyspec/xoopspartners/docs/readme.txt XoopsModules/xoopspartners/branches/zyspec/xoopspartners/footer.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/header.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/images/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/images/admin/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/images/admin/about.png XoopsModules/xoopspartners/branches/zyspec/xoopspartners/images/admin/add32.png XoopsModules/xoopspartners/branches/zyspec/xoopspartners/images/admin/help.png XoopsModules/xoopspartners/branches/zyspec/xoopspartners/images/admin/home.png XoopsModules/xoopspartners/branches/zyspec/xoopspartners/images/admin/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/images/admin/index.png XoopsModules/xoopspartners/branches/zyspec/xoopspartners/images/admin/manage.png XoopsModules/xoopspartners/branches/zyspec/xoopspartners/images/admin/xoopsmicrobutton.gif XoopsModules/xoopspartners/branches/zyspec/xoopspartners/images/icons/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/images/icons/delete.png XoopsModules/xoopspartners/branches/zyspec/xoopspartners/images/icons/edit.png XoopsModules/xoopspartners/branches/zyspec/xoopspartners/images/icons/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/images/icons/off.png XoopsModules/xoopspartners/branches/zyspec/xoopspartners/images/icons/on.png XoopsModules/xoopspartners/branches/zyspec/xoopspartners/images/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/images/logo.png XoopsModules/xoopspartners/branches/zyspec/xoopspartners/index.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/join.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/english/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/english/admin.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/english/blocks.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/english/css/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/english/css/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/english/help/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/english/help/help.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/english/help/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/english/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/english/mail_template/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/english/mail_template/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/english/mail_template/join.tpl XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/english/main.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/english/modinfo.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/french/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/french/admin.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/french/blocks.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/french/help/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/french/help/help.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/french/help/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/french/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/french/mail_template/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/french/mail_template/join.tpl XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/french/main.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/french/modinfo.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/spanish/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/spanish/admin.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/spanish/blocks.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/spanish/help/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/spanish/help/help.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/spanish/help/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/spanish/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/spanish/mail_template/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/spanish/mail_template/join.tpl XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/spanish/main.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/language/spanish/modinfo.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/sql/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/sql/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/sql/mysql.sql XoopsModules/xoopspartners/branches/zyspec/xoopspartners/templates/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/templates/blocks/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/templates/blocks/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/templates/blocks/xoopspartners_block_site.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/templates/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/templates/xoopspartners_index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/templates/xoopspartners_join.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/test/ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/test/AddPartner XoopsModules/xoopspartners/branches/zyspec/xoopspartners/test/DeletePartner XoopsModules/xoopspartners/branches/zyspec/xoopspartners/test/EditPartner XoopsModules/xoopspartners/branches/zyspec/xoopspartners/test/SortPartner XoopsModules/xoopspartners/branches/zyspec/xoopspartners/test/SortPartnerAutomatic XoopsModules/xoopspartners/branches/zyspec/xoopspartners/test/ViewPartner XoopsModules/xoopspartners/branches/zyspec/xoopspartners/test/XoopsPartnerSuite XoopsModules/xoopspartners/branches/zyspec/xoopspartners/test/index.html XoopsModules/xoopspartners/branches/zyspec/xoopspartners/test/readme.txt XoopsModules/xoopspartners/branches/zyspec/xoopspartners/vpartner.php XoopsModules/xoopspartners/branches/zyspec/xoopspartners/xoops_version.php Added: XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/about.php =================================================================== --- XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/about.php (rev 0) +++ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/about.php 2012-01-21 16:30:26 UTC (rev 8771) @@ -0,0 +1,29 @@ +<?php +/** + * XoopsPartners 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:: GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html/) + * @package:: XoopsPartners + * @since:: 1.11 + * @author:: Mage, Mamba + * @version:: $Id $ + * + */ + +require 'admin_header.php'; +include '../../../class/xoopsformloader.php'; + +$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/xoopspartners/branches/zyspec/xoopspartners/admin/admin_footer.php =================================================================== --- XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/admin_footer.php (rev 0) +++ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/admin_footer.php 2012-01-21 16:30:26 UTC (rev 8771) @@ -0,0 +1,34 @@ +<?php +/** + * XoopsPartner module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright:: The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license:: http://www.fsf.org/copyleft/gpl.html GNU public license + * @package:: XoopsPartners + * @since:: 1.11 + * @author:: XOOPS Development Team + * @version: $Id $ + **/ + +if (!isset($moduleInfo) || !is_a($moduleInfo, 'XoopsModule')) { + $module_handler =& xoops_gethandler('module'); + $xoopsModule =& XoopsModule::getByDirname('mylinks'); + $moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); + $pathIcon32 = $moduleInfo->getInfo('icons32'); +} + +echo "<div class='adminfooter'>\n" + ." <div style='text-align: center;'>\n" + ." <a href='" . $moduleInfo->getInfo('author_website_url') . "' target='_blank'><img src='" . XOOPS_URL . "/" . $moduleInfo->getInfo("dirmoduleadmin") . "/icons/32/xoopsmicrobutton.gif' alt='" . $xoopsModule->getInfo('author_website_name') . "' title='" . $moduleInfo->getInfo('author_website_name') . "' /></a>\n" + ." </div>\n" + ." " . _AM_XPARTNERS_ADMIN_FOOTER . "\n" + ."</div>"; + +xoops_cp_footer(); \ No newline at end of file Added: XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/admin_header.php =================================================================== --- XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/admin_header.php (rev 0) +++ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/admin_header.php 2012-01-21 16:30:26 UTC (rev 8771) @@ -0,0 +1,49 @@ +<?php +/** + * XoopsPartners module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright:: The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license:: http://www.fsf.org/copyleft/gpl.html GNU public license + * @package:: XoopsPartners + * @subpackage:: admin + * @since:: 1.11 + * @author:: XOOPS Team + * @version:: $Id $ + **/ +require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; +include_once XOOPS_ROOT_PATH . '/include/cp_functions.php'; +require XOOPS_ROOT_PATH . '/include/cp_header.php'; + +//Load languages +$thisModDir = $xoopsModule->getVar('dirname', 'n'); +xoops_loadLanguage('admin', $thisModDir); +xoops_loadLanguage('modinfo', $thisModDir); +xoops_loadLanguage('main', $thisModDir); + +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(_AM_XPARTNERS_ERROR_MODADMIN); + //return false; +} + +$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); +$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); +$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); + +$myts =& MyTextSanitizer::getInstance(); + +if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { + include_once XOOPS_ROOT_PATH . "/class/template.php"; + $xoopsTpl = new XoopsTpl(); +} + +xoops_cp_header(); \ No newline at end of file Added: XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/index.php =================================================================== --- XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/index.php (rev 0) +++ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/index.php 2012-01-21 16:30:26 UTC (rev 8771) @@ -0,0 +1,61 @@ +<?php +// +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +// Author: Raul Recio (AKA UNFOR) // +// Project: The XOOPS Project // +// ------------------------------------------------------------------------- // +/** + * Xoops Headline Administration + * + * @copyright:: The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license:: http://www.fsf.org/copyleft/gpl.html GNU public license + * @package:: xoopsheadline + * @since:: 1.11 + * @author:: Raul Recio (aka UNFOR) + * @version: $Id: $ + */ + +require 'admin_header.php'; +$indexAdmin = new ModuleAdmin(); + +//----------------------- +$xpPartnerHandler =& xoops_getmodulehandler('partners', $xoopsModule->getVar('dirname', 'n')); + +$totalPartners = $xpPartnerHandler->getCount(); +$totalNonActivePartners = $xpPartnerHandler->getCount(new Criteria('status', 0, '=')); +$totalActivePartners = $totalPartners - $totalNonActivePartners; + +$indexAdmin->addInfoBox(_MD_XPARTNERS_DASHBOARD); + +$indexAdmin->addInfoBoxLine(_MD_XPARTNERS_DASHBOARD, "<infolabel>" ._MD_XPARTNERS_TOTALACTIVE. "</infolabel>", $totalActivePartners, 'Green'); +$indexAdmin->addInfoBoxLine(_MD_XPARTNERS_DASHBOARD, "<infolabel>" ._MD_XPARTNERS_TOTALNONACTIVE. "</infolabel>", $totalNonActivePartners, 'Red'); +$indexAdmin->addInfoBoxLine(_MD_XPARTNERS_DASHBOARD, "<infolabel>" ._MD_XPARTNERS_TOTALPARTNERS. "</infolabel><infotext>", $totalPartners."</infotext>"); +//---------------------------- + +echo $indexAdmin->addNavigation('index.php'); +echo $indexAdmin->renderIndex(); + +include 'admin_footer.php'; \ No newline at end of file Added: XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/main.php =================================================================== --- XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/main.php (rev 0) +++ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/main.php 2012-01-21 16:30:26 UTC (rev 8771) @@ -0,0 +1,426 @@ +<?php +// $Id: main.php,v 1.9.4.2 2005/03/29 15:58:18 mithyt2 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: Raul Recio (AKA UNFOR) // +// Project: The XOOPS Project // +// ------------------------------------------------------------------------- // + +require 'admin_header.php'; + +$indexAdmin = new ModuleAdmin(); +$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); + +$del = 0; + +function partnersAdmin() +{ + global $xoopsModule, $indexAdmin, $pathImageIcon; + $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection(); +// $xoopsDB =& Database::getInstance(); + $myts =& MyTextSanitizer::getInstance(); + $xpPartnerHandler =& xoops_getmodulehandler('partners', $xoopsModule->getVar('dirname')); + + echo $indexAdmin->addNavigation('main.php?op=default'); + echo" <form action='main.php' method='post' name='reorderform'>\n" + . " <table style='width: 100%; border-width: 0px; margin: 1px; padding: 0px;' class='outer'>\n" + . " <tr>\n" . " <th style='width: 20%; text-align: center;'>" . _AM_XPARTNERS_TITLE . "</th>\n" + . " <th style='width: 3%; text-align: center;'>" . _AM_XPARTNERS_IMAGE . "</th>\n" . " <th>" + . _AM_XPARTNERS_DESCRIPTION . "</th>\n" . " <th style='width: 3%; text-align: center;'>" + . _AM_XPARTNERS_ACTIVE . "</th>\n" . " <th style='width: 3%; text-align: center;'>" + . _AM_XPARTNERS_WEIGHT . "</th>\n" . " <th style='width: 3%; text-align: center;'>" . _AM_XPARTNERS_HITS + . "</th>\n" . " <th style='width: 3%; text-align: center;'>" . _AM_XPARTNERS_ACTIONS . "</th>\n" + . " </tr>\n"; + + $criteria = new CriteriaCompo(); + $criteria->setSort('status DESC, weight ASC, title'); + $criteria->setOrder('DESC'); + $partnerObjs = $xpPartnerHandler->getAll($criteria); + $class = 'even'; + foreach ($partnerObjs as $partnerObj) { + $url = formatURL($myts->htmlSpecialChars($partnerObj->getVar('url'))); + $image = formatURL($myts->htmlSpecialChars($partnerObj->getVar('image'))); + $title = $myts->htmlSpecialChars($partnerObj->getVar('title')); + $description = $myts->htmlSpecialChars($partnerObj->getVar('description')); + $imageInfo = @getimagesize($partnerObj->getVar('image')); + /* + $result = $xoopsDB->query("SELECT id, hits, url, weight, image, title, description, status FROM ".$xoopsDB->prefix("partners")." ORDER BY status DESC, weight ASC, title DESC"); + $class = 'even'; + while (list($id, $hits, $url, $weight, $image, $title, $description, $status) = $xoopsDB->fetchrow($result)) { + $url = formatURL($myts->htmlSpecialChars($url)); + $image = formatURL($myts->htmlSpecialChars($image)); + $title = $myts->htmlSpecialChars($title); + $description = $myts->htmlSpecialChars($description); + */ + if ($imageInfo = getimagesize($image)) { + $imageWidth = $imageInfo[0]; + $imageHeight = $imageInfo[1]; + $errorMsg = ($imageWidth >= 150 || $imageHeight >= 110) ? "<br />" . _AM_XPARTNERS_IMAGE_ERROR : ''; + } else { + $imageWidth = 150; + $imageHeight = 110; + } + $check1 = $check2 = ""; + if (1 == $partnerObj->getVar('status')) { + $check1 = " selected='selected'"; + } else { + $check2 = " selected='selected'"; + } + echo" <tr>\n" + . " <td class='{$class}' style='width: 20%; text-align: center; vertical-align: middle;'><a href='{$url}' rel='external'>{$title}</a></td>\n" + . " <td class='{$class}' style='width: 3%; text-align: center;'>"; + if (!empty($image)) { + echo "<img src='{$image}' alt='{$title}' style='width: " . intval(.65 * $imageWidth) . "px; height: " . intval(.65 * $imageHeight) . "px;' />{$errorMsg}"; + } else { + echo " "; + } + + echo" </td>\n" . " <td class='{$class}'>{$description}</td>\n" + . " <td class='{$class}' style='width: 3%px; text-align: center;'>\n" + . " <select style='size: 1px;' name='status[" . $partnerObj->getVar('id') + . "]'> <option value='1'{$check1}>" . _YES . "</option><option value='0'{$check2}>" . _NO + . "</option></select>\n" . " <td class='{$class}' style='width: 3%; text-align: center;'>\n" + . " <input type='text' name='weight[" . $partnerObj->getVar('id') . "]' value='" + . $partnerObj->getVar( + 'weight' + ) . "' style='size: 3px; text-align: center;' maxlength='3' />\n" . " </td>\n" + . " <td class='{$class}' style='width: 3%; text-align: center;'>" . $partnerObj->getVar('hits') . "</td>\n" + . " <td class='{$class}' style='width: 3%; text-align: center;'>\n" + + . " <a href='main.php?op=editPartner&id=" . $partnerObj->getVar('id') + . "'><img src='{$pathImageIcon}/edit.png' alt='" . _EDIT . "' title='" . _EDIT . "' /></a>\n" + + . " <a href='main.php?op=delPartner&id=" . $partnerObj->getVar('id') + . "'><img src='{$pathImageIcon}/delete.png' alt='" . _DELETE . "' title='" . _DELETE . "' /></a>\n" + . " </td>\n" . " </tr>\n"; + $class = ($class == 'odd') ? 'even' : 'odd'; + } + unset($partnerObjs); + echo" <tr>\n" . " <td class='foot' colspan='7' style='text-align: right;'>\n" + . " <input type='hidden' name='op' value='reorderPartners' />\n" + . " <input type='button' name='button' onclick=\"location='main.php?op=partnersAdminAdd'\" value='" + . _AM_XPARTNERS_ADD . "' />\n" + . " <input type='button' name='button' onclick=\"location='main.php?op=reorderAutoPartners'\" value='" + . _AM_XPARTNERS_AUTOMATIC_SORT . "' />\n" . " <input type='submit' name='submit' value='" + . _AM_XPARTNERS_REORDER . "' />\n" . " </td>\n" . " </tr>\n" . " </table>\n" . " </form>\n"; + include 'admin_footer.php'; +} + +function reorderPartners($weight=array(), $status=0) +{ + global $xoopsModule, $xoopsDB; + + $partnerHandler =& xoops_getmodulehandler('partners', $xoopsModule->getVar('dirname')); + $partnerCount = $partnerHandler->getCount(); + if ($partnerCount) { + /* + $result = $xoopsDB->query("SELECT id FROM ".$xoopsDB->prefix("partners")); + if ($xoopsDB->getRowsNum($result)) { + */ + foreach ($weight as $id => $order) { + if (intval($id) > 0) { + $order = (intval($order) > 0) ? intval($order) : 0; + $stat = isset($status[$id]) ? intval($status[$id]) : 0; + $thisObj = $partnerHandler->get($id); + if (is_object($thisObj) && count($thisObj)) { + $thisObj->setVars(array('weight' => $order, 'status' => $stat)); + $partnerHandler->insert($thisObj); + unset($thisObj); + } + } + } + redirect_header("main.php?op=default", 1, _AM_XPARTNERS_UPDATED); + } else { + redirect_header("main.php?op=partnersAdminAdd", 2, _AM_XPARTNERS_EMPTYDATABASE, false); + } +} + +function reorderAutoPartners() +{ + global $xoopsModule; + //$xoopsDB =& Database::getInstance(); + $partnerHandler =& xoops_getmodulehandler('partners', $xoopsModule->getVar('dirname')); + $partnerObjs = $partnerHandler->getAll(null, array('weight')); + $partnerCount = count($partnerObjs); + $weight = 0; + if ($partnerCount > 1) { + foreach ($partnerObjs as $thisObj) { + $weight++; + $thisObj->setVar('weight', $weight); + $partnerHandler->insert($thisObj); + unset($thisObj); + } + redirect_header("main.php?op=default", 1, _AM_XPARTNERS_UPDATED); + } else { + redirect_header("main.php?op=partnersAdminAdd", 2, _AM_XPARTNERS_EMPTYDATABASE, false); + } +} + +function partnersAdminAdd() +{ + global $xoopsModule, $indexAdmin, $pathImageIcon, $myts; + $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection(); +// $xoopsDB =& Database::getInstance(); + + echo $indexAdmin->addNavigation('main.php?op=partnersAdminAdd'); + //echo "<h4>"._AM_XPARTNERS_ADD."</h4>"; + include XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + $form = new XoopsThemeForm(_AM_XPARTNERS_ADDPARTNER, "addform", "main.php", "post", true); + $formweight = new XoopsFormText(_AM_XPARTNERS_WEIGHT, "weight", 3, 10, 0); + $formimage = new XoopsFormText(_AM_XPARTNERS_IMAGE, "image", 100, 150, 'http://'); + $formurl = new XoopsFormText(_AM_XPARTNERS_URL, "url", 100, 150, 'http://'); + $formtitle = new XoopsFormText(_AM_XPARTNERS_TITLE, "title", 100, 150); + $formdesc = new XoopsFormTextArea(_AM_XPARTNERS_DESCRIPTION, "description", "", 10, "60"); + $statontxt + = " <img src=". $pathImageIcon .'/on.png'.' '. "alt='" . _AM_XPARTNERS_ACTIVE . "' /> " . _AM_XPARTNERS_ACTIVE + . " "; + $statofftxt + = " <img src=". $pathImageIcon .'/off.png' .' '."alt='" . _AM_XPARTNERS_INACTIVE . "' /> " + . _AM_XPARTNERS_INACTIVE . " "; + $formstat = new XoopsFormRadioYN(_AM_XPARTNERS_STATUS, 'status', 1, $statontxt, $statofftxt); + $opHidden = new XoopsFormHidden("op", "addPartner"); + $submitButton = new XoopsFormButton("", "submit", _AM_XPARTNERS_ADDPARTNER, "submit"); + $form->addElement($formtitle, true); + $form->addElement($formimage); + $form->addElement($formurl, true); + $form->addElement($formweight); + $form->addElement($formdesc, true); + $form->addElement($formstat); + $form->addElement($opHidden); + $form->addElement($submitButton); + $form->display(); + include 'admin_footer.php'; +} + +function addPartner($weight=0, $url, $image, $title, $description, $status=0) +{ + global $xoopsModule, $xoopsDB, $myts; + + $partnerHandler =& xoops_getmodulehandler('partners', $xoopsModule->getVar('dirname')); + $newPartner = $partnerHandler->create(); + + $status = (intval($status) > 0) ? intval($status) : 0; + $weight = (intval($weight) > 0) ? intval($weight) : 0; + $title = isset($title) ? trim($title) : ''; + $url = isset($url) ? trim($url) : ''; + $image = isset($image) ? trim($image) : ''; + $image = $myts->addSlashes(formatURL($image)); + $description = isset($description) ? trim($description) : ''; + if ('' == $title || '' == $url || '' == $description) { + redirect_header('main.php?op=default', 2, _AM_XPARTNERS_BESURE); + } + /* + if (!empty($image)) { + $image_info = @getimagesize($image); + var_dump($image_info); + exit; + if (!$image_info[2]) { + redirect_header("main.php?op=default", 2, _AM_XPARTNERS_NOEXIST . '<br />(' . $image . ')'); + } + } + + if (!empty($image)) { + $image_info = exif_imagetype($image); + if (false === $image_info) { + redirect_header("main.php?op=default", 1, _AM_XPARTNERS_NOEXIST); + } + } + */ + $newPartner->setVar('url', $myts->addSlashes(formatURL($url))); + $newPartner->setVar('image', $image); + $newPartner->setVar('title', $myts->addSlashes($title)); + $newPartner->setVar('description', $myts->addSlashes($description)); + $newPartner->setVar('status', $status); + $newPartner->setVar('weight', $weight); + + if ($GLOBALS['xoopsSecurity']->check() && $partnerHandler->insert($newPartner)) { + /* + $sql = "INSERT INTO ".$xoopsDB->prefix("partners")." VALUES (NULL, ".intval($weight).", 0, '$url', '$image', '$title', '$description', $status)"; + if ($GLOBALS['xoopsSecurity']->check() && $xoopsDB->query($sql)) { + */ + redirect_header("main.php?op=default", 1, _AM_XPARTNERS_UPDATED); + } else { + redirect_header("main.php?op=default", 1, _AM_XPARTNERS_NOTUPDATED . "<br />" . implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()) + ); + } +} + +function editPartner($id=0) +{ + global $xoopsModule, $indexAdmin, $pathImageIcon, $xoopsDB, $myts; + + echo $indexAdmin->addNavigation('main.php?op=default'); + $id = (intval($id) > 0) ? intval($id) : 0; + + //echo "<h4>"._EDIT."</h4>"; + $partnerHandler =& xoops_getmodulehandler('partners', $xoopsModule->getVar('dirname')); + $partnerObj = $partnerHandler->get($id); + if (is_object($partnerObj) && count($partnerObj)) { + /* + $result = $xoopsDB->query("SELECT weight, hits, url, image, title, description, status FROM ".$xoopsDB->prefix("partners")." WHERE id={$id}"); + list($weight, $hits, $url, $image, $title, $description, $status) = $xoopsDB->fetchrow($result); + */ + $partnerVars = $partnerObj->getValues(); + $url = $myts->htmlSpecialChars($partnerVars['url']); + $image = $myts->htmlSpecialChars($partnerVars['image']); + $title = $myts->htmlSpecialChars($partnerVars['title']); + $description = $myts->htmlSpecialChars($partnerVars['description']); + + include XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; + $form = new XoopsThemeForm(_AM_XPARTNERS_EDITPARTNER, "editform", "main.php", "post", true); + $formweight = new XoopsFormText(_AM_XPARTNERS_WEIGHT, "weight", 3, 10, $partnerVars['weight']); + $formhits = new XoopsFormText(_AM_XPARTNERS_HITS, "hits", 3, 10, $partnerVars['hits']); + $formimage = new XoopsFormText(_AM_XPARTNERS_IMAGE, "image", 50, 150, $image); + $formurl = new XoopsFormText(_AM_XPARTNERS_URL, "url", 50, 150, $url); + $formtitle = new XoopsFormText(_AM_XPARTNERS_TITLE, "title", 50, 150, $title); + $formdesc = new XoopsFormTextArea(_AM_XPARTNERS_DESCRIPTION, "description", $description, 10, "100%"); + $statontxt = " <img src='{$pathImageIcon}/on.png' alt='" + . _AM_XPARTNERS_ACTIVE . "' /> " + . _AM_XPARTNERS_ACTIVE . " "; + $statofftxt = " <img src='{$pathImageIcon}/off.png' alt='" + . _AM_XPARTNERS_INACTIVE . "' /> " + . _AM_XPARTNERS_INACTIVE . " "; + + $formstat = new XoopsFormRadioYN(_AM_XPARTNERS_STATUS, 'status', $partnerVars['status'], $statontxt, $statofftxt); + $submitButton = new XoopsFormButton("", "submit", _SUBMIT, "submit"); + $form->addElement($formtitle, true); + $form->addElement($formimage); + $form->addElement($formurl, true); + $form->addElement($formweight); + $form->addElement($formdesc, true); + $form->addElement($formhits); + $form->addElement($formstat); + $form->addElement(new XoopsFormHidden("id", $id)); + $form->addElement(new XoopsFormHidden("op", "updatePartner")); + $form->addElement($submitButton); + $form->display(); + include 'admin_footer.php'; + } else { + redirect_header("main.php?op=default", 2, _AM_XPARTNERS_INVALIDID); + } +} + +function updatePartner($id, $weight, $hits, $url, $image, $title, $description, $status) +{ + global $xoopsModule, $xoopsDB, $myts; + + $title = isset($title) ? trim($title) : ''; + $image = isset($image) ? trim($image) : ''; + $image = $myts->addSlashes(formatURL($image)); + $url = isset($url) ? trim($url) : ''; + $description = isset($description) ? trim($description) : ''; + $id = (isset($id) && intval($id) > 0) ? intval($id) : 0; + $status = isset($status) ? intval($status) : 0; + $weight = isset($weight) ? intval($weight) : 0; + $hits = (isset($hits) && intval($hits) > 0) ? intval($hits) : 0; + if ($title == '' || $url == '' || empty($id) || $description == '') { + redirect_header("main.php?op=edit_partner&id={$id}", 1, _AM_XPARTNERS_BESURE); + } + /* + if (!empty($image)) { + $image_info = exif_imagetype($image);; + if (false === $image_info) { + redirect_header("main.php?op=edit_partner&id={$id}", 1, _AM_XPARTNERS_NOEXIST); + } + } + */ + $partnerHandler =& xoops_getmodulehandler('partners', $xoopsModule->getVar('dirname')); + $partnerObj = $partnerHandler->get($id); + if ($GLOBALS['xoopsSecurity']->check() && is_object($partnerObj) && count($partnerObj)) { + $partnerObj->setVar('url', $myts->addSlashes(formatURL($url))); + $partnerObj->setVar('title', $myts->addSlashes($title)); + $partnerObj->setVar('description', $myts->addSlashes($description)); + $partnerObj->setVar('hits', $hits); + $partnerObj->setVar('weight', $weight); + $partnerObj->setVar('status', $status); + $partnerObj->setVar('image', $image); + $success = $partnerHandler->insert($partnerObj); + if ($success) { + redirect_header("main.php?op=default", 1, _AM_XPARTNERS_UPDATED); + } + } + redirect_header("main.php?op=default", 1, _AM_XPARTNERS_NOTUPDATED . "<br />" . implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); +} + +function delPartner($id, $del = 0) +{ + global $xoopsModule, $indexAdmin, $xoopsDB; + $id = (isset($id) && intval($id)) ? intval($id) : 0; + if ((1 == $del) && ($id > 0)) { + $partnerHandler =& xoops_getmodulehandler('partners', $xoopsModule->getVar('dirname')); + $partnerObj = $partnerHandler->get($id); + if (is_object($partnerObj) && count($partnerObj)) { + if ($partnerHandler->delete($partnerObj)) { + redirect_header("main.php?op=default", 1, _AM_XPARTNERS_UPDATED); + } + } + redirect_header("main.php?op=default", 1, _AM_XPARTNERS_NOTUPDATED); + } else { + echo $indexAdmin->addNavigation('main.php?op=default'); + xoops_confirm(array('op' => 'delPartner', 'id' => intval($id), 'del' => 1), 'main.php', _AM_XPARTNERS_SUREDELETE); + include 'admin_footer.php'; + } +} + +$op = ''; + +$fields = array('op', 'id', 'weight', 'hits', 'url', 'image', 'title', 'description', 'status', 'del'); +foreach ($fields as $field) { + if (isset($_POST[$field])) { + ${$field} = $_POST[$field]; + } +} + +if (isset($_GET['op'])) { + $op = $_GET['op']; + $id = (isset($_GET['id'])) ? intval($_GET['id']) : 0; +} + +switch ($op) { + case "partnersAdminAdd": + partnersAdminAdd(); + break; + case "updatePartner": + updatePartner($id, $weight, $hits, $url, $image, $title, $description, $status); + break; + case "addPartner": + addPartner($weight, $url, $image, $title, $description, $status); + break; + case "delPartner": + delPartner($id, $del); + break; + case "editPartner": + editPartner($id); + break; + case "reorderPartners": + reorderPartners($weight, $status); + break; + case "reorderAutoPartners": + reorderAutoPartners(); + break; + default: + partnersAdmin(); + break; +} \ No newline at end of file Added: XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/menu.php =================================================================== --- XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/menu.php (rev 0) +++ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/admin/menu.php 2012-01-21 16:30:26 UTC (rev 8771) @@ -0,0 +1,53 @@ +<?php +// $Id: menu.php 8212 2011-11-07 04:37:28Z beckmi $ +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +// Author: Raul Recio (AKA UNFOR) // +// Project: The XOOPS Project // +// ------------------------------------------------------------------------- // + +$module_handler =& xoops_gethandler('module'); +$xoopsModule =& XoopsModule::getByDirname('xoopspartners'); +$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); +$pathImageAdmin = $moduleInfo->getInfo('icons32'); + + +$adminmenu = array(); +$i = 1; +$adminmenu[$i]["title"] = _MI_XPARTNERS_MENU_01; +$adminmenu[$i]["link"] = "admin/index.php"; +$adminmenu[$i]["icon"] = '../../'.$pathImageAdmin.'/home.png'; +$i++; +$adminmenu[$i]["title"] = _MI_XPARTNERS_ADMIN_MANAGE; +$adminmenu[$i]["link"] = "admin/main.php?op=default"; +$adminmenu[$i]["icon"] = '../../'.$pathImageAdmin.'/manage.png'; +$i++; +$adminmenu[$i]["title"] = _MI_XPARTNERS_ADMIN_ADDP; +$adminmenu[$i]["link"] = "admin/main.php?op=partnersAdminAdd"; +$adminmenu[$i]["icon"] = '../../'.$pathImageAdmin.'/add.png'; +$i++; +$adminmenu[$i]["title"] = _MI_XPARTNERS_ADMIN_ABOUT; +$adminmenu[$i]["link"] = "admin/about.php"; +$adminmenu[$i]["icon"] = '../../'.$pathImageAdmin.'/about.png'; \ No newline at end of file Added: XoopsModules/xoopspartners/branches/zyspec/xoopspartners/blocks/index.html =================================================================== --- XoopsModules/xoopspartners/branches/zyspec/xoopspartners/blocks/index.html (rev 0) +++ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/blocks/index.html 2012-01-21 16:30:26 UTC (rev 8771) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xoopspartners/branches/zyspec/xoopspartners/blocks/partners.php =================================================================== --- XoopsModules/xoopspartners/branches/zyspec/xoopspartners/blocks/partners.php (rev 0) +++ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/blocks/partners.php 2012-01-21 16:30:26 UTC (rev 8771) @@ -0,0 +1,195 @@ +<?php +// $Id: partners.php,v 1.8 2004/09/11 10:37:46 onokazu 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: Raul Recio (AKA UNFOR) // +// Project: The XOOPS Project // +// ------------------------------------------------------------------------- // + +function b_xoopspartners_show($options) +{ + global $xoopsDB; + $myts =& MyTextSanitizer::getInstance(); + + $block = array(); + $xpDir = basename(dirname(dirname(__FILE__))); + $block['xpDir'] = $xpDir; + + $partner_handler =& xoops_getmodulehandler('partners', $xpDir); + $pFields = array('id', 'url', 'image', 'title', 'description'); + $criteria = new CriteriaCompo(); + $criteria->setLimit($options[3]); + if ($options[2]) { + $criteria->setSort('RAND()'); + } else { + $criteria->setSort($options[5]); + $criteria->setOrder($options[6]); + } + $pObjs = $partner_handler->getAll($criteria, $pFields); + foreach ($pObjs as $pObj) { + $url = $myts->htmlSpecialChars($pObj->getVar('url')); + $origtitle = $pObj->getVar('title'); + $title = $myts->htmlSpecialChars($origtitle); + $description = $myts->htmlSpecialChars($pObj->getVar('description')); + $image = $myts->htmlSpecialChars($pObj->getVar('image')); + //@TODO: make display string length a config option + if (strlen($origtitle) > 19) { + $title = $myts->htmlSpecialChars(substr($origtitle, 0, 19)) . "..."; + } + $partners['id'] = $pObj->getVar('id'); + $partners['url'] = $url; + $partners['description'] = $description; + if (!empty($image) && (1 == $options[4] || 3 == $options[4])) { + $partners['image'] = $image; + } + if (empty($image) || $options[4] == 2 || $options[4] == 3) { + $partners['title'] = $title; + } else { + $partners['title'] = ''; + } + $block['partners'][] = $partners; + } + $block['insertBr'] = (1 == $options[0]) ? true : false; + $block['fadeImage'] = (1 == $options[1]) ? true : false ; + return $block; +} + +/** + * + * Retrieve Random Partners from database + * @param integer $numberPartners + * @param bool $random + * @param string $orden + * @param string $desc + * @deprecated + */ +function xoopspartners_random($numberPartners, $random=true, $orden="", $desc="") +{ + global $xoopsDB; + $GLOBALS['xoopsLogger']->addDeprecated(__FUNCTION__ . "in '/xoopspartners/blocks/partners.php' is deprecated."); + $partnersId = array(); + if ($random) { + $result = $xoopsDB->query("SELECT id FROM " .$xoopsDB->prefix("partners"). " WHERE status = 1 ORDER BY RAND() LIMIT {$numberPartners}"); + $numrows = $xoopsDB->getRowsNum($result); + } else { + $result = $xoopsDB->query("SELECT id FROM " .$xoopsDB->prefix("partners"). " WHERE status = 1 ORDER BY {$orden} {$desc}, LIMIT {$numberPartners}"); + } + while ($ret = $xoopsDB->fetchArray($result)) { + $partnersId[]= $ret['id']; + } + return $partnersId; +} + +function b_xoopspartners_edit($options) +{ + if (0 == $options[0]) { + $chk0no = " checked='checked'"; + $chk0yes = ""; + } else { + $chk0no = ""; + $chk0yes = " checked='checked'"; + } + if (0 == $options[1]) { + $chk1no = " checked='checked'"; + $chk1yes = ""; + } else { + $chk1no = ""; + $chk1yes = " checked='checked'"; + } + if (0 == $options[2]) { + $chk2no = " checked='checked'"; + $chk2yes = ""; + } else { + $chk2no = ""; + $chk2yes = " checked='checked'"; + } + $form = "<table style='border-width: 0px;'>\n" + ." <tr>\n" + ." <td>" . _MB_XPARTNERS_PSPACE . "</td>\n" + ." <td>" + ."<input type='radio' name='options[0]' value='0'{$chk0no} />" . _NO . "" + ."<input type='radio' name='options[0]' value='1'{$chk0yes} />" . _YES . "" + ." </td>\n" + ." </tr>\n" + ." <tr>\n" + ." <td>" . _MB_XPARTNERS_FADE . "</td>\n" + ." <td>" + ."<input type='radio' name='options[1]' value='0'{$chk1no} />" . _NO . "" + ."<input type='radio' name='options[1]' value='1'{$chk1yes} />" . _YES . "</td>\n" + ." </tr>\n" + ." <tr>\n" + ." <td>" . _MB_XPARTNERS_BRAND . "</td>\n" + ." <td>" + ."<input type='radio' name='options[2]' value='0'{$chk2no} />" . _NO . "" + ."<input type='radio' name='options[2]' value='1'{$chk2yes} />" . _YES . "</td>\n" + ." </tr>\n" + ." <tr>\n" + ." <td>" . _MB_XPARTNERS_BLIMIT . "</td>\n" + ." <td><input type='text' name='options[3]' size='16' value='{$options[3]}' /></td>\n" + ." </tr>\n" + ." <tr>\n" + ." <td>" . _MB_XPARTNERS_BSHOW . "</td>\n" + ." <td>\n" + ." <select size='1' name='options[4]'>\n"; + $sel = (1 == $options[4]) ?" selected='selected'" : ""; + $form .= " <option value='1'{$sel}>" . _MB_XPARTNERS_IMAGES . "</option>\n"; + + $sel = (2 == $options[4]) ?" selected='selected'" : ""; + $form .= " <option value='2'{$sel}>" . _MB_XPARTNERS_TEXT . "</option>\n"; + + $sel = (3 == $options[4]) ? " selected='selected'" : ""; + $form .= " <option value='3'{$sel}>" . _MB_XPARTNERS_BOTH . "</option>\n" + . " </select>\n" + . " </td>\n" + . " </tr>\n" + . " <tr>\n" + . " <td>" . _MB_XPARTNERS_BORDER . "</td>\n" + . " <td>\n" + . " <select size='1' name='options[5]'>"; + $sel = ('id' == $options[5]) ?" selected='selected'" : ""; + $form .= " <option value='id'{$sel}>" . _MB_XPARTNERS_ID . "</option>\n"; + + $sel = ('hits' == $options[5]) ? " selected='selected'" : ""; + $form .= " <option value='hits'{$sel}>" . _MB_XPARTNERS_HITS . "</option>\n"; + + $sel = ('title' == $options[5]) ? " selected='selected'" : ""; + $form .= " <option value='title'{$sel}>" . _MB_XPARTNERS_TITLE . "</option>\n"; + + $sel = ('weight' == $options[5]) ? " selected='selected'" : ""; + $form .= " <option value='weight'{$sel}>" . _MB_XPARTNERS_WEIGHT . "</option>\n" + . " </select>\n" + . " <select size='1' name='options[6]'>\n"; + + $sel = ('ASC' == $options[6]) ? " selected='selected'" : ""; + $form .= " <option value='ASC'{$sel}>" . _MB_XPARTNERS_ASC . "</option>\n"; + + $sel = ('DESC' == $options[6]) ? " selected='selected'" : ""; + $form .= " <option value='DESC'{$sel}>" . _MB_XPARTNERS_DESC . "</option>\n" + . " </select>\n" + . " </td>\n" + . " </tr>\n" + . "</table>\n"; + return $form; +} \ No newline at end of file Added: XoopsModules/xoopspartners/branches/zyspec/xoopspartners/class/index.html =================================================================== --- XoopsModules/xoopspartners/branches/zyspec/xoopspartners/class/index.html (rev 0) +++ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/class/index.html 2012-01-21 16:30:26 UTC (rev 8771) @@ -0,0 +1 @@ + <script>history.go(-1);</script> Added: XoopsModules/xoopspartners/branches/zyspec/xoopspartners/class/partners.php =================================================================== --- XoopsModules/xoopspartners/branches/zyspec/xoopspartners/class/partners.php (rev 0) +++ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/class/partners.php 2012-01-21 16:30:26 UTC (rev 8771) @@ -0,0 +1,85 @@ +<?php +// $Id: partners.php,v 1.9.14.1 2005/08/15 15:04:59 skalpa 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: Raul Recio (AKA UNFOR) // +// Project: The XOOPS Project // +// ------------------------------------------------------------------------- // + +defined('XOOPS_ROOT_PATH') or die("Direct file access prohibited."); + +class xoopspartnersPartners extends XoopsObject +{ + var $db; + + /** + * constructor + */ + function __construct($id=null) + { + $this->db =& XoopsDatabaseFactory::getDatabaseConnection(); + + $this->initVar('id', XOBJ_DTYPE_INT, null, false); + $this->initVar('weight', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('hits', XOBJ_DTYPE_INT, null, true, 10); + $this->initVar('url', XOBJ_DTYPE_TXTBOX, null, true); + $this->initVar('image', XOBJ_DTYPE_TXTBOX, null, true); + $this->initVar('title', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('description', XOBJ_DTYPE_TXTBOX, null, true); + $this->initVar('status', XOBJ_DTYPE_INT, null, false, 0); + if (!empty($id)) { + if (is_array($id)) { + $this->assignVars($id); + } else { + $this->load(intval($id)); + } + } + } + + /** + * Returns category title using PHP5 + * @return string + */ + public function __toString() + { + return $this->title; + } +} +/** + * @package kernel + * @copyright copyright © 2000 XOOPS.org + */ +class xoopspartnersPartnersHandler extends XoopsPersistableObjectHandler +{ + public function xoopspartnersPartnersHandler(&$db) + { + $this->__construct($db); + } + + function __construct(&$db) + { + parent::__construct($db, 'partners', 'xoopspartnersPartners', 'id'); + } +} Added: XoopsModules/xoopspartners/branches/zyspec/xoopspartners/css/index.html =================================================================== --- XoopsModules/xoopspartners/branches/zyspec/xoopspartners/css/index.html (rev 0) +++ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/css/index.html 2012-01-21 16:30:26 UTC (rev 8771) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xoopspartners/branches/zyspec/xoopspartners/docs/changelog.txt =================================================================== --- XoopsModules/xoopspartners/branches/zyspec/xoopspartners/docs/changelog.txt (rev 0) +++ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/docs/changelog.txt 2012-01-21 16:30:26 UTC (rev 8771) @@ -0,0 +1,18 @@ +v1.12 2011/06/08 (Mamba) +================================= +- removed all icons files and point them to /Frameworks/moduleclasses +- updated to the latest ModuleAdmin Class + +v1.11 2011/04/15 (Mamba) Internal version +================================= +- moved changelog.txt back to /docs +- added Selenium Tests +- added Dashboard +- added Help +- changed Edit/Delete text links to Icons +- updated GUI to XOOPS Standard Module GUI (mamba) + +v1.10 Raul Recio (AKA UNFOR) +================================= +- Original + Added: XoopsModules/xoopspartners/branches/zyspec/xoopspartners/docs/credits.txt =================================================================== --- XoopsModules/xoopspartners/branches/zyspec/xoopspartners/docs/credits.txt (rev 0) +++ XoopsModules/xoopspartners/branches/zyspec/xoopspartners/docs/credits.txt 2012-01-21 16:30:26 UTC (rev 8771) @@ -0,0 +1,5 @@ +Credits +=============== +Developed by 'Raul Recio'(unfor) + +Updated to XOOPS 2.5.0 Standard GUI by Michael Beck (Mamba), with contributios by Gregory Mage (Mage) Added: XoopsModules/xoopspartners/branches/zyspec/xoopspartners/docs/index.html ================================================... [truncated message content] |