Beispiel #1
0
         $move = intval(JRequest::getVar('move', array(), "REQUEST"));
         $sitemap->orderMenu($menu_move, $move);
         if ($sitemap->save() && $sitemap->usecache) {
             XmapCache::cleanCache($sitemap);
         }
         XmapAdminHtml::printMenusList($sitemap);
     }
     break;
 case 'get_menus_sitemap':
     $id = intval(JRequest::getVar('sitemap', '', "REQUEST"));
     if (!$id || $id != JRequest::getVar('sitemap', '', "REQUEST")) {
         die("Invalid Sitemap ID");
     }
     $sitemap = new XmapSitemap($database);
     if ($sitemap->load($id)) {
         XmapAdminHtml::printMenusList($sitemap);
     }
     break;
 case 'menu_options':
     $id = intval(JRequest::getVar('sitemap', '', "REQUEST"));
     $sitemap = new XmapSitemap($database);
     if (!$sitemap->load($id)) {
         die('Cannot load sitemap');
     }
     $menutype = JRequest::getVar('menutype', '', "REQUEST");
     $menus = $sitemap->getMenus();
     $menu = $menus[$menutype];
     $changefreq = array();
     $changefreq[] = JHTML::_('select.option', 'always', _XMAP_CFG_CHANGEFREQ_ALWAYS);
     $changefreq[] = JHTML::_('select.option', 'hourly', _XMAP_CFG_CHANGEFREQ_HOURLY);
     $changefreq[] = JHTML::_('select.option', 'daily', _XMAP_CFG_CHANGEFREQ_DAILY);
    function showSitemapInfo(&$sitemap, $default = false)
    {
        global $xmapComponentURL;
        ?>
		<form name="sitemapform<?php 
        echo $sitemap->id;
        ?>
" onsubmit="return false;">
		<div id="sitemap<?php 
        echo $sitemap->id;
        ?>
" class="sitemap">
                   <div class="sitemaptop">
                      <div class="tl"><div class="tr"><div class="tm"><div class="smname" id="sitemapname<?php 
        echo $sitemap->id;
        ?>
" onClick="editTextField(this,<?php 
        echo $sitemap->id;
        ?>
,'name');"><?php 
        echo $sitemap->name;
        ?>
</div><div class="divimgdefault"><?php 
        echo '<img src="', $xmapComponentURL, '/images/', $default ? 'default.gif' : 'no_default.gif', '" id="imgdefault', $sitemap->id, '" />';
        ?>
</div><div class="optionsbut" id="optionsbut<?php 
        echo $sitemap->id;
        ?>
" onClick="optionsMenu(<?php 
        echo $sitemap->id;
        ?>
);"><span><?php 
        echo _XMAP_EDIT_MENU;
        ?>
</span></div></div></div></div>
		   </div>
                   <div class="mr"><div class="mm">
			<div class="menulistouter">
                        <div id="menulist<?php 
        echo $sitemap->id;
        ?>
" class="menulist"><?php 
        XmapAdminHtml::printMenusList($sitemap);
        ?>
</div><div class="add_menu_link" onClick="showMenusList(<?php 
        echo $sitemap->id;
        ?>
,this);" /><span class="plussign">+</span><?php 
        echo _XMAP_ADD_MENU;
        ?>
</div></div>
                        <div class="sitemapinfo">
			   <div><?php 
        echo _XMAP_SITEMAP_ID . ': ' . $sitemap->id;
        ?>
</div>
			   <div><table cellspacing="2" cellpadding="2" class="sitemapstats">
                             <tr>
                               <td>&nbsp;</td>
                               <td>HTML</td>
                               <td>XML</td>
                             </tr>
                             <tr>
                               <td><?php 
        echo _XMAP_INFO_LAST_VISIT;
        ?>
</td>
                               <td><?php 
        echo $sitemap->lastvisit_html ? strftime("%b/%d/%Y", $sitemap->lastvisit_html) : _XMAP_NEVER_VISITED;
        ?>
</td>
                               <td><?php 
        echo $sitemap->lastvisit_xml ? strftime("%b/%d/%Y", $sitemap->lastvisit_xml) : _XMAP_NEVER_VISITED;
        ?>
</td>
                             </tr>
                             <tr>
                               <td><?php 
        echo _XMAP_INFO_COUNT_VIEWS;
        ?>
</td>
                               <td><?php 
        echo $sitemap->lastvisit_html ? $sitemap->views_html : "--";
        ?>
</td>
                               <td><?php 
        echo $sitemap->lastvisit_xml ? $sitemap->views_xml : "--";
        ?>
</td>
                             </tr>
                             <tr>
                               <td><?php 
        echo _XMAP_INFO_TOTAL_LINKS;
        ?>
</td>
                               <td><?php 
        echo $sitemap->lastvisit_html ? $sitemap->count_html : "--";
        ?>
</td>
                               <td><?php 
        echo $sitemap->lastvisit_xml ? $sitemap->count_xml : "--";
        ?>
</td>
                             </tr>
                           </table></div>
                        </div>
		   <div class="spacer"></div>
                   </div></div>
                   <div class="bm"><div class="bl"><div class="br"></div></div></div>
		</div>
		<div class="spacer"></div>
		</form>
<?php 
    }
Beispiel #3
0
    function showSitemapInfo(&$sitemap, $default = false)
    {
        global $xmapComponentURL, $xmapSiteURL;
        ?>
		<form name="sitemapform<?php 
        echo $sitemap->id;
        ?>
" onsubmit="return false;">
		<div id="sitemap<?php 
        echo $sitemap->id;
        ?>
" class="sitemap rounded10px">
                   <div class="sitemaptop">
                      <div class="smname" id="sitemapname<?php 
        echo $sitemap->id;
        ?>
" onClick="editTextField(this,<?php 
        echo $sitemap->id;
        ?>
,'name');"><?php 
        echo $sitemap->name;
        ?>
</div>
                      <div class="divimgdefault"><?php 
        echo '<img src="', $xmapComponentURL, '/images/', $default ? 'default.gif' : 'no_default.gif', '" id="imgdefault', $sitemap->id, '" />';
        ?>
</div>
                      <div class="optionsbut" id="optionsbut<?php 
        echo $sitemap->id;
        ?>
" onClick="optionsMenu(<?php 
        echo $sitemap->id;
        ?>
);"><span><?php 
        echo _XMAP_EDIT_MENU;
        ?>
</span></div>
		   </div>

                    <div class="spacer"></div>

 		   <div class="menulistouter">
                        <div id="menulist<?php 
        echo $sitemap->id;
        ?>
" class="menulist rounded5px"><?php 
        XmapAdminHtml::printMenusList($sitemap);
        ?>
</div>
                        <div class="add_menu_link" onClick="showMenusList(<?php 
        echo $sitemap->id;
        ?>
,this);"><span class="plussign">+</span><?php 
        echo _XMAP_ADD_MENU;
        ?>
</div>
                   </div>

                    <div class="sitemapinfo">
                       <div><?php 
        echo _XMAP_SITEMAP_ID . ': ' . $sitemap->id;
        ?>
</div>
                       <div><table cellspacing="2" cellpadding="2" class="sitemapstats">
                         <tr>
                           <td>&nbsp;</td>
                           <td>HTML</td>
                           <td>XML</td>
                         </tr>
                         <tr>
                           <td><?php 
        echo _XMAP_INFO_LAST_VISIT;
        ?>
</td>
                           <td><?php 
        echo $sitemap->lastvisit_html ? strftime("%b/%d/%Y", $sitemap->lastvisit_html) : _XMAP_NEVER_VISITED;
        ?>
