Advertisement
plas71k

hunteralb php-lockit file => decoded

Feb 18th, 2013
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 24.98 KB | None | 0 0
  1. <?php
  2. /*
  3. * @ Pirate-Sky Crew :: PHP Decoder v2
  4. * @ Author: pLa$71k
  5. * @ Web: http://pirate-sky.com
  6. * @ Pirate-Sky Crew © 2008 - 2013
  7. */
  8.  
  9. defined('_JEXEC') or die;
  10. $output_html = '';
  11. $lang        = JFactory::getLanguage();
  12. $lang->load('com_flippingbook', JPATH_SITE, $lang->getDefault(), false, false);
  13. $book_id = intval(JRequest::getVar('id', 0, 'get', 'int'));
  14. if (isset($book_id_for_module)) {
  15.     $book_id = $book_id_for_module;
  16. }
  17. $current_itemid = intval(JRequest::getInt('Itemid'));
  18. if ($current_itemid) {
  19.     $current_itemid = '&Itemid=' . $current_itemid;
  20. } else {
  21.     $current_itemid = '';
  22. }
  23. $current_catid = intval(JRequest::getInt('catid'));
  24. if ($current_catid) {
  25.     $current_catid = '&catid=' . $current_catid;
  26. } else {
  27.     $current_catid = '';
  28. }
  29. $db = JFactory::getDBO();
  30. $db->setQuery("SELECT * FROM #__flippingbook_books WHERE id=" . intval($book_id));
  31. $bookRow    = $db->loadObjectList();
  32. $bookParams = $bookRow[0];
  33. $db->setQuery("SELECT * FROM #__flippingbook_pages WHERE book_id = " . intval($book_id) . " AND published = 1 ORDER BY ordering");
  34. $rows            = $db->loadObjectList();
  35. $total_pages     = count($rows);
  36. $firstPageNumber = intval(JRequest::getVar('page', '', 'get', 'int'));
  37. if ($firstPageNumber == '') {
  38.     $firstPageNumber = $bookParams->first_page;
  39. }
  40. if ($firstPageNumber == 0) {
  41.     $firstPageNumber = 1;
  42. }
  43. $firstPageNumber_for_html = $firstPageNumber;
  44. if ($bookParams->direction == "RTL") {
  45.     $firstPageNumber = $total_pages - $firstPageNumber + 1;
  46.     if ($total_pages % 2 == 1) {
  47.         $firstPageNumber++;
  48.     }
  49. }
  50. if (!defined("FB_version")) {
  51.     $db    = JFactory::getDBO();
  52.     $query = "SELECT name, value FROM #__flippingbook_config";
  53.     $db->setQuery($query);
  54.     $c_rows = $db->loadObjectList();
  55.     foreach ($c_rows as $row) {
  56.         eval("DEFINE('FB_" . $row->name . "', '" . $row->value . "');");
  57.     }
  58. }
  59. $user   = JFactory::getUser();
  60. $levels = $user->authorisedLevels();
  61. if (!in_array($bookParams->access, $levels)) {
  62.     $output_html .= '<div class="fb_errorMessage">' . JText::_("COM_FLIPPINGBOOK_YOU_ARE_NOT_AUTHORIZED_TO_VIEW_THIS_BOOK") . '</div>';
  63. } elseif (count($bookParams) == 0) {
  64.     $output_html .= '<div class="fb_errorMessage">' . JText::_("COM_FLIPPINGBOOK_THE_REQUESTED_BOOK_DOESN_T_EXISTS") . '</div>';
  65. } elseif ($bookParams->published == 0) {
  66.     $output_html .= '<div class="fb_errorMessage">' . JText::_("COM_FLIPPINGBOOK_THE_REQUESTED_BOOK_HAS_BEEN_UNPUBLISHED") . '</div>';
  67. } else {
  68.     $db->setQuery("UPDATE #__flippingbook_books SET hits=(hits+1) WHERE id=" . intval($book_id));
  69.     $db->query();
  70.     $document  = JFactory::getDocument();
  71.     $headerTad = '<link rel="stylesheet" href="' . JURI::base(true) . '/components/com_flippingbook/css/' . FB_theme . '" type="text/css" />';
  72.     $document->addCustomTag($headerTad);
  73.     if (!defined('FBComponentJSlibrariesMainLoaded')) {
  74.         define('FBComponentJSlibrariesMainLoaded', 1);
  75.         $headerTad = '<script type="text/javascript" src="' . JURI::base(true) . '/components/com_flippingbook/js/swfobject.js"></script>';
  76.         $document->addCustomTag($headerTad);
  77.         $headerTad = '<script type="text/javascript" src="' . JURI::base(true) . '/components/com_flippingbook/js/flippingbook.js"></script>';
  78.         $document->addCustomTag($headerTad);
  79.         $headerTad = '<script type="text/javascript" src="' . JURI::base(true) . '/components/com_flippingbook/js/jquery-1.7.1.min.js"></script>';
  80.         $document->addCustomTag($headerTad);
  81.     }
  82.     if (!defined('FBComponentJSlibrariesAjaxLoaded')) {
  83.         define('FBComponentJSlibrariesAjaxLoaded', 1);
  84.         if ($bookParams->zooming_method == 1) {
  85.             $headerTad = '<script type="text/javascript" src="' . JURI::base(true) . '/components/com_flippingbook/js/ajax-zoom.js"></script>';
  86.             $document->addCustomTag($headerTad);
  87.             $headerTad = '<link rel="stylesheet" href="' . JURI::base(true) . '/components/com_flippingbook/js/ajax-zoom.css" type="text/css" />';
  88.             $document->addCustomTag($headerTad);
  89.         }
  90.     }
  91.     $unique_suffix = rand();
  92.     $output_html .= '<div id="fbContainer_' . $unique_suffix . '">';
  93.     $output_html .= '<div id="altmsg">' . JText::_("COM_FLIPPINGBOOK_THIS_IS_A_SEO_VERSION") . '<strong>' . $bookParams->title . ' ' . JText::_("COM_FLIPPINGBOOK_PAGE") . $firstPageNumber_for_html . '</strong><br />' . JText::_("COM_FLIPPINGBOOK_ENABLE_JAVASCRIPT") . ' <a class="altlink" href="http://www.adobe.com/go/getflashplayer/" target="_blank">' . JText::_("COM_FLIPPINGBOOK_DOWNLOAD_ADOBE_FLASH_PLAYER_NOW") . '</a></div>';
  94.     $output_html .= '<div style="text-align: center; padding: 20px 0 0 0; background-color: #' . $bookParams->background_color . " background-image: url('" . JURI::base(true) . "/images/" . $bookParams->background_image . "');" . '">';
  95.     if ($total_pages > 0) {
  96.         if (strtolower(substr($rows[$firstPageNumber_for_html - 1]->file, -3, 3)) == 'swf') {
  97.             $output_html .= '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' . $bookParams->book_width . '" height="' . $bookParams->book_height . '"><param name="movie" value="' . JURI::root() . 'images/' . $rows[$firstPageNumber_for_html - 1]->file . '" /><param name="quality" value="high" /><embed id="fb_zoomed_image" src="' . JURI::root() . 'images/' . $rows[$firstPageNumber_for_html - 1]->file . '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' . $bookParams->book_width . '" height="' . $bookParams->book_height . '"></embed></object>';
  98.         } else {
  99.             if ($rows[$firstPageNumber_for_html - 1]->zoom_url == "") {
  100.                 $zoom_url = $rows[$firstPageNumber_for_html - 1]->file;
  101.             } else {
  102.                 $zoom_url = $rows[$firstPageNumber_for_html - 1]->zoom_url;
  103.             }
  104.             $output_html .= '<a target="_blank" href="' . JURI::root() . 'images/' . $zoom_url . '">';
  105.             $output_html .= '<img src="' . JURI::root() . 'images/' . $rows[$firstPageNumber_for_html - 1]->file . '" height="' . $bookParams->book_height . '" width="' . $bookParams->book_width . '" border="0" alt="" />';
  106.             $output_html .= '</a>';
  107.         }
  108.     }
  109.     $output_html .= '<div id="nav_bar">';
  110.     $prev_link = $firstPageNumber_for_html - 1;
  111.     if ($prev_link < 1)
  112.         $prev_link = 1;
  113.     $next_link = $firstPageNumber_for_html + 1;
  114.     if ($next_link > $total_pages)
  115.         $next_link = $total_pages;
  116.     $start_link = 1;
  117.     $end_link   = $total_pages;
  118.     $tmpl_link  = JRequest::getVar('tmpl', '', 'get', 'string');
  119.     if ($tmpl_link == "component") {
  120.         $tmpl_link = '&tmpl=component';
  121.     }
  122.     $output_html .= '<a href="' . JRoute::_("index.php?option=com_flippingbook&view=book&id=" . $book_id . $current_catid . "&page=" . $start_link . $current_itemid . $tmpl_link) . '">' . JText::_("COM_FLIPPINGBOOK_START") . '</a>&nbsp;';
  123.     $output_html .= '<a href="' . JRoute::_("index.php?option=com_flippingbook&view=book&id=" . $book_id . $current_catid . "&page=" . $prev_link . $current_itemid . $tmpl_link) . '">' . JText::_("COM_FLIPPINGBOOK_PREVIOUS") . '</a>&nbsp;';
  124.     $output_html .= '<a href="' . JRoute::_("index.php?option=com_flippingbook&view=book&id=" . $book_id . $current_catid . "&page=" . $next_link . $current_itemid . $tmpl_link) . '">' . JText::_("COM_FLIPPINGBOOK_NEXT") . '</a>&nbsp;';
  125.     $output_html .= '<a href="' . JRoute::_("index.php?option=com_flippingbook&view=book&id=" . $book_id . $current_catid . "&page=" . $end_link . $current_itemid . $tmpl_link) . '">' . JText::_("COM_FLIPPINGBOOK_END") . '</a><br /><br />';
  126.     for ($i = 0; $i < $total_pages; $i++) {
  127.         $output_html .= '<a href="' . JRoute::_("index.php?option=com_flippingbook&view=book&id=" . $book_id . $current_catid . "&page=" . ($i + 1) . $current_itemid . $tmpl_link) . '">' . ($i + 1) . '</a> ';
  128.     }
  129.     $output_html .= '</div>';
  130.     $output_html .= '</div>';
  131.     if ($total_pages > 0) {
  132.         $output_html .= $rows[$firstPageNumber_for_html - 1]->description;
  133.     }
  134.     $output_html .= '</div>';
  135.     $output_html .= '<script language="JavaScript" type="text/javascript">' . "\n";
  136.     $output_html .= 'flippingBook' . $unique_suffix . ' = new FlippingBook();' . "\n";
  137.     $output_html .= 'flippingBook' . $unique_suffix . '.pages = [' . "\n";
  138.     if (($bookParams->direction == "RTL") && ($total_pages % 2 == 1) && ($total_pages > 0)) {
  139.         $output_html .= '"' . JURI::base(true) . '/images/flippingbook/blank.png|",' . "\n";
  140.     }
  141.     for ($i = 0; $i < $total_pages; $i++) {
  142.         if ($bookParams->direction == "RTL") {
  143.             $output_html .= '"' . JURI::base(true) . "/images/" . $rows[$total_pages - $i - 1]->file;
  144.         } else {
  145.             $output_html .= '"' . JURI::base(true) . "/images/" . $rows[$i]->file;
  146.         }
  147.         if ($i != ($total_pages - 1)) {
  148.             $output_html .= '|",' . "\n";
  149.         } else {
  150.             $output_html .= '"' . "\n";
  151.         }
  152.     }
  153.     $output_html .= '];' . "\n\n";
  154.     $output_html .= 'flippingBook' . $unique_suffix . '.enlargedImages = [' . "\n";
  155.     if (($bookParams->direction == "RTL") && ($total_pages % 2 == 1) && ($total_pages > 0)) {
  156.         $output_html .= '"' . JURI::base(true) . '/images/flippingbook/blank.png|",' . "\n";
  157.     }
  158.     for ($i = 0; $i < $total_pages; $i++) {
  159.         if ($rows[$i]->zoom_url == "") {
  160.             $rows[$i]->zoom_url = $rows[$i]->file;
  161.         }
  162.         if ($bookParams->direction == "RTL") {
  163.             $output_html .= '"' . JURI::base(true) . "/images/" . $rows[$total_pages - $i - 1]->zoom_url;
  164.         } else {
  165.             $output_html .= '"' . JURI::base(true) . "/images/" . $rows[$i]->zoom_url;
  166.         }
  167.         if ($i != ($total_pages - 1)) {
  168.             $output_html .= '|",' . "\n";
  169.         } else {
  170.             $output_html .= '"' . "\n";
  171.         }
  172.     }
  173.     $output_html .= '];' . "\n\n";
  174.     $output_html .= 'flippingBook' . $unique_suffix . '.pageLinks = [' . "\n";
  175.     if (($bookParams->direction == "RTL") && ($total_pages % 2 == 1) && ($total_pages > 0)) {
  176.         $output_html .= '"|",' . "\n";
  177.     }
  178.     for ($i = 0; $i < $total_pages; $i++) {
  179.         $rows[$i]->link_url = str_replace('&', '%26', $rows[$i]->link_url);
  180.         if ($bookParams->direction == "RTL") {
  181.             $output_html .= '"' . $rows[$total_pages - $i - 1]->link_url;
  182.         } else {
  183.             $output_html .= '"' . $rows[$i]->link_url;
  184.         }
  185.         if ($i != ($total_pages - 1)) {
  186.             $output_html .= '|",' . "\n";
  187.         } else {
  188.             $output_html .= '"' . "\n";
  189.         }
  190.     }
  191.     $output_html .= '];' . "\n\n";
  192.     if ($bookParams->zooming_method == 1) {
  193.         $output_html .= 'flippingBook' . $unique_suffix . '.swfHeight = [' . "\n";
  194.         if (($bookParams->direction == "RTL") && ($total_pages % 2 == 1) && ($total_pages > 0)) {
  195.             $output_html .= '"|",' . "\n";
  196.         }
  197.         for ($i = 0; $i < $total_pages; $i++) {
  198.             if ($bookParams->direction == "RTL") {
  199.                 $output_html .= '"' . $rows[$total_pages - $i - 1]->zoom_height;
  200.             } else {
  201.                 $output_html .= '"' . $rows[$i]->zoom_height;
  202.             }
  203.             if ($i != ($total_pages - 1)) {
  204.                 $output_html .= '|",' . "\n";
  205.             } else {
  206.                 $output_html .= '"' . "\n";
  207.             }
  208.         }
  209.         $output_html .= '];' . "\n\n";
  210.         $output_html .= 'flippingBook' . $unique_suffix . '.swfWidth = [' . "\n";
  211.         for ($i = 0; $i < $total_pages; $i++) {
  212.             if ($bookParams->direction == "RTL") {
  213.                 $output_html .= '"' . $rows[$total_pages - $i - 1]->zoom_width;
  214.             } else {
  215.                 $output_html .= '"' . $rows[$i]->zoom_width;
  216.             }
  217.             if ($i != ($total_pages - 1)) {
  218.                 $output_html .= '|",' . "\n";
  219.             } else {
  220.                 $output_html .= '"' . "\n";
  221.             }
  222.         }
  223.         $output_html .= '];' . "\n\n";
  224.     }
  225.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.uniqueSuffix = "' . $unique_suffix . '"' . "\n";
  226.     $output_html .= 'flippingBook' . $unique_suffix . '.stageWidth = "' . $bookParams->flash_width . '"' . "\n";
  227.     $output_html .= 'flippingBook' . $unique_suffix . '.stageHeight = "' . $bookParams->flash_height . '"' . "\n";
  228.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.direction = "' . $bookParams->direction . '"' . "\n";
  229.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.bookWidth = "' . ($bookParams->book_width * 2 + $bookParams->frame_width * 4) . '"' . "\n";
  230.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.bookHeight = "' . ($bookParams->book_height + $bookParams->frame_width * 2) . '"' . "\n";
  231.     $dynamic_scaling = $bookParams->dynamic_scaling == 1 ? "true" : "false";
  232.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.dynamicScaling = "' . $dynamic_scaling . '"' . "\n";
  233.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.bookSize = "' . $bookParams->book_size . '"' . "\n";
  234.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.firstPageNumber = "' . $firstPageNumber . '"' . "\n";
  235.     if (($bookParams->navigation_bar != "") && ($bookParams->navigation_bar != "none")) {
  236.         $output_html .= 'flippingBook' . $unique_suffix . '.settings.navigationBar = "' . JURI::base(true) . '/components/com_flippingbook/navigationbars/' . $bookParams->navigation_bar . '"' . "\n";
  237.     }
  238.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.navigationBarPlacement = "' . $bookParams->navigation_bar_placement . '"' . "\n";
  239.     if ($bookParams->page_background_color != "") {
  240.         $output_html .= 'flippingBook' . $unique_suffix . '.settings.pageBackgroundColor = 0x' . $bookParams->page_background_color . ';' . "\n";
  241.     }
  242.     if ($bookParams->background_color != "") {
  243.         $output_html .= 'flippingBook' . $unique_suffix . '.settings.backgroundColor = "' . $bookParams->background_color . '"' . "\n";
  244.     }
  245.     if ($bookParams->background_image != "") {
  246.         $output_html .= 'flippingBook' . $unique_suffix . '.settings.backgroundImage = "' . JURI::base(true) . '/images/' . $bookParams->background_image . '"' . "\n";
  247.         $output_html .= 'flippingBook' . $unique_suffix . '.settings.backgroundImagePlacement = "' . $bookParams->background_image_placement . '"' . "\n";
  248.     }
  249.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.staticShadowsType = "' . $bookParams->static_shadows_type . '"' . "\n";
  250.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.staticShadowsDepth = "' . $bookParams->static_shadows_depth . '"' . "\n";
  251.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.autoFlipSize = "' . $bookParams->auto_flip_size . '"' . "\n";
  252.     $center_book = $bookParams->center_book == 1 ? "true" : "false";
  253.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.centerBook = ' . $center_book . ';' . "\n";
  254.     $scale_content = $bookParams->scale_content == 1 ? "true" : "false";
  255.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.scaleContent = ' . $scale_content . ';' . "\n";
  256.     $always_opened = $bookParams->always_opened == 1 ? "true" : "false";
  257.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.alwaysOpened = ' . $always_opened . ';' . "\n";
  258.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.flipCornerStyle = "' . $bookParams->flip_corner_style . '"' . "\n";
  259.     $hardcover = $bookParams->hardcover == 1 ? "true" : "false";
  260.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.hardcover = ' . $hardcover . ';' . "\n";
  261.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.downloadURL = "' . $bookParams->download_url . '"' . "\n";
  262.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.downloadTitle = "' . $bookParams->download_title . '"' . "\n";
  263.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.downloadSize = "' . $bookParams->download_size . '"' . "\n";
  264.     $allow_pages_unload = $bookParams->allow_pages_unload == 1 ? "true" : "false";
  265.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.allowPagesUnload = ' . $allow_pages_unload . ';' . "\n";
  266.     $fullscreen_enabled = $bookParams->fullscreen_enabled == 1 ? "true" : "false";
  267.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.fullscreenEnabled = ' . $fullscreen_enabled . ';' . "\n";
  268.     $zoom_enabled = $bookParams->zoom_enabled == 1 ? "true" : "false";
  269.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.zoomEnabled = ' . $zoom_enabled . ';' . "\n";
  270.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.zoomImageWidth = "' . $bookParams->zoom_image_width . '"' . "\n";
  271.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.zoomImageHeight = "' . $bookParams->zoom_image_height . '"' . "\n";
  272.     if ($bookParams->zoom_ui_color != "") {
  273.         $output_html .= 'flippingBook' . $unique_suffix . '.settings.zoomUIColor = 0x' . $bookParams->zoom_ui_color . ';' . "\n";
  274.     }
  275.     $slideshow_button = $bookParams->show_slide_show_button == 1 ? "true" : "false";
  276.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.slideshowButton = ' . $slideshow_button . ';' . "\n";
  277.     $slideshow_auto_play = $bookParams->slideshow_auto_play == 1 ? "true" : "false";
  278.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.slideshowAutoPlay = ' . $slideshow_auto_play . ';' . "\n";
  279.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.slideshowDisplayDuration = "' . $bookParams->slideshow_display_duration . '"' . "\n";
  280.     $go_to_page_field = $bookParams->go_to_page_field == 1 ? "true" : "false";
  281.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.goToPageField = ' . $go_to_page_field . ';' . "\n";
  282.     $first_last_buttons = $bookParams->first_last_buttons == 1 ? "true" : "false";
  283.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.firstLastButtons = ' . $first_last_buttons . ';' . "\n";
  284.     $print_enabled = $bookParams->print_enabled == 1 ? "true" : "false";
  285.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.printEnabled = ' . $print_enabled . ';' . "\n";
  286.     $zooming_method = $bookParams->zooming_method == 1 ? '"ajax"' : '"flash"';
  287.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.zoomingMethod = ' . $zooming_method . ';' . "\n";
  288.     $sound_control_button = $bookParams->sound_control_button == 1 ? "true" : "false";
  289.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.soundControlButton = ' . $sound_control_button . ';' . "\n";
  290.     $transparent_pages = $bookParams->transparent_pages == 1 ? "true" : "false";
  291.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.showUnderlyingPages = ' . $transparent_pages . ';' . "\n";
  292.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.fullscreenHint = "' . urlencode($bookParams->fullscreen_hint) . '"' . "\n";
  293.     $show_zoom_hint = $bookParams->show_zoom_hint == 1 ? "true" : "false";
  294.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.zoomHintEnabled = ' . $show_zoom_hint . ';' . "\n";
  295.     FB_zoomOnClick == 1 ? $zoomOnClick = "true" : $zoomOnClick = "false";
  296.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.zoomOnClick = ' . $zoomOnClick . ';' . "\n";
  297.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.moveSpeed = "' . FB_moveSpeed . '"' . "\n";
  298.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.closeSpeed = "' . FB_closeSpeed . '"' . "\n";
  299.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.gotoSpeed = "' . FB_gotoSpeed . '"' . "\n";
  300.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.rigidPageSpeed = "' . FB_rigidPageSpeed . '"' . "\n";
  301.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.zoomHint = "' . JText::_("COM_FLIPPINGBOOK_ZOOM_HINT") . '"' . "\n";
  302.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.printTitle = "' . JText::_("COM_FLIPPINGBOOK_PRINT_TITLE") . '"' . "\n";
  303.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.downloadComplete = "' . JText::_("COM_FLIPPINGBOOK_DOWNLOAD_COMPLETE") . '"' . "\n";
  304.     FB_dropShadowEnabled == 1 ? $dropShadowEnabled = "true" : $dropShadowEnabled = "false";
  305.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.dropShadowEnabled = ' . $dropShadowEnabled . ';' . "\n";
  306.     if (FB_flipSound != "") {
  307.         $output_html .= 'flippingBook' . $unique_suffix . '.settings.flipSound = "' . JURI::base(true) . '/components/com_flippingbook/sounds/' . FB_flipSound . '"' . "\n";
  308.     }
  309.     if (FB_hardcoverSound != "") {
  310.         $output_html .= 'flippingBook' . $unique_suffix . '.settings.hardcoverSound = "' . JURI::base(true) . '/components/com_flippingbook/sounds/' . FB_hardcoverSound . '"' . "\n";
  311.     }
  312.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.preloaderType = "' . FB_preloaderType . '"' . "\n";
  313.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.loader = true;' . "\n";
  314.     if ($bookParams->frame_color != "") {
  315.         $output_html .= 'flippingBook' . $unique_suffix . '.settings.frameColor = 0x' . $bookParams->frame_color . ';' . "\n";
  316.     }
  317.     $output_html .= 'flippingBook' . $unique_suffix . '.settings.frameWidth = ' . intval($bookParams->frame_width) . ';' . "\n";
  318.     $output_html .= 'flippingBook' . $unique_suffix . '.containerId = "fbContainer_' . $unique_suffix . '"' . "\n";
  319.     $output_html .= 'flippingBook' . $unique_suffix . '.create("' . JURI::base(true) . '/components/com_flippingbook/flippingbook.swf");' . "\n";
  320.     $output_html .= 'jQuery.noConflict();' . "\n";
  321.     if ($bookParams->zooming_method == 1) {
  322.         $output_html .= 'jQuery(document).ready(function() {' . "\n";
  323.         $output_html .= '    zoom_init("' . JURI::root() . '", flippingBook' . $unique_suffix . ');' . "\n";
  324.         $output_html .= '});' . "\n";
  325.     }
  326.     if ($bookParams->flash_height == '100%') {
  327.         $output_html .= 'flippingBook' . $unique_suffix . '.removeSpaces();' . "\n";
  328.         $output_html .= 'jQuery(window).load(function(){ flippingBook' . $unique_suffix . '.sizeContent("' . $unique_suffix . '"); });' . "\n";
  329.         $output_html .= 'jQuery(window).resize(function(){ flippingBook' . $unique_suffix . '.sizeContent("' . $unique_suffix . '"); });' . "\n";
  330.     }
  331.     $output_html .= '</script>' . "\n";
  332.     if ($bookParams->flash_height == '100%') {
  333.         $bookParams->show_pages_description = 0;
  334.     }
  335.     if (($bookParams->show_pages_description == 1) || ($bookParams->show_book_description == 1)) {
  336.         $output_html .= '<div id="fbFooter">';
  337.         if ($bookParams->show_pages_description == 1) {
  338.             if ($bookParams->direction == "RTL") {
  339.                 $output_html .= '<div id="fb_pageDescription_' . $unique_suffix . '" class="fb_pageDescription"><div id="fb_rightPageDescription_' . $unique_suffix . '" class="fb_rightPageDescription"></div>' . "\n";
  340.                 $output_html .= '<div id="fb_leftPageDescription_' . $unique_suffix . '" class="fb_leftPageDescription"></div></div>' . "\n";
  341.             } else {
  342.                 $output_html .= '<div id="fb_pageDescription_' . $unique_suffix . '" class="fb_pageDescription"><div id="fb_leftPageDescription_' . $unique_suffix . '" class="fb_leftPageDescription"></div>' . "\n";
  343.                 $output_html .= '<div id="fb_rightPageDescription_' . $unique_suffix . '" class="fb_rightPageDescription"></div></div>' . "\n";
  344.             }
  345.         }
  346.         if ($bookParams->show_book_description == 1) {
  347.             $output_html .= '<div id="fb_bookDescription' . $unique_suffix . '" class="fb_bookDescription">' . $bookParams->description . "</div>\n\n";
  348.         }
  349.         $output_html .= '</div>';
  350.     }
  351.     if ($bookParams->show_pages_description == 1) {
  352.         $page_decriptions = '';
  353.         $db->setQuery("SELECT * FROM #__flippingbook_pages WHERE book_id = " . intval($book_id) . " AND published = 1 ORDER BY ordering");
  354.         $p_rows = $db->loadObjectList();
  355.         $i      = 1;
  356.         foreach ($p_rows as $row) {
  357.             if ($bookParams->direction == "RTL") {
  358.                 $page_decriptions .= '<div id="fb_page_' . $unique_suffix . '_' . ($total_pages - $i + 1) . '">' . $row->description . "</div>\n";
  359.             } else {
  360.                 $page_decriptions .= '<div id="fb_page_' . $unique_suffix . '_' . ($i) . '">' . $row->description . "</div>\n";
  361.             }
  362.             $i++;
  363.         }
  364.         $output_html .= '<div id="fb_hidden_' . $unique_suffix . '" style="position: absolute; visibility: hidden; display: none;">' . "\n" . $page_decriptions . "</div>\n";
  365.     }
  366. }
  367. $output_html .= '<div style="visibility:visible;background-color:#D5D5D5;width:100%;text-align:center;font-size:14px;padding:5px 0px;display:block;color:#020202;">FlippingBook <a style="color:#000000;visibility:visible;" href="http://www.page-flip-tools.com/" title="Page flip extension for Joomla">page flip</a> extension for Joomla.</div>';
  368. if (empty($call_from_plugin)) {
  369.     echo $output_html;
  370. }
  371. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement