|
From: <be...@us...> - 2013-08-14 01:25:02
|
Revision: 11903
http://sourceforge.net/p/xoops/svn/11903
Author: beckmi
Date: 2013-08-14 01:24:59 +0000 (Wed, 14 Aug 2013)
Log Message:
-----------
Updating to 1.31 Final
Modified Paths:
--------------
XoopsModules/portfolio/trunk/portfolio/admin/admin_footer.php
XoopsModules/portfolio/trunk/portfolio/admin/admin_header.php
XoopsModules/portfolio/trunk/portfolio/blocks/portfolio_recent.php
XoopsModules/portfolio/trunk/portfolio/categos.php
XoopsModules/portfolio/trunk/portfolio/class/object.class.php
XoopsModules/portfolio/trunk/portfolio/class/table.class.php
XoopsModules/portfolio/trunk/portfolio/class/work.class.php
XoopsModules/portfolio/trunk/portfolio/docs/changelog.txt
XoopsModules/portfolio/trunk/portfolio/footer.php
XoopsModules/portfolio/trunk/portfolio/index.php
XoopsModules/portfolio/trunk/portfolio/language/english/admin.php
XoopsModules/portfolio/trunk/portfolio/templates/portfolio_view.html
XoopsModules/portfolio/trunk/portfolio/view.php
XoopsModules/portfolio/trunk/portfolio/xoops_version.php
Modified: XoopsModules/portfolio/trunk/portfolio/admin/admin_footer.php
===================================================================
--- XoopsModules/portfolio/trunk/portfolio/admin/admin_footer.php 2013-08-13 23:10:43 UTC (rev 11902)
+++ XoopsModules/portfolio/trunk/portfolio/admin/admin_footer.php 2013-08-14 01:24:59 UTC (rev 11903)
@@ -1,12 +1,12 @@
-<?php
-
-global $pathIcon32;
-
-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_MODULEADMIN_ADMIN_FOOTER . "\n"
- ."</div>";
-
+<?php
+
+global $pathIcon32;
+
+echo "<div class='adminfooter'>\n"
+ ." <div style='text-align: center;'>\n"
+ ." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
+ ." </div>\n"
+ ." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
+ ."</div>";
+
xoops_cp_footer();
\ No newline at end of file
Modified: XoopsModules/portfolio/trunk/portfolio/admin/admin_header.php
===================================================================
--- XoopsModules/portfolio/trunk/portfolio/admin/admin_header.php 2013-08-13 23:10:43 UTC (rev 11902)
+++ XoopsModules/portfolio/trunk/portfolio/admin/admin_header.php 2013-08-14 01:24:59 UTC (rev 11903)
@@ -1,40 +1,40 @@
-<?php
-
-$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';
-require_once $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();
-}
-
-global $xoopsModule;
-
-$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname');
-
-$mc =& $xoopsModuleConfig;
-$db =& $xoopsDB;
-$myts =& MyTextSanitizer::getInstance();
-
-include 'admin.func.php';
-
-// Load language files
-xoops_loadLanguage('admin', $thisModuleDir);
-xoops_loadLanguage('modinfo', $thisModuleDir);
-xoops_loadLanguage('main', $thisModuleDir);
-
-$pathIcon16 = '../'.$xoopsModule->getInfo('icons16');
-$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
-$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
-
-if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){
- include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
- }else{
- redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false);
+<?php
+
+$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';
+require_once $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();
+}
+
+global $xoopsModule;
+
+$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname');
+
+$mc =& $xoopsModuleConfig;
+$db =& $xoopsDB;
+$myts =& MyTextSanitizer::getInstance();
+
+include 'admin.func.php';
+
+// Load language files
+xoops_loadLanguage('admin', $thisModuleDir);
+xoops_loadLanguage('modinfo', $thisModuleDir);
+xoops_loadLanguage('main', $thisModuleDir);
+
+$pathIcon16 = '../'.$xoopsModule->getInfo('icons16');
+$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
+$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
+
+if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){
+ include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
+ }else{
+ redirect_header("../../../admin.php", 5, _AM_PORTFOLIO_MODULEADMIN_MISSING, false);
}
\ No newline at end of file
Modified: XoopsModules/portfolio/trunk/portfolio/blocks/portfolio_recent.php
===================================================================
--- XoopsModules/portfolio/trunk/portfolio/blocks/portfolio_recent.php 2013-08-13 23:10:43 UTC (rev 11902)
+++ XoopsModules/portfolio/trunk/portfolio/blocks/portfolio_recent.php 2013-08-14 01:24:59 UTC (rev 11903)
@@ -1,128 +1,128 @@
-<?php
-/*******************************************************************
-* $Id: portfolio_recent.php,v 1.0.2 24/05/2006 00:39 BitC3R0 Exp $ *
-* ----------------------------------------------------------- *
-* RMSOFT MyFolder 1.0 *
-* M\xF3dulo para el manejo de un portafolio profesional *
-* CopyRight \xA9 2006. RMSOFT *
-* Autor: BitC3R0 *
-* http://www.redmexico.com.mx *
-* http://www.xoops-mexico.net *
-* -------------------------------------------- *
-* 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 *
-* *
-* ----------------------------------------------------------- *
-* portfolio_recent.php: *
-* Bloques del M\xF3dulo. *
-* Trabajos recientes, destacados y comentarios *
-* de clientes *
-* ----------------------------------------------------------- *
-* @copyright: \xA9 2006. BitC3R0. *
-* @autor: BitC3R0 *
-* @paquete: RMSOFT MyFolder v1.0 *
-* @version: 1.0.2 *
-* @modificado: 24/05/2006 12:39:48 a.m. *
-*******************************************************************/
-
-function portfolio_bk_recent($options){
-
- $db =& XoopsDatabaseFactory::getDatabaseConnection();
- $myts =& MyTextSanitizer::getInstance();
-
- include_once XOOPS_ROOT_PATH.'/modules/portfolio/blocks/functions.php';
-
- $dir = portfolio_get_config('storedir');
- if (substr($dir, strlen($dir) - 1, 1)!='/'){
- $dir .= '/';
- }
- $dir = str_replace(XOOPS_ROOT_PATH, XOOPS_URL, $dir);
-
- $result = $db->query("SELECT * FROM ".$db->prefix("portfolio_works")." ORDER BY id_w DESC LIMIT 0,$options[0]");
- $block = array();
- while ($row = $db->fetchArray($result)){
- $rtn = array();
- $rtn['id'] = $row['id_w'];
- $rtn['titulo'] = $row['titulo'];
- $rtn['img'] = $dir .'ths/'.$row['imagen'];
- $rtn['desc'] = $myts->makeTareaData4Show($row['short']);
- $block['works'][] = $rtn;
- }
- return $block;
-}
-
-function portfolio_bk_recent_edit($options){
- $form = _BK_PORTFOLIO_NUMWORKS."<br /><input type='text' size='5' name='options[]' value='$options[0]' />";
- return $form;
-}
-
-/**
- * Mostramos los comentarios de los clientes
- **/
-function portfolio_bk_comments($options){
- $db =& XoopsDatabaseFactory::getDatabaseConnection();
- $myts =& MyTextSanitizer::getInstance();
- $result = $db->query("SELECT * FROM ".$db->prefix("portfolio_works")." ORDER BY id_w DESC LIMIT 0,$options[0]");
- $block = array();
- while ($row = $db->fetchArray($result)){
- $rtn = array();
- $rtn['id'] = $row['id_w'];
- $rtn['titulo'] = $row['titulo'];
- $rtn['texto'] = $myts->makeTareaData4Show($row['comentario']);
- $rtn['cliente'] = $row['cliente'];
- $block['works'][] = $rtn;
- }
- return $block;
-}
-
-function portfolio_bk_comments_edit($options){
- $form = _BK_PORTFOLIO_NUMCOMMS."<br /><input type='text' size='5' name='options[]' value='$options[0]' />";
- return $form;
-}
-
-/**
- * Mostramos trabajos resaltados
- */
-function portfolio_bk_featured($options){
-
- $db =& XoopsDatabaseFactory::getDatabaseConnection();
- $myts =& MyTextSanitizer::getInstance();
-
- include_once XOOPS_ROOT_PATH.'/modules/portfolio/blocks/functions.php';
-
- $dir = portfolio_get_config('storedir');
- if (substr($dir, strlen($dir) - 1, 1)!='/'){
- $dir .= '/';
- }
- $dir = str_replace(XOOPS_ROOT_PATH, XOOPS_URL, $dir);
-
- $result = $db->query("SELECT * FROM ".$db->prefix("portfolio_works")." WHERE resaltado='1' ORDER BY id_w DESC LIMIT 0,$options[0]");
- $block = array();
- while ($row = $db->fetchArray($result)){
- $rtn = array();
- $rtn['id'] = $row['id_w'];
- $rtn['titulo'] = $row['titulo'];
- $rtn['img'] = $dir .'ths/'.$row['imagen'];
- $rtn['desc'] = $myts->makeTareaData4Show($row['short']);
- $block['works'][] = $rtn;
- }
- return $block;
-}
-
-function portfolio_bk_featured_edit($options){
- $form = _BK_PORTFOLIO_NUMWORKS."<br /><input type='text' size='5' name='options[]' value='$options[0]' />";
- return $form;
-}
+<?php
+/*******************************************************************
+* $Id: portfolio_recent.php,v 1.0.2 24/05/2006 00:39 BitC3R0 Exp $ *
+* ----------------------------------------------------------- *
+* RMSOFT MyFolder 1.0 *
+* M\xF3dulo para el manejo de un portafolio profesional *
+* CopyRight \xA9 2006. RMSOFT *
+* Autor: BitC3R0 *
+* http://www.redmexico.com.mx *
+* http://www.xoops-mexico.net *
+* -------------------------------------------- *
+* 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 *
+* *
+* ----------------------------------------------------------- *
+* portfolio_recent.php: *
+* Bloques del M\xF3dulo. *
+* Trabajos recientes, destacados y comentarios *
+* de clientes *
+* ----------------------------------------------------------- *
+* @copyright: \xA9 2006. BitC3R0. *
+* @autor: BitC3R0 *
+* @paquete: RMSOFT MyFolder v1.0 *
+* @version: 1.0.2 *
+* @modificado: 24/05/2006 12:39:48 a.m. *
+*******************************************************************/
+
+function portfolio_bk_recent($options){
+
+ $db =& XoopsDatabaseFactory::getDatabaseConnection();
+ $myts =& MyTextSanitizer::getInstance();
+
+ include_once XOOPS_ROOT_PATH.'/modules/portfolio/blocks/functions.php';
+
+ $dir = portfolio_get_config('storedir');
+ if (substr($dir, strlen($dir) - 1, 1)!='/'){
+ $dir .= '/';
+ }
+ $dir = str_replace(XOOPS_ROOT_PATH, XOOPS_URL, $dir);
+
+ $result = $db->query("SELECT * FROM ".$db->prefix("portfolio_works")." ORDER BY id_w DESC LIMIT 0,$options[0]");
+ $block = array();
+ while ($row = $db->fetchArray($result)){
+ $rtn = array();
+ $rtn['id'] = $row['id_w'];
+ $rtn['titulo'] = $row['titulo'];
+ $rtn['img'] = $dir .'ths/'.$row['imagen'];
+ $rtn['desc'] = $myts->displayTarea($row['short']);
+ $block['works'][] = $rtn;
+ }
+ return $block;
+}
+
+function portfolio_bk_recent_edit($options){
+ $form = _BK_PORTFOLIO_NUMWORKS."<br /><input type='text' size='5' name='options[]' value='$options[0]' />";
+ return $form;
+}
+
+/**
+ * Mostramos los comentarios de los clientes
+ **/
+function portfolio_bk_comments($options){
+ $db =& XoopsDatabaseFactory::getDatabaseConnection();
+ $myts =& MyTextSanitizer::getInstance();
+ $result = $db->query("SELECT * FROM ".$db->prefix("portfolio_works")." ORDER BY id_w DESC LIMIT 0,$options[0]");
+ $block = array();
+ while ($row = $db->fetchArray($result)){
+ $rtn = array();
+ $rtn['id'] = $row['id_w'];
+ $rtn['titulo'] = $row['titulo'];
+ $rtn['texto'] = $myts->displayTarea($row['comentario']);
+ $rtn['cliente'] = $row['cliente'];
+ $block['works'][] = $rtn;
+ }
+ return $block;
+}
+
+function portfolio_bk_comments_edit($options){
+ $form = _BK_PORTFOLIO_NUMCOMMS."<br /><input type='text' size='5' name='options[]' value='$options[0]' />";
+ return $form;
+}
+
+/**
+ * Mostramos trabajos resaltados
+ */
+function portfolio_bk_featured($options){
+
+ $db =& XoopsDatabaseFactory::getDatabaseConnection();
+ $myts =& MyTextSanitizer::getInstance();
+
+ include_once XOOPS_ROOT_PATH.'/modules/portfolio/blocks/functions.php';
+
+ $dir = portfolio_get_config('storedir');
+ if (substr($dir, strlen($dir) - 1, 1)!='/'){
+ $dir .= '/';
+ }
+ $dir = str_replace(XOOPS_ROOT_PATH, XOOPS_URL, $dir);
+
+ $result = $db->query("SELECT * FROM ".$db->prefix("portfolio_works")." WHERE resaltado='1' ORDER BY id_w DESC LIMIT 0,$options[0]");
+ $block = array();
+ while ($row = $db->fetchArray($result)){
+ $rtn = array();
+ $rtn['id'] = $row['id_w'];
+ $rtn['titulo'] = $row['titulo'];
+ $rtn['img'] = $dir .'ths/'.$row['imagen'];
+ $rtn['desc'] = $myts->displayTarea($row['short']);
+ $block['works'][] = $rtn;
+ }
+ return $block;
+}
+
+function portfolio_bk_featured_edit($options){
+ $form = _BK_PORTFOLIO_NUMWORKS."<br /><input type='text' size='5' name='options[]' value='$options[0]' />";
+ return $form;
+}
?>
\ No newline at end of file
Modified: XoopsModules/portfolio/trunk/portfolio/categos.php
===================================================================
--- XoopsModules/portfolio/trunk/portfolio/categos.php 2013-08-13 23:10:43 UTC (rev 11902)
+++ XoopsModules/portfolio/trunk/portfolio/categos.php 2013-08-14 01:24:59 UTC (rev 11903)
@@ -1,105 +1,105 @@
-<?php
-/*******************************************************************
-* $Id: view.php,v 1.0.4 24/05/2006 00:52 BitC3R0 Exp $ *
-* ---------------------------------------------------- *
-* RMSOFT MyFolder 1.0 *
-* Módulo para el manejo de un portafolio profesional *
-* CopyRight © 2006. Red México Soft *
-* Autor: BitC3R0 *
-* http://www.redmexico.com.mx *
-* http://www.xoops-mexico.net *
-* -------------------------------------------- *
-* 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 *
-* *
-* ---------------------------------------------------- *
-* view.php: *
-* Información completa de un trabajo *
-* ---------------------------------------------------- *
-* @copyright: © 2006. BitC3R0. *
-* @autor: BitC3R0 *
-* @paquete: RMSOFT GS 2.0 *
-* @version: 1.0.4 *
-* @modificado: 24/05/2006 12:52:24 a.m. *
-*******************************************************************/
-
-include 'header.php';
-
-$id = isset($_GET['id']) ? $_GET['id'] : 0;
-
-if ($id<=0){ header('location: index.php'); die(); }
-
-$xoopsOption['template_main'] = "portfolio_categos.html";
-
-// Cargo las categorias
-$result = $db->query("SELECT * FROM ".$db->prefix("portfolio_categos")." WHERE parent='$id' ORDER BY orden");
-while ($row=$db->fetchArray($result)){
- $tpl->append('categos', array('id'=>$row['id_cat'],'nombre'=>$row['nombre'],'desc'=>$myts->makeTareaData4Show($row['desc'])));
-}
-
-$tpl->assign('lang_works', _PORTFOLIO_WORKS);
-$tpl->assign('lang_view', _PORTFOLIO_VIEWINFO);
-$tpl->assign('lang_categos', _PORTFOLIO_CATEGOS);
-$tpl->assign('lang_featured', _PORTFOLIO_FEATURED);
-$tpl->assign('lang_recent', _PORTFOLIO_RECENTS);
-
-// Cargo los trabajos en la categoria
-$limit = $mc['results'];
-$pag = isset($_GET['pag']) ? $_GET['pag'] : (isset($_POST['pag']) ? $_POST['pag'] : 0);
-if ($pag > 0){ $pag -= 1; }
-$start = $pag * $limit;
-list($num) = $db->fetchRow($db->query("SELECT COUNT(*) FROM ".$db->prefix("portfolio_works")." WHERE catego='$id'"));
-$rtotal = $num;
-$tpages = (int)($num / $limit);
-if (($num % $limit) > 0){ $tpages++; }
-$pactual = $pag + 1;
-
-if ($pactual>$tpages){
- $rest = $pactual - $tpages;
- $pactual = $pactual - $rest + 1;
- $start = ($pactual - 1) * $limit;
-}
-
-
-$result = $db->query("SELECT * FROM ".$db->prefix("portfolio_works")." WHERE catego='$id' ORDER BY id_w DESC LIMIT $start,$limit");
-while ($row=$db->fetchArray($result)){
- $tpl->append('works', array('id'=>$row['id_w'],'titulo'=>$row['titulo'],'desc'=>$myts->makeTareaData4Show($row['short']),'img'=>$row['imagen']));
-}
-
-for ($i=1;$i<=$tpages;$i++){
- $nav .= "<a href='?pag=$i&id=$id'>$i</a>| ";
-}
-
-$tpl->assign('pages', $nav);
-$tpl->assign('lang_pages', _PORTFOLIO_PAGES);
-
-// Cargo los trabajos destacados
-$result = $db->query("SELECT * FROM ".$db->prefix("portfolio_works")." WHERE catego='$id' AND resaltado='1' ORDER BY id_w DESC LIMIT 0,$mc[featured]");
-while ($row=$db->fetchArray($result)){
- $tpl->append('destacados', array('id'=>$row['id_w'],'titulo'=>$row['titulo'],'desc'=>$myts->makeTareaData4Show($row['short']),'img'=>$row['imagen']));
-}
-
-$result = $db->query("SELECT * FROM ".$db->prefix("portfolio_works")." WHERE catego='$id' ORDER BY id_w DESC LIMIT 0,$mc[recents]");
-while ($row=$db->fetchArray($result)){
- $tpl->append('recientes', array('id'=>$row['id_w'],'titulo'=>$row['titulo'],'desc'=>$myts->makeTareaData4Show($row['short']),'img'=>$row['imagen']));
-}
-
-$tpl->assign('footer', portfolio_make_footer(false));
-
-// Creamos la barra de navegacion
-$tpl->assign('localize_bar', ":: <a href='index.php'>$mc[title]</a>" . portfolio_localize($id, 0));
-
-include 'footer.php';
+<?php
+/*******************************************************************
+* $Id: view.php,v 1.0.4 24/05/2006 00:52 BitC3R0 Exp $ *
+* ---------------------------------------------------- *
+* RMSOFT MyFolder 1.0 *
+* Módulo para el manejo de un portafolio profesional *
+* CopyRight © 2006. Red México Soft *
+* Autor: BitC3R0 *
+* http://www.redmexico.com.mx *
+* http://www.xoops-mexico.net *
+* -------------------------------------------- *
+* 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 *
+* *
+* ---------------------------------------------------- *
+* view.php: *
+* Información completa de un trabajo *
+* ---------------------------------------------------- *
+* @copyright: © 2006. BitC3R0. *
+* @autor: BitC3R0 *
+* @paquete: RMSOFT GS 2.0 *
+* @version: 1.0.4 *
+* @modificado: 24/05/2006 12:52:24 a.m. *
+*******************************************************************/
+
+$xoopsOption['template_main'] = 'portfolio_categos.html';
+include 'header.php';
+
+$id = isset($_GET['id']) ? $_GET['id'] : 0;
+
+if ($id<=0){ header('location: index.php'); die(); }
+
+// Cargo las categorias
+$result = $db->query("SELECT * FROM ".$db->prefix("portfolio_categos")." WHERE parent='$id' ORDER BY orden");
+while ($row=$db->fetchArray($result)){
+ $tpl->append('categos', array('id'=>$row['id_cat'],'nombre'=>$row['nombre'],'desc'=>$myts->displayTarea($row['desc'],1,1,1,1,1)));
+}
+
+$tpl->assign('lang_works', _PORTFOLIO_WORKS);
+$tpl->assign('lang_view', _PORTFOLIO_VIEWINFO);
+$tpl->assign('lang_categos', _PORTFOLIO_CATEGOS);
+$tpl->assign('lang_featured', _PORTFOLIO_FEATURED);
+$tpl->assign('lang_recent', _PORTFOLIO_RECENTS);
+
+$nav = 0;
+// Cargo los trabajos en la categoria
+$limit = $mc['results'];
+$pag = isset($_GET['pag']) ? $_GET['pag'] : (isset($_POST['pag']) ? $_POST['pag'] : 0);
+if ($pag > 0){ $pag -= 1; }
+$start = $pag * $limit;
+list($num) = $db->fetchRow($db->query("SELECT COUNT(*) FROM ".$db->prefix("portfolio_works")." WHERE catego='$id'"));
+$rtotal = $num;
+$tpages = (int)($num / $limit);
+if (($num % $limit) > 0){ $tpages++; }
+$pactual = $pag + 1;
+
+if ($pactual>$tpages){
+ $rest = $pactual - $tpages;
+ $pactual = $pactual - $rest + 1;
+ $start = ($pactual - 1) * $limit;
+}
+
+
+$result = $db->query("SELECT * FROM ".$db->prefix("portfolio_works")." WHERE catego='$id' ORDER BY id_w DESC LIMIT $start,$limit");
+while ($row=$db->fetchArray($result)){
+ $tpl->append('works', array('id'=>$row['id_w'],'titulo'=>$row['titulo'],'desc'=>$myts->displayTarea($row['short']),'img'=>$row['imagen']));
+}
+
+for ($i=1;$i<=$tpages;$i++){
+ $nav .= "<a href='?pag=$i&id=$id'>$i</a>| ";
+}
+
+$tpl->assign('pages', $nav);
+$tpl->assign('lang_pages', _PORTFOLIO_PAGES);
+
+// Cargo los trabajos destacados
+$result = $db->query("SELECT * FROM ".$db->prefix("portfolio_works")." WHERE catego='$id' AND resaltado='1' ORDER BY id_w DESC LIMIT 0,$mc[featured]");
+while ($row=$db->fetchArray($result)){
+ $tpl->append('destacados', array('id'=>$row['id_w'],'titulo'=>$row['titulo'],'desc'=>$myts->displayTarea($row['short']),'img'=>$row['imagen']));
+}
+
+$result = $db->query("SELECT * FROM ".$db->prefix("portfolio_works")." WHERE catego='$id' ORDER BY id_w DESC LIMIT 0,$mc[recents]");
+while ($row=$db->fetchArray($result)){
+ $tpl->append('recientes', array('id'=>$row['id_w'],'titulo'=>$row['titulo'],'desc'=>$myts->displayTarea($row['short']),'img'=>$row['imagen']));
+}
+
+$tpl->assign('footer', portfolio_make_footer(false));
+
+// Creamos la barra de navegacion
+$tpl->assign('localize_bar', ":: <a href='index.php'>$mc[title]</a>" . portfolio_localize($id, 0));
+
+include 'footer.php';
?>
\ No newline at end of file
Modified: XoopsModules/portfolio/trunk/portfolio/class/object.class.php
===================================================================
--- XoopsModules/portfolio/trunk/portfolio/class/object.class.php 2013-08-13 23:10:43 UTC (rev 11902)
+++ XoopsModules/portfolio/trunk/portfolio/class/object.class.php 2013-08-14 01:24:59 UTC (rev 11903)
@@ -1,148 +1,148 @@
-<?php
-/*******************************************************************
-* $Id: object.class.php,v 1.0.4 24/05/2006 00:41 BitC3R0 Exp $ *
-* ------------------------------------------------------------ *
-* RMSOFT MyFolder 1.0 *
-* M\xF3dulo para el manejo de un portafolio profesional *
-* CopyRight \xA9 2006. RMSOFT *
-* Autor: BitC3R0 *
-* http://www.redmexico.com.mx *
-* http://www.xoops-mexico.net *
-* -------------------------------------------- *
-* 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 *
-* *
-* ------------------------------------------------------------ *
-* object.class.php: *
-* Clase base para los objetos del m\xF3dulo *
-* ------------------------------------------------------------ *
-* @copyright: \xA9 2006. BitC3R0. *
-* @autor: BitC3R0 *
-* @paquete: RMSOFT MyFolder v1.0 *
-* @version: 1.0.4 *
-* @modificado: 24/05/2006 12:41:41 a.m. *
-*******************************************************************/
-
-class MFObject
-{
- var $vars = array();
- var $db = null;
- var $_isNew = false;
- var $_errors = array();
-
- /**
- * Inicializa variables
- */
- function initVar($name,$value=null,$required=false)
- {
- $this->vars[$name] = array('value'=>$value,'required'=>$required);
- }
- /**
- * Establece el valor de una variable
- */
- function setVar($name, $value){
- if (isset($this->vars[$name])){
- $this->vars[$name]['value'] = $value;
- }
- }
- /**
- * Establece varias variables de una vez
- */
- function setVars($arrVars){
- if (!is_array($arrVars)) return;
-
- foreach ($arrVars as $k => $v){
- $this->setVar($k, $v);
- }
- }
- /**
- * Devuelve una variable de nuestro array de variables
- * @param int $value_type Indica el formato del tipo a devolver
- * 0 = Valor normal, 1 = Cadena filtrada
- */
- function getVar($name, $value_type = 0){
- if (!isset($this->vars[$name])){ return ; }
- switch ($value_type){
- case 1: // Formateado
- $myts =& MyTextSanitizer::getInstance();
- return $myts->makeTareaData4Show($this->vars[$name]['value']);
- case 2: // Para guardare
- $myts =& MyTextSanitizer::getInstance();
- return $myts->makeTareaData4Save($this->vars[$name]['value']);
- case 3: // Plano, sin HTML no XoopsCode
- $myts =& MyTextSanitizer::getInstance();
- return $myts->makeTareaData4Show($this->vars[$name]['value'], 0 ,0);
- case 4: // Para editar
- $myts =& MyTextSanitizer::getInstance();
- return $myts->makeTareaData4Edit($this->vars[$name]['value'], 0 ,0);
- case 0:
- default:
- return $this->vars[$name]['value'];
- break;
- }
- }
- /**
- * Devuelve un array asociativo con los valores
- * de las variables
- */
- function getVars(){
- return $this->vars;
- }
- /**
- * Inicializamos un objeto nuevo
- */
- function setNew(){
- $this->_isNew = true;
- }
- function unsetNew(){
- $this->_isNew = false;
- }
- function isNew(){
- return $this->_isNew;
- }
- /**
- * Creamos los errores
- */
- function addError($text){
- $this->_errors[] = $text;
- }
- /**
- * Obtenemos los errores
- */
- function errors($html=true){
- $ret = '';
-
- if (count($this->_errors)<=0){ return; }
-
- if ($html){
-
- $ret .= "<div class='outer' style='padding: 1px;'>";
- foreach ($this->_errors as $k){
- $ret .= "<div class='odd'>$k</div>";
- }
- $ret .= "</div>";
-
- } else {
-
- foreach ($this->_errors as $k){
- $ret .= $k."<br />";
- }
-
- }
-
- return $ret;
- }
-}
+<?php
+/*******************************************************************
+* $Id: object.class.php,v 1.0.4 24/05/2006 00:41 BitC3R0 Exp $ *
+* ------------------------------------------------------------ *
+* RMSOFT MyFolder 1.0 *
+* M�dulo para el manejo de un portafolio profesional *
+* CopyRight � 2006. RMSOFT *
+* Autor: BitC3R0 *
+* http://www.redmexico.com.mx *
+* http://www.xoops-mexico.net *
+* -------------------------------------------- *
+* 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 *
+* *
+* ------------------------------------------------------------ *
+* object.class.php: *
+* Clase base para los objetos del m�dulo *
+* ------------------------------------------------------------ *
+* @copyright: � 2006. BitC3R0. *
+* @autor: BitC3R0 *
+* @paquete: RMSOFT MyFolder v1.0 *
+* @version: 1.0.4 *
+* @modificado: 24/05/2006 12:41:41 a.m. *
+*******************************************************************/
+
+class MFObject extends XoopsObject
+{
+ var $vars = array();
+ var $db = null;
+ var $_isNew = false;
+ var $_errors = array();
+
+ /**
+ * Inicializa variables
+ */
+ function initVar($name,$value=null,$required=false)
+ {
+ $this->vars[$name] = array('value'=>$value,'required'=>$required);
+ }
+ /**
+ * Establece el valor de una variable
+ */
+ function setVar($name, $value){
+ if (isset($this->vars[$name])){
+ $this->vars[$name]['value'] = $value;
+ }
+ }
+ /**
+ * Establece varias variables de una vez
+ */
+ function setVars($arrVars){
+ if (!is_array($arrVars)) return;
+
+ foreach ($arrVars as $k => $v){
+ $this->setVar($k, $v);
+ }
+ }
+ /**
+ * Devuelve una variable de nuestro array de variables
+ * @param int $value_type Indica el formato del tipo a devolver
+ * 0 = Valor normal, 1 = Cadena filtrada
+ */
+ function getVar($name, $value_type = 0){
+ if (!isset($this->vars[$name])){ return ; }
+ switch ($value_type){
+ case 1: // Formateado
+ $myts =& MyTextSanitizer::getInstance();
+ return $myts->displayTarea($this->vars[$name]['value']);
+ case 2: // Para guardare
+ $myts =& MyTextSanitizer::getInstance();
+ return $myts->makeTareaData4Save($this->vars[$name]['value']);
+ case 3: // Plano, sin HTML no XoopsCode
+ $myts =& MyTextSanitizer::getInstance();
+ return $myts->displayTarea($this->vars[$name]['value'], 0 ,0);
+ case 4: // Para editar
+ $myts =& MyTextSanitizer::getInstance();
+ return $myts->makeTareaData4Edit($this->vars[$name]['value'], 0 ,0);
+ case 0:
+ default:
+ return $this->vars[$name]['value'];
+ break;
+ }
+ }
+ /**
+ * Devuelve un array asociativo con los valores
+ * de las variables
+ */
+ function getVars(){
+ return $this->vars;
+ }
+ /**
+ * Inicializamos un objeto nuevo
+ */
+ function setNew(){
+ $this->_isNew = true;
+ }
+ function unsetNew(){
+ $this->_isNew = false;
+ }
+ function isNew(){
+ return $this->_isNew;
+ }
+ /**
+ * Creamos los errores
+ */
+ function addError($text){
+ $this->_errors[] = $text;
+ }
+ /**
+ * Obtenemos los errores
+ */
+ function errors($html=true){
+ $ret = '';
+
+ if (count($this->_errors)<=0){ return; }
+
+ if ($html){
+
+ $ret .= "<div class='outer' style='padding: 1px;'>";
+ foreach ($this->_errors as $k){
+ $ret .= "<div class='odd'>$k</div>";
+ }
+ $ret .= "</div>";
+
+ } else {
+
+ foreach ($this->_errors as $k){
+ $ret .= $k."<br />";
+ }
+
+ }
+
+ return $ret;
+ }
+}
?>
\ No newline at end of file
Modified: XoopsModules/portfolio/trunk/portfolio/class/table.class.php
===================================================================
--- XoopsModules/portfolio/trunk/portfolio/class/table.class.php 2013-08-13 23:10:43 UTC (rev 11902)
+++ XoopsModules/portfolio/trunk/portfolio/class/table.class.php 2013-08-14 01:24:59 UTC (rev 11903)
@@ -1,226 +1,226 @@
-<?php
-/*******************************************************************
-* $Id: table.class.php,v 1.0.2 24/05/2006 00:42 BitC3R0 Exp $ *
-* ----------------------------------------------------------- *
-* RMSOFT MyFolder 1.0 *
-* M\xF3dulo para el manejo de un portafolio profesional *
-* CopyRight \xA9 2006. RMSOFT *
-* Autor: BitC3R0 *
-* http://www.redmexico.com.mx *
-* http://www.xoops-mexico.net *
-* -------------------------------------------- *
-* 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 *
-* *
-* ----------------------------------------------------------- *
-* table.class.php: *
-* Clase para el manejo de tablas HTML *
-* ----------------------------------------------------------- *
-* @copyright: \xA9 2006. BitC3R0. *
-* @autor: BitC3R0 *
-* @paquete: RMSOFT MyFolder v1.0 *
-* @version: 1.0.2 *
-* @modificado: 24/05/2006 12:42:03 a.m. *
-*******************************************************************/
-
-include_once XOOPS_ROOT_PATH.'/modules/portfolio/class/object.class.php';
-
-class MFTable extends MFObject
-{
- var $_rows = array();
- var $_current = array();
- var $_display = false;
-
- function MFTable($display = false){
- $this->initVar('style_table','');
- $this->initVar('style_row','');
- $this->initVar('style_cell','');
- $this->initVar('tbl_class','');
- $this->initVar('row_class','');
- $this->initVar('cell_class','');
- $this->initVar('cycle_cell','');
- $this->initVar('cycle_row','');
-
- $this->setTableClass('outer');
- $this->setRowClass('even,odd',true);
- $this->setCellClass('',false);
- $this->_display = $display;
- $this->_current[0] = 0;
- $this->_current[1] = 0;
- }
-
- /**
- * Modificamos el estilo de la tabla
- */
- function setTableStyle($style){
- $this->setVar('style_table', $style);
- }
- function getTableStyle(){
- return $this->getVar('style_table');
- }
- /**
- * Modificamos el estilo de la fila
- */
- function setRowStyle($style){
- $this->setVar('style_row', $style);
- }
- function getRowStyle(){
- return $this->getVar('style_row');
- }
- /**
- * Modificamos el estilo de la celda
- */
- function setCellStyle($style){
- $this->setVar('style_cell', $style);
- }
- function getCellStyle(){
- return $this->getVar('style_cell');
- }
- /**
- * Modificamos la clase de los elementos
- */
- function setTableClass($class){
- $this->setVar('tbl_class',$class);
- }
- function getTableClass(){
- return $this->getVar('tbl_class');
- }
- /**
- * Modificamos la clase de los elementos
- * @param string $class Nombre de la clase. Puede ser una lista de nombres
- * delimitados por comas
- * @param boolean $cycle Establece si las clases se intercalan
- */
- function setRowClass($class, $cycle=false){
- $this->setVar('row_class',$class);
- $this->setVar('cycle_row', $cycle);
- }
- function getRowClass(){
- return $this->getVar('tbl_class');
- }
- /**
- * Modificamos la clase de los elementos
- * @param string $class Nombre de la clase. Puede ser una lista de nombres
- * delimitados por comas
- * @param boolean $cycle Establece si las clases se intercalan
- */
- function setCellClass($class, $cycle=false){
- $this->setVar('cell_class',$class);
- $this->setVar('cycle_cell', $cycle);
- }
- function getCellClass($class){
- return $this->getVar('cell_class');
- }
- /**
- * Abrimos una tabla
- */
- function openTbl($width = "100%", $align = "center", $spacing = "1", $padding = "0", $border = "0"){
- $rtn = "<table ";
- if ($this->getVar('tbl_class')!=''){
- $rtn .= "class='".$this->getVar('tbl_class')."' ";
- }
- if ($this->getVar('style_table')!=''){
- $rtn .= 'style="'.$this->getVar('style_table').'" ';
- }
- if ($width!=''){ $rtn .= 'width="'.$width.'" '; }
- if ($align!=''){ $rtn .= 'align="'.$align.'" '; }
- if ($spacing!=''){ $rtn .= 'cellspacing="'.$spacing.'" '; }
- if ($padding!=''){ $rtn .= 'cellpadding="'.$padding.'" '; }
- if ($border!=''){ $rtn .= 'border="'.$border.'" '; }
- $rtn .= '>';
- if ($this->_display){
- echo $rtn;
- } else {
- return $rtn;
- }
- }
- /**
- * Cerramos una tabla
- */
- function closeTbl(){
- if ($this->_display){
- echo "</table>";
- } else {
- return "</table>";
- }
- }
- /**
- * Abrimos una celda
- */
- function openRow($align=''){
- $rtn = '<tr';
- if ($align!=''){ $rtn .= ' align="'.$align.'"'; }
- if ($this->getVar('style_row')!=''){ $rtn .= ' style="'.$this->getVar('style_row').'"'; }
- $rtn .= $this->generateClass(0) .">";
- if ($this->_display){
- echo $rtn;
- } else {
- return $rtn;
- }
- }
- function closeRow(){
- if ($this->_display){
- echo "</tr>";
- } else {
- return "</tr>";
- }
- }
- /**
- * Abrimos una celda
- */
- function addCell($texto, $type=0,$colspan='',$align='left',$valign='middle',$width=''){
- $rtn = '';
- if ($type==0){ $rtn = '<td '; } else { $rtn .= '<th '; }
- if ($colspan!=''){ $rtn .= 'colspan="'.$colspan.'" '; }
- if ($align!=''){ $rtn .= 'align="'.$align.'" '; }
- if ($valign!=''){ $rtn .= 'valign="'.$valign.'" '; }
- if ($width!=''){ $rtn .= 'width="'.$width.'" '; }
- if ($this->getVar('style_cell')!=''){ $rtn .= 'style="'.$this->getVar('style_cell').'" '; }
- $rtn .= $this->generateClass(1) .">$texto</td>";
-
- if ($this->_display){
- echo $rtn;
- } else {
- return $rtn;
- }
- }
- /**
- * Generamos la clase para un elemento
- * @param int $q 0 = fila, 1 = celda
- */
- function generateClass($q){
- if ($q==0){
- $cc = $this->getVar('row_class');
- $cy = $this->getVar('cycle_row');
- } else {
- $cc = $this->getVar('cell_class');
- $cy = $this->getVar('cycle_cell');
- }
- if ($cc==''){ return; }
-
- if (!$cy){ return ' class="'.$cc.'"'; }
-
- $class = explode(",",$cc);
- if (count($class)==1){ return $cc; }
- if ($this->_current[$q] >= count($class) - 1){
- $this->_current[$q] = 0;
- } else {
- $this->_current[$q]++;
- }
- return ' class="'.$class[$this->_current[$q]].'"';
- }
-
-}
+<?php
+/*******************************************************************
+* $Id: table.class.php,v 1.0.2 24/05/2006 00:42 BitC3R0 Exp $ *
+* ----------------------------------------------------------- *
+* RMSOFT MyFolder 1.0 *
+* M�dulo para el manejo de un portafolio profesional *
+* CopyRight � 2006. RMSOFT *
+* Autor: BitC3R0 *
+* http://www.redmexico.com.mx *
+* http://www.xoops-mexico.net *
+* -------------------------------------------- *
+* 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 *
+* *
+* ----------------------------------------------------------- *
+* table.class.php: *
+* Clase para el manejo de tablas HTML *
+* ----------------------------------------------------------- *
+* @copyright: � 2006. BitC3R0. *
+* @autor: BitC3R0 *
+* @paquete: RMSOFT MyFolder v1.0 *
+* @version: 1.0.2 *
+* @modificado: 24/05/2006 12:42:03 a.m. *
+*******************************************************************/
+
+include_once XOOPS_ROOT_PATH.'/modules/portfolio/class/object.class.php';
+
+class MFTable extends MFObject
+{
+ var $_rows = array();
+ var $_current = array();
+ var $_display = false;
+
+ function MFTable($display = false){
+ $this->initVar('style_table','');
+ $this->initVar('style_row','');
+ $this->initVar('style_cell','');
+ $this->initVar('tbl_class','');
+ $this->initVar('row_class','');
+ $this->initVar('cell_class','');
+ $this->initVar('cycle_cell','');
+ $this->initVar('cycle_row','');
+
+ $this->setTableClass('outer');
+ $this->setRowClass('even,odd',true);
+ $this->setCellClass('',false);
+ $this->_display = $display;
+ $this->_current[0] = 0;
+ $this->_current[1] = 0;
+ }
+
+ /**
+ * Modificamos el estilo de la tabla
+ */
+ function setTableStyle($style){
+ $this->setVar('style_table', $style);
+ }
+ function getTableStyle(){
+ return $this->getVar('style_table');
+ }
+ /**
+ * Modificamos el estilo de la fila
+ */
+ function setRowStyle($style){
+ $this->setVar('style_row', $style);
+ }
+ function getRowStyle(){
+ return $this->getVar('style_row');
+ }
+ /**
+ * Modificamos el estilo de la celda
+ */
+ function setCellStyle($style){
+ $this->setVar('style_cell', $style);
+ }
+ function getCellStyle(){
+ return $this->getVar('style_cell');
+ }
+ /**
+ * Modificamos la clase de los elementos
+ */
+ function setTableClass($class){
+ $this->setVar('tbl_class',$class);
+ }
+ function getTableClass(){
+ return $this->getVar('tbl_class');
+ }
+ /**
+ * Modificamos la clase de los elementos
+ * @param string $class Nombre de la clase. Puede ser una lista de nombres
+ * delimitados por comas
+ * @param boolean $cycle Establece si las clases se intercalan
+ */
+ function setRowClass($class, $cycle=false){
+ $this->setVar('row_class',$class);
+ $this->setVar('cycle_row', $cycle);
+ }
+ function getRowClass(){
+ return $this->getVar('tbl_class');
+ }
+ /**
+ * Modificamos la clase de los elementos
+ * @param string $class Nombre de la clase. Puede ser una lista de nombres
+ * delimitados por comas
+ * @param boolean $cycle Establece si las clases se intercalan
+ */
+ function setCellClass($class, $cycle=false){
+ $this->setVar('cell_class',$class);
+ $this->setVar('cycle_cell', $cycle);
+ }
+ function getCellClass($class){
+ return $this->getVar('cell_class');
+ }
+ /**
+ * Abrimos una tabla
+ */
+ function openTbl($width = "100%", $align = "center", $spacing = "1", $padding = "0", $border = "0"){
+ $rtn = "<table ";
+ if ($this->getVar('tbl_class')!=''){
+ $rtn .= "class='".$this->getVar('tbl_class')."' ";
+ }
+ if ($this->getVar('style_table')!=''){
+ $rtn .= 'style="'.$this->getVar('style_table').'" ';
+ }
+ if ($width!=''){ $rtn .= 'width="'.$width.'" '; }
+ if ($align!=''){ $rtn .= 'align="'.$align.'" '; }
+ if ($spacing!=''){ $rtn .= 'cellspacing="'.$spacing.'" '; }
+ if ($padding!=''){ $rtn .= 'cellpadding="'.$padding.'" '; }
+ if ($border!=''){ $rtn .= 'border="'.$border.'" '; }
+ $rtn .= '>';
+ if ($this->_display){
+ echo $rtn;
+ } else {
+ return $rtn;
+ }
+ }
+ /**
+ * Cerramos una tabla
+ */
+ function closeTbl(){
+ if ($this->_display){
+ echo "</table>";
+ } else {
+ return "</table>";
+ }
+ }
+ /**
+ * Abrimos una celda
+ */
+ function openRow($align=''){
+ $rtn = '<tr';
+ if ($align!=''){ $rtn .= ' align="'.$align.'"'; }
+ if ($this->getVar('style_row')!=''){ $rtn .= ' style="'.$this->getVar('style_row').'"'; }
+ $rtn .= $this->generateClass(0) .">";
+ if ($this->_display){
+ echo $rtn;
+ } else {
+ return $rtn;
+ }
+ }
+ function closeRow(){
+ if ($this->_display){
+ echo "</tr>";
+ } else {
+ return "</tr>";
+ }
+ }
+ /**
+ * Abrimos una celda
+ */
+ function addCell($texto, $type=0,$colspan='',$align='left',$valign='middle',$width=''){
+ $rtn = '';
+ if ($type==0){ $rtn = '<td '; } else { $rtn .= '<th '; }
+ if ($colspan!=''){ $rtn .= 'colspan="'.$colspan.'" '; }
+ if ($align!=''){ $rtn .= 'align="'.$align.'" '; }
+ if ($valign!=''){ $rtn .= 'valign="'.$valign.'" '; }
+ if ($width!=''){ $rtn .= 'width="'.$width.'" '; }
+ if ($this->getVar('style_cell')!=''){ $rtn .= 'style="'.$this->getVar('style_cell').'" '; }
+ $rtn .= $this->generateClass(1) .">$texto</td>";
+
+ if ($this->_display){
+ echo $rtn;
+ } else {
+ return $rtn;
+ }
+ }
+ /**
+ * Generamos la clase para un elemento
+ * @param int $q 0 = fila, 1 = celda
+ */
+ function generateClass($q){
+ if ($q==0){
+ $cc = $this->getVar('row_class');
+ $cy = $this->getVar('cycle_row');
+ } else {
+ $cc = $this->getVar('cell_class');
+ $cy = $this->getVar('cycle_cell');
+ }
+ if ($cc==''){ return; }
+
+ if (!$cy){ return ' class="'.$cc.'"'; }
+
+ $class = explode(",",$cc);
+ if (count($class)==1){ return $cc; }
+ if ($this->_current[$q] >= count($class) - 1){
+ $this->_current[$q] = 0;
+ } else {
+ $this->_current[$q]++;
+ }
+ return ' class="'.$class[$this->_current[$q]].'"';
+ }
+
+}
?>
\ No newline at end of file
Modified: XoopsModules/portfolio/trunk/portfolio/class/work.class.php
===================================================================
--- XoopsModules/portfolio/trunk/portfolio/class/work.class.php 2013-08-13 23:10:43 UTC (rev 11902)
+++ XoopsModules/portfolio/trunk/portfolio/class/work.class.php 2013-08-14 01:24:59 UTC (rev 11903)
@@ -1,81 +1,81 @@
-<?php
-/*******************************************************************
-* $Id: work.class.php,v 1.0.3 24/05/2006 00:42 BitC3R0 Exp $ *
-* ---------------------------------------------------------- *
-* RMSOFT MyFolder 1.0 *
-* M\xF3dulo para el manejo de un portafolio profesional *
-* CopyRight \xA9 2006. RMSOFT *
-* Autor: BitC3R0 *
-* http://www.redmexico.com.mx *
-* http://www.xoops-mexico.net *
-* -------------------------------------------- *
-* 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 *
-* *
-* ---------------------------------------------------------- *
-* work.class.php: *
-* Clase para el manejo de trabajos *
-* ---------------------------------------------------------- *
-* @copyright: \xA9 2006. BitC3R0. *
-* @autor: BitC3R0 *
-* @paquete: RMSOFT MyFolder v1.0 *
-* @version: 1.0.3 *
-* @modificado: 24/05/2006 12:42:37 a.m. *
-*******************************************************************/
-
-include_once XOOPS_ROOT_PATH.'/modules/portfolio/class/object.class.php';
-
-class MFWork extends MFObject
-{
- var $_tbl = '';
-
- function MFWork($id=null){
-
- $this->db = XoopsDatabaseFactory::getDatabaseConnection();
-
- if (is_null($id)){ return; }
-
- $this->_tbl = $this->db->prefix("portfolio_works");
-
- $result = $this->db->query("SELECT * FROM $this->_tbl WHERE id_w='$id'");
- if ($this->db->getRowsNum($result)<=0){ $this->initVar('found', false); return; }
-
- $row = $this->db->fetchArray($result);
-
- foreach ($row as $k => $v){
- $this->initVar($k, $v);
- }
-
- $this->initVar('found',true);
- $this->initVar('images', $this->getImages());
-
- }
-
- /**
- * Obtenemos las im\xE1genes
- */
- function getImages(){
- $result = $this->db->query("SELECT * FROM ".$this->db->prefix("portfolio_images")." WHERE work='".$this->getVar('id_w')."'");
- $this->initVar('total_images', $this->db->getRowsNum($result));
- $images = array();
- while ($row=$this->db->fetchArray($result)){
- $images[] = $row;
- }
-
- return $images;
- }
-}
-
+<?php
+/*******************************************************************
+* $Id: work.class.php,v 1.0.3 24/05/2006 00:42 BitC3R0 Exp $ *
+* ---------------------------------------------------------- *
+* RMSOFT MyFolder 1.0 *
+* M�dulo para el manejo de un portafolio profesional *
+* CopyRight � 2006. RMSOFT *
+* Autor: BitC3R0 *
+* http://www.redmexico.com.mx *
+* http://www.xoops-mexico.net *
+* -------------------------------------------- *
+* 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 *
+* *
+* ---------------------------------------------------------- *
+* work.class.php: *
+* Clase para el manejo de trabajos *
+* ---------------------------------------------------------- *
+* @copyright: � 2006. BitC3R0. *
+* @autor: BitC3R0 *
+* @paquete: RMSOFT MyFolder v1.0 *
+* @version: 1.0.3 *
+* @modificado: 24/05/2006 12:42:37 a.m. *
+*******************************************************************/
+
+include_once XOOPS_ROOT_PATH.'/modules/portfolio/class/object.class.php';
+
+class MFWork extends MFObject
+{
+ var $_tbl = '';
+
+ function __construct($id=null){
+
+ $this->db = XoopsDatabaseFactory::getDatabaseConnection();
+
+ if (is_null($id)){ return; }
+
+ $this->_tbl = $this->db->prefix("portfolio_works");
+
+ $result = $this->db->query("SELECT * FROM $this->_tbl WHERE id_w='$id'");
+ if ($this->db->getRowsNum($result)<=0){ $this->initVar('found', false); return; }
+
+ $row = $this->db->fetchArray($result);
+
+ foreach ($row as $k => $v){
+ $this->initVar($k, $v);
+ }
+
+ $this->initVar('found',true);
+ $this->initVar('images', $this->getImages());
+
+ }
+
+ /**
+ * Obtenemos las im�genes
+ */
+ function getImages(){
+ $result = $this->db->query("SELECT * FROM ".$this->db->prefix("portfolio_images")." WHERE work='".$this->getVar('id_w')."'");
+ $this->initVar('total_images', $this->db->getRowsNum($result));
+ $images = array();
+ while ($row=$this->db->fetchArray($result)){
+ $images[] = $row;
+ }
+
+ return $images;
+ }
+}
+
?>
\ No newline at end of file
Modified: XoopsModules/portfolio/trunk/portfolio/docs/changelog.txt
===================================================================
--- XoopsModules/po...
[truncated message content] |