</td>
                           <td><?php 
        echo $sitemap->lastvisit_xml ? strftime("%b/%d/%Y", $sitemap->lastvisit_xml) : _XMAP_NEVER_VISITED;
        ?>
</td>
                         </tr>
                         <tr>
                           <td><?php 
        echo _XMAP_INFO_COUNT_VIEWS;
        ?>
</td>
                           <td><?php 
        echo $sitemap->lastvisit_html ? $sitemap->views_html : "--";
        ?>
</td>
                           <td><?php 
        echo $sitemap->lastvisit_xml ? $sitemap->views_xml : "--";
        ?>
</td>
                         </tr>
                         <tr>
                           <td><?php 
        echo _XMAP_INFO_TOTAL_LINKS;
        ?>
</td>
                           <td><?php 
        echo $sitemap->lastvisit_html ? $sitemap->count_html : "--";
        ?>
</td>
                           <td><?php 
        echo $sitemap->lastvisit_xml ? $sitemap->count_xml : "--";
        ?>
</td>
                         </tr>
                       </table></div>
                    </div>
		   <div class="spacer"></div>
                   <div class="sitemaplinks">
			<div class="sitemaplinks-trigger"><?php 
        echo _XMAP_CFG_URLS;
        ?>
</div>
                        <div class="sitemaplinks-list">
				<?php 
        $xml_link = $xmapSiteURL . '/index.php?option=com_xmap&amp;sitemap=' . $sitemap->id . '&amp;view=xml';
        $news_link = $xmapSiteURL . '/index.php?option=com_xmap&amp;sitemap=' . $sitemap->id . '&amp;view=xml&amp;news=1';
        $images_link = $xmapSiteURL . '/index.php?option=com_xmap&amp;sitemap=' . $sitemap->id . '&amp;view=xml&amp;images=1';
        $html_link = $xmapSiteURL . '/index.php?option=com_xmap&amp;sitemap=' . $sitemap->id;
        ?>
					<div>
						<label><?php 
        echo _XMAP_CFG_XML_MAP;
        ?>
:</label>
						<span  class="sitemaplink"><a href="<?php 
        echo $xml_link;
        ?>
" target="_blank" title="XML Sitemap Link">
						<?php 
        echo $xml_link;
        ?>
						</a></span>
						&nbsp;
						<?php 
        echo JHTML::_('tooltip', _XMAP_XML_LINK_TIP);
        ?>
					</div>
					<div>
						<label><?php 
        echo _XMAP_CFG_HTML_MAP;
        ?>
:</label>
						<span  class="sitemaplink"><a href="<?php 
        echo $html_link;
        ?>
" target="_blank" title="HTML Sitemap Link">
						<?php 
        echo $html_link;
        ?>
						</a></span>
						&nbsp; <?php 
        echo JHTML::_('tooltip', _XMAP_HTML_LINK_TIP);
        ?>
					</div>
					<div>
						<label><?php 
        echo _XMAP_CFG_NEWS_MAP;
        ?>
:</label>
						<span  class="sitemaplink"><a href="<?php 
        echo $news_link;
        ?>
" target="_blank" title="News Sitemap Link">
						<?php 
        echo $news_link;
        ?>
						</a></span>
						&nbsp; <?php 
        echo JHTML::_('tooltip', _XMAP_HTML_LINK_TIP);
        ?>
					</div>
					<div>
						<label><?php 
        echo _XMAP_CFG_IMAGES_MAP;
        ?>
:</label>
						<span  class="sitemaplink"><a href="<?php 
        echo $images_link;
        ?>
" target="_blank" title="Images Sitemap Link">
						<?php 
        echo $images_link;
        ?>
						</a></span>
						&nbsp; <?php 
        echo JHTML::_('tooltip', _XMAP_HTML_LINK_TIP);
        ?>
					</div>
                        </div>
		</div>

		<div class="spacer"></div>
                </div>
		</form>

<?php 
    }