From: <ara...@us...> - 2007-05-08 13:35:22
|
Revision: 146 http://svn.sourceforge.net/easybox-mod/?rev=146&view=rev Author: aragornis Date: 2007-05-08 06:35:18 -0700 (Tue, 08 May 2007) Log Message: ----------- Modified Paths: -------------- trunk/_framework/fonctions_partagees.inc.php trunk/module/modules/index1.php trunk/module/modules/modules.tpl trunk/skin/mediacenter/framework_skin.php Modified: trunk/_framework/fonctions_partagees.inc.php =================================================================== --- trunk/_framework/fonctions_partagees.inc.php 2007-05-08 12:49:03 UTC (rev 145) +++ trunk/_framework/fonctions_partagees.inc.php 2007-05-08 13:35:18 UTC (rev 146) @@ -704,4 +704,7 @@ } } +function add_download($name){ + echo @file_get_contents('http://www.easybox-mod.org/add_dl.php?name='.$name); +} ?> Modified: trunk/module/modules/index1.php =================================================================== --- trunk/module/modules/index1.php 2007-05-08 12:49:03 UTC (rev 145) +++ trunk/module/modules/index1.php 2007-05-08 13:35:18 UTC (rev 146) @@ -44,6 +44,7 @@ if(utf8_decode($element->nom)==urldecode($_GET['installnewmod'])){ download_file($ini['download']['patch'].utf8_decode($element->fichier), $RACINE_REP.'module/'.strtolower(str_replace(' ','',supprime_accents(utf8_decode($element->nom)))).'/', $element->nom); add_module(utf8_decode($element->nom), strtolower(str_replace(' ','',supprime_accents(utf8_decode($element->nom)))).'/', 'index1.php', '1', '1', '1', '1', '1', utf8_decode($element->version), utf8_decode($element->description), 'Module', 'Alone', get_id_of_categorie(utf8_decode($element->cat))); + add_download($element->nom); } //-- R\xE9initialise la liste des modules get_module_list(); @@ -68,6 +69,7 @@ if(utf8_decode($element->nom)==$_GET['installnewskin']){ download_file($ini['download']['patch'].utf8_decode($element->fichier), $RACINE_REP.'skin/'.utf8_decode($element->nom).'/'); add_module(utf8_decode($element->nom), utf8_decode($element->nom).'/', '', '', '', '', '', '', utf8_decode($element->version), utf8_decode($element->description), 'Skin', 'Alone', ''); + add_download($element->nom); } //-- R\xE9initialise la liste des modules get_module_list(); Modified: trunk/module/modules/modules.tpl =================================================================== --- trunk/module/modules/modules.tpl 2007-05-08 12:49:03 UTC (rev 145) +++ trunk/module/modules/modules.tpl 2007-05-08 13:35:18 UTC (rev 146) @@ -1,4 +1,3 @@ -<br> {if $action=="mod" OR $action=="skin"} {section name=mod loop=$MOD start=$MIN max=4} {if $smarty.section.mod.first} @@ -12,7 +11,7 @@ <b>Version</b> : {$MOD[mod].version}<br> <b>Description</b> : {$MOD[mod].description}</td> {if NOT $MOD[mod].current}{if $action=="skin"}<td width="20"><a href="index1.php?setskinid={$MOD[mod].id}&action={$action}" onfocus='aide="Activer la {$MOD[mod].nom}";'><table width="20" height="20" border="0" cellpadding="0" cellspacing="0" bgcolor="#COULEUR_FOND1#" abgcolor="{#COULEUR_ALINK#}"><tr height="20"><td align=center width="20" height="20" align="center" valign="middle"><img src="{$INTERFACE_REP}valider.gif" border="0" width="20" height="20"></td></tr></table></a></td>{else}<td> </td>{/if} - {if NOT ($MOD[mod].dep=='Easybox Core' AND $action=="skin")}<td width="20"><a href="index1.php?delid={$MOD[mod].id}&action={$action}" onfocus='aide="Supprimer {if $action=="skin"}la skin{else}le module{/if} {$MOD[mod].nom}";'><table width="20" height="20" border="0" cellpadding="0" cellspacing="0" bgcolor="#COULEUR_FOND1#" abgcolor="{#COULEUR_ALINK#}"><tr height="20"><td align=center width="20" height="20" align="center" valign="middle"><img src="{$INTERFACE_REP}delete.gif" border="0" width="20" height="20"></td></tr></table></a></td>{else}<td> </td>{/if}{/if} + {if NOT ($MOD[mod].dep=='Easybox Core' AND $action=="skin")}<td width="20"><a href="index1.php?delid={$MOD[mod].id}&action={$action}" onfocus='aide="Supprimer {if $action=="skin"}la skin{else}le module{/if} {$MOD[mod].nom}";'><table width="20" height="20" border="0" cellpadding="0" cellspacing="0" bgcolor="#COULEUR_FOND1#" abgcolor="{#COULEUR_ALINK#}"><tr height="20"><td align=center width="20" height="20" align="center" valign="middle"><img src="{$INTERFACE_REP}delete.gif" border="0" width="20" height="20"></td></tr></table></a></td>{else}<td> </td>{/if}{else}<td> </td><td> </td>{/if} </tr> {if $smarty.section.mod.last} <tr><td align="center" colspan="2">{if !$_multipage.is_last_page}{suivant} - {/if}{pagination}</td></tr> Modified: trunk/skin/mediacenter/framework_skin.php =================================================================== --- trunk/skin/mediacenter/framework_skin.php 2007-05-08 12:49:03 UTC (rev 145) +++ trunk/skin/mediacenter/framework_skin.php 2007-05-08 13:35:18 UTC (rev 146) @@ -54,25 +54,45 @@ // Gestion des multipages $smarty->register_function('precedent', '_multipage_prec'); $smarty->register_function('suivant', '_multipage_suiv'); +$smarty->register_function('pagination', '_multipage_pagination'); -function start_multi($lien,$step){ -global $_multipage_lien, $_multipage_step, $_GET, $min, $smarty; - $_multipage_lien = $lien; - $_multipage_step = $step; +function start_multi($lien,$step,$total=0){ +global $_multipage, $_GET, $min, $smarty; (isset($_GET['start'])?$min=$_GET['start']:$min=0); - $smarty->assign('MIN',&$min); + $_multipage['lien'] = $lien; + $_multipage['step'] = $step; + $_multipage['total'] = $total; + $_multipage['nb_page'] = ceil($total/$step); + $_multipage['current_page'] = ceil(($min/$step)+1); + $_multipage['is_last_page'] = ($_multipage['current_page']==$_multipage['nb_page']); + $_multipage['is_first_page'] = ($_multipage['current_page']==1); + $_multipage['min_max'] = $step*($_multipage['nb_page']-1); + $smarty->assign('_multipage',$_multipage); + $smarty->assign_by_ref('MIN',$min); } function _multipage_prec(){ -global $_multipage_lien, $_multipage_step, $MENU_ALT, $INTERFACE_REP, $min, $LINK; - $MENU_ALT[]=array('lien'=>$_multipage_lien.'&start='.max(0,$min-$_multipage_step), 'nom'=>'<img src="'.$INTERFACE_REP.'btn_vert.gif" border="0"> Pr\xE9c\xE9dent', 0,'front_pannel'=>'Pr\xE9c\xE9dent'); - $LINK['green']=$_multipage_lien.'&start='.max(0,$min-$_multipage_step); +global $_multipage, $MENU_ALT, $INTERFACE_REP, $min, $LINK; + if(!$_multipage['is_first_page']){ + $LINK['green'] = $_multipage['lien'].'&start='.max(0,$min-$_multipage['step']); + $MENU_ALT[]=array('lien'=>$_multipage['lien'].'&start='.max(0,$min-$_multipage['step']), 'nom'=>'<img src="'.$INTERFACE_REP.'btn_vert.gif" border="0"> Pr\xE9c\xE9dent', 0,'front_pannel'=>'Pr\xE9c\xE9dent'); + }else{ + return false; + } } function _multipage_suiv(){ -global $_multipage_lien, $_multipage_step, $MENU_ALT, $INTERFACE_REP, $min, $LINK; - $MENU_ALT[]=array('lien'=>$_multipage_lien.'&start='.($min+$_multipage_step), 'nom'=>'<img src="'.$INTERFACE_REP.'btn_bleu.gif" border="0"> Suivant', 0,'front_pannel'=>'Suivant'); - $LINK['blue']=$_multipage_lien.'&start='.($min+$_multipage_step); +global $_multipage, $MENU_ALT, $INTERFACE_REP, $min, $LINK; + if(!$_multipage['is_last_page']){ + $LINK['blue'] = $_multipage['lien'].'&start='.($min+$_multipage['step']); + $MENU_ALT[]=array('lien'=>$_multipage['lien'].'&start='.($min+$_multipage['step']), 'nom'=>'<img src="'.$INTERFACE_REP.'btn_bleu.gif" border="0"> Suivant', 0,'front_pannel'=>'Suivant'); + }else{ + return false; + } } - + +function _multipage_pagination(){ +global $_multipage; + //return '<font size="1">Page '.$_multipage['current_page'].' / '.$_multipage['nb_page'].'</font>'; +} ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |