コード例 #1
0
ファイル: admin.mtree.php プロジェクト: rsemedo/Apply-Within
/* Get Category ID for the Add Category/Listing links */
if ($task == 'newlink' || $task == 'newcat') {
    $parent_cat = JRequest::getInt('cat_parent', 0);
} else {
    $parent_cat = JRequest::getInt('cat_id', 0);
}
/* Start Left Navigation Menu */
if (!$hide_menu && !in_array($task, array('upgrade', 'spy', 'ajax', 'downloadft', 'manageftattachments'))) {
    HTML_mtree::print_startmenu($task, $parent_cat);
}
switch ($task) {
    /***
     * Ajax event
     */
    case 'ajax':
        require_once $mtconf->getjconf('absolute_path') . '/administrator/components/com_mtree/admin.mtree.ajax.php';
        break;
        /***
         * Spy
         */
    /***
     * Spy
     */
    case 'spy':
        require_once $mtconf->getjconf('absolute_path') . '/administrator/components/com_mtree/spy.mtree.php';
        break;
        /***
         * Link Checker
         */
    /***
     * Link Checker
コード例 #2
0
function com_install()
{
    $my =& JFactory::getUser();
    $database =& JFactory::getDBO();
    $mtconf = new mtConfig($database);
    // Assign current user's email as Mosets Tree admin
    $database->setQuery("UPDATE #__mt_config SET value='" . $my->email . "' WHERE varname='admin_email' LIMIT 1");
    $database->query();
    // Change Admin Icon to Mosets icon
    $database->setQuery("UPDATE #__components SET admin_menu_img='../components/com_mtree/img/icon-16-mosetstree.png' WHERE admin_menu_link='option=com_mtree'");
    $database->query();
    // Rename htaccess.txt to .htaccess in attachments directory
    jimport('joomla.filesystem.file');
    if (!JFile::move(JPATH_SITE . $mtconf->get('relative_path_to_attachments') . 'htaccess.txt', JPATH_SITE . $mtconf->get('relative_path_to_attachments') . '.htaccess')) {
        $htaccess_rename_status = false;
    } else {
        $htaccess_rename_status = true;
    }
    ?>
	<div>
		<div class="t">
			<div class="t">
				<div class="t"></div>
			</div>
		</div>
		<div class="m" style="overflow:hidden;padding-bottom:12px;">
			<div style="padding: 20px;border-right:1px solid #ccc;float:left">
			<img src="../components/com_mtree/img/logo.png" alt="Mosets Tree" style="float:left;padding-right:15px;" />
			</div>
			<div style="margin-left:350px;">
				<h2 style="margin-bottom:0;">Mosets Tree <?php 
    echo $mtconf->get('version');
    ?>
</h2>
				<strong>A flexible directory component for Joomla!</strong>
				<br /><br />
				&copy; Copyright 2005-<?php 
    echo date('Y');
    ?>
 by Mosets Consulting. <a href="http://www.mosets.com/">www.mosets.com</a><br />
				<input type="button" value="Go to Mosets Tree now" onclick="location.href='index.php?option=com_mtree'" style="margin-top:13px;cursor:pointer;width:200px;font-weight:bold" />
			</div>
		</div>
	</div>	
	<table class="adminlist">
		<tbody>
			<?php 
    echo getHtaccessRenameRow($htaccess_rename_status);
    ?>
			<?php 
    echo getWritableRow($mtconf->getjconf('absolute_path') . $mtconf->get('relative_path_to_cat_original_image'));
    ?>
			<?php 
    echo getWritableRow($mtconf->getjconf('absolute_path') . $mtconf->get('relative_path_to_cat_small_image'));
    ?>
			<?php 
    echo getWritableRow($mtconf->getjconf('absolute_path') . $mtconf->get('relative_path_to_listing_original_image'));
    ?>
			<?php 
    echo getWritableRow($mtconf->getjconf('absolute_path') . $mtconf->get('relative_path_to_listing_medium_image'));
    ?>
			<?php 
    echo getWritableRow($mtconf->getjconf('absolute_path') . $mtconf->get('relative_path_to_listing_small_image'));
    ?>
		</tbody>
	</table>

	<?php 
    return true;
}