Exemplo n.º 1
0
    function cInstallDraw($output, $step, $title, $status, $install = 1, $substep = 0)
    {
        $html = '';
        $version = communityInstallerHelper::getVersion();
        $html .= '
	<script type="text/javascript">
	/* jQuery("span.version").html("Version ' . $version . '"); */
	var DOM = document.getElementById("element-box");
	DOM.setAttribute("id","element-box1");
	</script>
	
	<style type="text/css">
	/**
	 * Reset Joomla! styles
	 */
	div.t, div.b {
		height: 0;
		margin: 0;
		background: none;
	}
	
	body #content-box div.padding {
		padding: 0;
	}
	
	body div.m {
		padding: 0;
		border: 0;
	}
	
	.button1-left {
		background: transparent url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_button1_left.png) no-repeat scroll 0 0;
		float: left;
		margin-left: 5px;
		cursor: pointer;
	}
	
	.button1-left .next {
		background: transparent url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_button1_next.png) no-repeat scroll 100% 0;
		float: left;
		cursor: pointer;
	}
	
	.button-next,
	.button-next:focus {
		border: 0;
		background: none;
		font-size: 11px;
		height: 26px;
		line-height: 24px;
		cursor: pointer;
		font-weight: 700;
	}
	
	h1.steps{
		color:#0B55C4;
		font-size:20px;
		font-weight:bold;
		margin:0;
		padding-bottom:8px;
	}
	
	div.steps {
		font-size: 12px;
		font-weight: bold;
		padding-bottom: 12px;
		padding-top: 10px;
		background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_divider.png) 0 100% repeat-x;
	}
	
	div.on {
		color:#0B55C4;
	}
	
	#toolbar-box,
	#submenu-box,
	#header-box {
		display: none;
	}
	
	div#cElement-box div.m {
		padding: 5px 10px;
	}
	
	div#cElement-box div.t, div#cElement-box div.b {
		height: 6px;
		padding: 0;
		margin: 0;
		overflow: hidden;
	}
	
	div#cElement-box div.m {
		border-left: 1px solid #ccc;
		border-right: 1px solid #ccc;
		padding: 0 8px;
	}
	
	div#cElement-box div.t {
		background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_border.png) 0 0 repeat-x;
	}
	
	div#cElement-box div.t div.t {
		background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_crn_tr_light.png) 100% 0 no-repeat;
	}
	
	div#cElement-box div.t div.t div.t {
		background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_crn_tl_light.png) 0 0 no-repeat;
	}
	
	div#cElement-box div.b {
		background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_border.png) 0 100% repeat-x;
	}
	
	div#cElement-box div.b div.b {
		background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_crn_br_light.png) 100% 0 no-repeat;
	}
	
	div#cElement-box div.b div.b div.b {
		background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_crn_bl_light.png) 0 0 no-repeat;
	}
	#stepbar {
		float: left;
		width: 170px;
	}
	
	#stepbar div.box {
		background: url(' . JURI::root() . 'administrator/components/com_community/box.jpg) 0 0 no-repeat;
		height: 140px;
	}
	
	#stepbar h1 {
		margin: 0;
		padding-bottom: 8px;
		font-size: 20px;
		color: #0B55C4;
		font-weight: bold;
		background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_divider.png) 0 100% repeat-x;
	}
	
	div#stepbar {
	  background: #f7f7f7;
	}
	
	div#stepbar div.t {
	  background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_border.png) 0 0 repeat-x;
	}
	
	div#stepbar div.t div.t {
	   background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_crn_tr_dark.png) 100% 0 no-repeat;
	}
	
	div#stepbar div.t div.t div.t {
	   background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_crn_tl_dark.png) 0 0 no-repeat;
	}
	
	div#stepbar div.b {
	  background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_border.png) 0 100% repeat-x;
	}
	
	div#stepbar div.b div.b {
	   background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_crn_br_dark.png) 100% 0 no-repeat;
	}
	
	div#stepbar div.b div.b div.b {
	   background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_crn_bl_dark.png) 0 0 no-repeat;
	}
	
	div#stepbar div.t, div#stepbar div.b {
		height: 6px;
		margin: 0;
		overflow: hidden;
		padding: 0;
	}
	
	div#stepbar div.m,
	div#cToolbar-box div.m {
		padding: 0 8px;
		border-left: 1px solid #ccc;
		border-right: 1px solid #ccc;
	}
	
	div#cToolbar-box {
		background: #f7f7f7;
		position: relative;
	}
	
	div#cToolbar-box div.m {
		padding: 0;
		height: 30px;
	}
	
	div#cToolbar-box {
		background: #fbfbfb;
	}
	
	div#cToolbar-box div.t,
	div#cToolbar-box div.b {
		height: 6px;
	}
	
	div#cToolbar-box span.title {
		color: #0B55C4;
		font-size: 20px;
		font-weight: bold;
		line-height: 30px;
		padding-left: 6px;
	}
	
	div#cToolbar-box div.t {
	  background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_border.png) 0 0 repeat-x;
	}
	
	div#cToolbar-box div.t div.t {
	   background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_crn_tr_med.png) 100% 0 no-repeat;
	}
	
	div#cToolbar-box div.t div.t div.t {
	   background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_crn_tl_med.png) 0 0 no-repeat;
	}
	
	div#cToolbar-box div.b {
	  background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_border.png) 0 100% repeat-x;
	}
	
	div#cToolbar-box div.b div.b {
	   background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_crn_br_med.png) 100% 0 no-repeat;
	}
	
	div#cToolbar-box div.b div.b div.b {
	   background: url(' . JURI::root() . 'administrator/templates/' . DEFAULT_TEMPLATE_ADMIN . '/images/j_crn_bl_med.png) 0 0 no-repeat;
	}
	</style>
	
	
	<table cellpadding="6" width="100%">
		<tr>
			<td rowspan="2" valign="top" width="10%">' . $this->cInstallDrawSidebar($step) . '</td>
			<td valign="top" height="30">' . $this->cInstallDrawTitle($title, $step, $status, $install, $substep) . '</td>
		</tr>
		<tr>
			<td valign="top">
				<div id="cElement-box" class="cInstaller-border">
					<div style="height: 487px; padding: 0 10px;">
					' . $output . '
					</div>
				</div>
			</td>
		</tr>
	</table>';
        echo $html;
    }
Exemplo n.º 2
0
$supportedPhpVersion = 5;
$install = JRequest::getVar('install', '', 'REQUEST');
$view = JRequest::getVar('view', '', 'GET');
$task = JRequest::getVar('task', '', 'REQUEST');
if ($task == 'reinstall') {
    jimport('joomla.filesystem.file');
    $destination = JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_community' . DS;
    $buffer = "installing";
    JFile::write($destination . 'installer.dummy.ini', $buffer);
}
//install
if ((file_exists(JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_community' . DS . 'installer.dummy.ini') || $install) && $view != 'maintenance' && $task != 'azrul_ajax' || $installedPhpVersion < $supportedPhpVersion) {
    require_once JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_community' . DS . 'installer.helper.php';
    require_once JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_community' . DS . 'installer.template.php';
    $step = JRequest::getVar('step', '', 'post');
    $helper = new communityInstallerHelper();
    $display = new communityInstallerDisplay();
    $template = new communityInstallerTemplate();
    if ($installedPhpVersion < $supportedPhpVersion) {
        $html = communityInstallerHelper::getErrorMessage(101, $installedPhpVersion);
        $status = false;
        $nextstep = 0;
        $title = JText::_('COM_COMMUNITY_INSTALLATION_JOMSOCIAL');
        $install = 1;
        $substep = 0;
    } else {
        if (!empty($step)) {
            $progress = $helper->install($step);
            $html = $progress->message;
            $status = $progress->status;
            $nextstep = $progress->step;