Current Path : /var/www/html/clients/amz.e-nk.ru/bitrix/gadgets/bitrix/google_gadgets/ |
Current File : /var/www/html/clients/amz.e-nk.ru/bitrix/gadgets/bitrix/google_gadgets/index.php |
<? if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die(); $rnd = rand(); if($_SERVER['REQUEST_METHOD']=='POST' && $_REQUEST['gdggform']=='Y' && $_REQUEST['gdgg']==$id && $arParams["PERMISSION"]>"R") { $content = str_replace("|script", "<script", $_POST["content"]); $arGadget["USERDATA"] = Array("content"=>$content); $arGadget["FORCE_REDIRECT"] = true; } $arData = $arGadget["USERDATA"]; $content = $arData["content"]; if(strlen($content)>0): if(preg_match('#;title=([^&]+)&#', $content, $regs)) { $str = $GLOBALS["APPLICATION"]->ConvertCharset(urldecode($regs[1]), "utf-8", SITE_CHARSET); $arGadget["TITLE"] = $str; } ?> <div id="X<?=$rnd?>"> <?=$content;?> </div> <script> function XX<?=$rnd?>() { var dd = document.getElementById('X<?=$rnd?>'); if(!dd) return; var Ee = dd.childNodes; for(var ei in Ee) { var e = Ee[ei]; if(e.nodeType==1 && e.tagName.toUpperCase() == 'TABLE') { //alert(e.rows[0].cells[0].childNodes[0].innerHTML); e.rows[0].cells[0].style.display = 'none'; //alert(e.rows[0].cells[0].innerHTML); } } } setTimeout("XX<?=$rnd?>()", 0); </script> <? elseif($arParams["PERMISSION"]>"R"): if(LANGUAGE_ID=='ru') $arGG = Array( Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/dictionary.xml%3F&up_sl=en&up_tl=ru&up_default_text=&synd=open&w=330&h=279&title=%D0%9F%D0%B5%D1%80%D0%B5%D0%B2%D0%BE%D0%B4%D1%87%D0%B8%D0%BA&lang=ru&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/wikipedia.xml&up_mylang=ru&synd=open&w=296&h=45&title=%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F&lang=ru&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://gadgets.sterno.ru/2day/2day.xml&synd=open&w=320&h=310&title=%D0%AD%D1%82%D0%BE%D1%82+%D0%B4%D0%B5%D0%BD%D1%8C+%D0%B2+%D0%B8%D1%81%D1%82%D0%BE%D1%80%D0%B8%D0%B8&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), // Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/googletalk.xml%3Fjava&synd=open&w=320&h=451&title=Google+Talk&lang=ru&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://addthisshare.com/googletalk.xml&synd=open&w=300&h=440&title=Google+Talk&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/100359642095326149732/GMail.xml&synd=open&w=280&h=350&title=GMail&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.labpixies.com/campaigns/maps/maps.xml&up_last_location=0&synd=open&w=320&h=440&title=Google+%D0%BA%D0%B0%D1%80%D1%82%D0%B0&lang=all&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.labpixies.com/campaigns/converter/converter.xml&up_recents=%5B%5D&synd=open&w=320&h=226&title=%D0%9A%D0%BE%D0%BD%D0%B2%D0%B5%D1%80%D1%82%D0%B0%D1%86%D0%B8%D1%8F+%D0%B8%D0%B7%D0%BC%D0%B5%D1%80%D0%B5%D0%BD%D0%B8%D0%B9&lang=ru&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), // Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/datetime.xml&up_color=blue&up_dateFormat=wmd&up_firstDay=1&up_clocks=%5B%5B-73.986951%2C40.756054%2C%22New%20York%22%2C0%5D%5D&synd=open&w=320&h=140&title=%D0%A7%D0%B0%D1%81%D1%8B&lang=ru&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/calendar3.xml&up_calendarFeeds=&up_calendarColors=&up_firstDay=1&up_dateFormat=1&up_timeFormat=13%3A00&up_showDatepicker=1&up_hideAgenda=0&up_showEmptyDays=0&up_showExpiredEvents=1&synd=open&w=288&h=190&title=%D0%9A%D0%B0%D0%BB%D0%B5%D0%BD%D0%B4%D0%B0%D1%80%D1%8C+Google&lang=ru&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://andyast.googlepages.com/MSOutlookWidget.xml&up_DefaultView=Inbox&synd=open&w=320&h=430&title=Microsoft+Outlook&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://gadgets.sterno.ru/domodedovo/domodedovo.xml&synd=open&w=320&h=350&title=%D0%9E%D0%BD%D0%BB%D0%B0%D0%B9%D0%BD+%D1%82%D0%B0%D0%B1%D0%BB%D0%BE+%D0%94%D0%BE%D0%BC%D0%BE%D0%B4%D0%B5%D0%B4%D0%BE%D0%B2%D0%BE&lang=ru&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/colorjunction.xml&up_difficulty=4&up_size=15&up_bestScores=00%3A20%7C00%3A35%7C01%3A00%7C00%3A35%7C01%3A15%7C02%3A00%7C01%3A00%7C02%3A00%7C03%3A15&up_boardStyle=1&up_lastScores=00%3A00%7C00%3A00%7C00%3A00%7C00%3A00%7C00%3A00%7C00%3A00%7C00%3A00%7C00%3A00%7C00%3A00&synd=open&w=264&h=287&title=ColorJunction&lang=ru&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.labpixies.com/campaigns/blackjack/blackjack.xml&up_balance=1000&up_loans=0&up_highest=1000&up_lowest=1000&up_bank_rounds=0&up_wins=0&up_games=0&up_total_bets=0&up_highest_hand=0&up_default_bet=10&synd=open&w=320&h=280&title=BlackJack&lang=ru&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.labpixies.com/campaigns/videopoker/videopoker.xml&synd=open&w=320&h=260&title=%D0%9F%D0%BE%D0%BA%D0%B5%D1%80&lang=all&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.labpixies.com/campaigns/minesweeper/minesweeper.xml&up_Sscores=%7B%7D&up_Mscores=%7B%7D&up_Lscores=%7B%7D&up_rank=0&up_rank_counter=0&up_last_board=small&synd=open&w=280&h=360&title=C%D0%B0%D0%BF%D0%B5%D1%80&lang=ru&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://avc-cbrf-gadget.googlecode.com/svn/trunk/cbr_chart_igoogle.xml&synd=open&w=242&h=111&title=%D0%9A%D1%83%D1%80%D1%81+%D0%B2%D0%B0%D0%BB%D1%8E%D1%82+%D0%A6%D0%91+%D0%A0%D0%A4&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://aruljohn.com/gadget/ip.xml&synd=open&w=320&h=150&title=%D0%92%D0%B0%D1%88+IP+%D0%B0%D0%B4%D1%80%D0%B5%D1%81&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), ); else $arGG = Array( Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/109162539679639397174/weather.xml&up_location=London&up_scale=F&up_title=London&up_icons=Google&synd=open&w=250&h=330&title=London+Weather&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/googletalk.xml%3Fjava&synd=open&w=320&h=451&title=Google+Talk&lang=en&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/100359642095326149732/GMail.xml&synd=open&w=280&h=350&title=GMail&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/113570023379904426818/StockCharts.xml&up_Symbol=CSCO&up_Duration=1y&synd=open&w=260&h=200&title=Stock+Charts&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.go-dictionary.com/gadget/dictionary.xml&synd=open&w=320&h=135&title=Online+Dictionary&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://igwidgets.com/lig/gw/f/islk/89/slkm/ik/s/22244/87/p132/bbc-news-rss-feeds.xml&up_extrafeed=http%3A%2F%2Fnewsrss.bbc.co.uk%2Frss%2Fnewsonline_uk_edition%2Ftechnology%2Frss.xml&up_extratitle=Technology&up_subject=BBC%20News&up_entries=6&up_summaries=100&up_selectedTab=&synd=open&w=320&h=360&title=BBC+News&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.netvibes.com/api/uwa/compile/google.php%3FmoduleUrl%3Dhttp%253A%252F%252Fwww.netvibes.com%252Fmodules%252FmultipleFeeds%252FmultipleFeeds.php%253Fprovider%253Dcustom%2526url%253Dhttp%25253A%25252F%25252Feco.netvibes.com%25252Fuwa%25252Fmultifeed%25252F306%25252F394&up_category=&up_view=&up_nbTitles=3&up_details=1&up_showDate=1&up_openOutside=0&up_videoAutoPlay=false&up_numberTabs=4&up_selectedTab=0&up_title=MultipleFeeds&up_lookForHtmlThumbnail=true&up_provider=google&up_url=&up_lastSearch=__undefined__&synd=open&w=320&h=200&title=BBC+Finance+News&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/109974367101812108674/CNN.xml&synd=open&w=470&h=440&title=CNN+NEWS&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://humanmaze.googlepages.com/espn-sports-rss-feeds.xml&up_entries=4&up_summaries=100&up_extrafeed=http%3A%2F%2Fsoccernet.espn.go.com%2Frss%2Fnews&up_extratitle=Soccer&up_subject=ESPN&up_selectedTab=&synd=open&w=320&h=300&title=ESPN&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.creatonic.com/gadget/calculator.xml&up_color=gmail&synd=open&w=320&h=155&title=Calculator&lang=en&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.labpixies.com/campaigns/wiki/wiki.xml&up_language=en&up_source=wikipedia&up_last_searches=none&synd=open&w=320&h=170&title=Wikipedia+Search&lang=all&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.matt.org/modules/GoogleClock.xml&up_vsize=240px&synd=open&w=320&h=240&title=Google+Clock&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/colorjunction.xml&up_difficulty=4&up_size=15&up_bestScores=00%3A20%7C00%3A35%7C01%3A00%7C00%3A35%7C01%3A15%7C02%3A00%7C01%3A00%7C02%3A00%7C03%3A15&up_boardStyle=1&up_lastScores=00%3A00%7C00%3A00%7C00%3A00%7C00%3A00%7C00%3A00%7C00%3A00%7C00%3A00%7C00%3A00%7C00%3A00&synd=open&w=264&h=287&title=ColorJunction&lang=en&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.labpixies.com/campaigns/blackjack/blackjack.xml&up_balance=1000&up_loans=0&up_highest=1000&up_lowest=1000&up_bank_rounds=0&up_wins=0&up_games=0&up_total_bets=0&up_highest_hand=0&up_default_bet=10&synd=open&w=320&h=280&title=BlackJack&lang=en&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.labpixies.com/campaigns/videopoker/videopoker.xml&synd=open&w=320&h=260&title=Poker&lang=all&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://www.labpixies.com/campaigns/minesweeper/minesweeper.xml&up_Sscores=%7B%7D&up_Mscores=%7B%7D&up_Lscores=%7B%7D&up_rank=0&up_rank_counter=0&up_last_board=small&synd=open&w=280&h=360&title=Minesweeper&lang=en&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://andyast.googlepages.com/MSOutlookWidget.xml&up_DefaultView=Inbox&synd=open&w=320&h=430&title=Microsoft+Outlook&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), Array("CODE"=>'<script src="http://www.gmodules.com/ig/ifr?url=http://aruljohn.com/gadget/ip.xml&synd=open&w=320&h=150&title=Your+IP+Address&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>'), ); ?> <script> function Ch<?=$rnd?>(b) { var Dd = document.getElementById('Dd<?=$rnd?>'); if(b) { Dd.style.display = 'block'; //alert(''); //window.open('http://www.google.com/ig/directory?synd=open&cat=all', '', ''); } else Dd.style.display = 'none'; } </script> <form action="?gdgg=<?=$id?>" method="post" id="gdggf<?=$id?>"> <input type="hidden" name="gdggform" value="Y"> <select name="gdgglist" id="gdgglist" style="width: 100%;" onchange="if(this.value=='-')Ch<?=$rnd?>(true);else Ch<?=$rnd?>(false);"> <option value=""><?=GetMessage("GD_GOOGLE_GADGETS_SELECT")?></option> <?foreach($arGG as $v): if(preg_match('#;title=([^&]+)&#', $v["CODE"], $regs)) $title = $GLOBALS["APPLICATION"]->ConvertCharset(urldecode($regs[1]), "utf-8", SITE_CHARSET); else $title = GetMessage("GD_GOOGLE_GADGETS_GADGET"); ?> <option value="<?=htmlspecialchars(str_replace("<script", "|script", $v["CODE"]));?>"><?=htmlspecialchars($title)?></option> <?endforeach?> <option value="-"><?=GetMessage("GD_GOOGLE_GADGETS_MORE")?></option> </select> <div id="Dd<?=$rnd?>" style="display:none"> <p><?=GetMessage("GD_GOOGLE_GADGETS_LINK")?></p> <?=GetMessage("GD_GOOGLE_GADGETS_HELP")?> <p><?=GetMessage("GD_GOOGLE_GADGETS_CODE")?></p> <textarea style="width:100%;" id="gdggcontentu"></textarea> </div> <input type="hidden" name="content" id="gdggcontent" value=""> <br> <a href="javascript:void(0);" onclick="return gdggsave();"><?=GetMessage("GD_GOOGLE_GADGETS_SAVE")?></a> </form> <script> function gdggsave() { var str = document.getElementById("gdgglist").value; if(str == '') { alert('<?=GetMessage("GD_GOOGLE_GADGETS_WARN1")?>'); return false; } if(str == '-') str = document.getElementById("gdggcontentu").value; if(str == '') { alert('<?=GetMessage("GD_GOOGLE_GADGETS_WARN2")?>'); return false; } str = str.replace('<script', '|script'); document.getElementById("gdggcontent").value = str; document.getElementById("gdggf<?=$id?>").submit(); return false; } </script> <? endif; ?>