Ejemplo n.º 1
0
In order for PHP-Nuke to function
correctly it needs to be able to access or write to certain files.
If you see "Unwriteable" you need to change the
permissions on the file to allow PHP-Nuke
to write to it.
<div class="clr">&nbsp;&nbsp;</div>
<div class="ctr"></div>
</div>

<div class="install-form">
<div class="form-block">

<table class="content">
<?php 
writableCell('config.php');
writableCell('ultramode.txt');
?>
</table>
</div>
<div class="clr"></div>
</div>
<div class="clr"></div>
</div>
<div class="clr"></div>
</div>
</div>

<div class="ctr">
	<a href="http://phpnuke.org" target="_blank">PHP-Nuke</a> is Free Software released under the GNU/GPL License.
</div>
Ejemplo n.º 2
0
function view()
{
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>TorrentTrader Check</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
td { vertical-align: top; }
</style>
</head>
<body>
<center>
<br /><b>TorrentTrader v3 unoffical Config Check<br />v1.7 - TorrentialStorm<br /><br /></b>

<input type="button" class="button" value="Check Again" onclick="window.location=window.location" /><br />

<a href="check.php?phpinfo=1">PHPInfo</a></center><br />

<b>Required Settings Check:</b><br />
<p>If any of these items are highlighted in red then please take actions to correct them. <br />
Failure to do so could lead to your TorrentTrader! installation not functioning correctly.</p>
<br />
This system check is designed for unix based servers, windows based servers may not give desired results<br />
<br />
<br />

<table cellpadding="3" cellspacing="1" style="border-collapse: collapse" border="1">
<tr>
	<td>PHP version >= 4.3.0</td>
	<td>
	<?php 
    echo phpversion() < '4.3' ? '<b><font color="red">No</font> 4.3 or above required</b>' : '<b><font color="green">Yes</font></b>';
    echo " - Your PHP version is " . phpversion();
    ?>
	</td>
</tr>

<tr>
	<td>&nbsp; - zlib compression support</td>
	<td><?php 
    echo extension_loaded('zlib') ? '<b><font color="green">Available</font></b>' : '<b><font color="red">Unavailable</font></b>';
    ?>
</td>
</tr>

<tr>
	<td>&nbsp; - XML support</td>
	<td><?php 
    echo extension_loaded('xml') ? '<b><font color="green">Available</font></b>' : '<b><font color="red">Unavailable</font></b>';
    ?>
</td>
</tr>

<tr>
	<td>&nbsp; - MySQL support</td>
	<td><?php 
    echo function_exists('mysql_connect') ? '<b><font color="green">Available</font></b>' : '<b><font color="red">Unavailable</font></b>';
    ?>
</td>
</tr>

<tr>
	<td>&nbsp; - curl support (Not required but external torrents may scrape faster)</td>
	<td><?php 
    echo function_exists('curl_init') ? '<b><font color="green">Available</font></b>' : '<b><font color="red">Unavailable</font></b>';
    ?>
</td>
</tr>

<tr>
	<td>&nbsp; - gmp support (Required for IPv6)</td>
	<td><?php 
    echo extension_loaded('gmp') ? '<b><font color="green">Available</font></b>' : '<b><font color="red">Unavailable</font></b>';
    ?>
</td>
</tr>

<tr>
	<td>&nbsp; - bcmath support (Required for IPv6)</td>
	<td><?php 
    echo extension_loaded('bcmath') ? '<b><font color="green">Available</font></b>' : '<b><font color="red">Unavailable</font></b>';
    ?>
</td>
</tr>

<tr>
	<td>&nbsp; - hash_hmac support (Recommended - For better password encryption)</td>
	<td><?php 
    echo function_exists('hash_hmac') ? '<b><font color="green">Available</font></b>' : '<b><font color="red">Unavailable</font></b>';
    ?>
</td>
</tr>

<tr>
	<td>&nbsp; - suhosin extension (Optional)</td>
	<td><?php 
    echo extension_loaded('suhosin') ? '<b><font color="green">Available</font></b><br /><br />Add to your php.ini (otherwise you may have issues):<br />suhosin.get.disallow_nul = Off<br />suhosin.request.disallow_nul = Off' : '<b><font color="red">Unavailable</font></b>';
    ?>
</td>
</tr>

<tr>
	<td>backend/config.php</td>
	<td>
	<?php 
    if (@file_exists('backend/config.php') && @is_writable('backend/config.php')) {
        echo '<b><font color="red">Writeable</font></b><br />Warning: leaving backend/config.php writeable is a security risk';
    } else {
        echo '<b><font color="green">Unwriteable</font></b>';
    }
    ?>
	</td>
</tr>

<tr>
	<td>Document Root<br /><i><font size="1">(Use this for your PATHS in config.php)</font></i></td>
	<td><?php 
    echo str_replace('\\', '/', getcwd());
    ?>
</td>
</tr>

</table>


<br />
<p>These settings are recommended for PHP in order to ensure full compatibility with TorrentTrader!.
However, TorrentTrader! will still operate if your settings do not quite match the recommended.</p>

<table cellpadding="3" cellspacing="1" style="border-collapse: collapse" border="1">
<tr><td width="500px">Directive</td><td>Recommended</td><td>Actual</td></tr>

<?php 
    $php_recommended_settings = array(array('Safe Mode', 'safe_mode', 'OFF'), array('Display Errors (Can be off, but does make debugging difficult.)', 'display_errors', 'ON'), array('File Uploads', 'file_uploads', 'ON'), array('Magic Quotes Runtime', 'magic_quotes_runtime', 'OFF'), array('Register Globals', 'register_globals', 'OFF'), array('Output Buffering', 'output_buffering', 'OFF'), array('Session auto start', 'session.auto_start', 'OFF'), array('allow_url_fopen (Required for external torrents)', 'allow_url_fopen', 'ON'));
    foreach ($php_recommended_settings as $phprec) {
        ?>
	<tr>
	<td><?php 
        echo $phprec[0];
        ?>
:</td>
	<td><?php 
        echo $phprec[2];
        ?>
:</td>
	<td><b>
	<?php 
        if (get_php_setting($phprec[1]) == $phprec[2]) {
            ?>
		<font color="green">
	<?php 
        } else {
            ?>
		<font color="red">
	<?php 
        }
        echo get_php_setting($phprec[1]);
        ?>
</font></b>
</td></tr>
<?php 
    }
    ?>
</table>

<br /><b>Directory and File Permissions Check:</b><br />
<p>In order for TorrentTrader! to function correctly it needs to be able to access or write to certain files or directories.<br />
If you see "Unwriteable" you need to change the permissions on the file or directory to 777 (directories) or 666 (files) so that TorrentTrader to write to it.
<br />The censor.txt should be chmodded to <b>600</b>.
</p>
<br />

<table cellpadding="3" cellspacing="1" style='border-collapse: collapse' border="1" >
<?php 
    writableCell('backups');
    writableCell('uploads');
    writableCell('uploads/images');
    writableCell('cache');
    writableCell('cache/get_row_count');
    writableCell('cache/queries');
    writableCell('import');
    writableCell('censor.txt', 1);
    ?>
</table>
<br />
<?php 
    require_once "backend/mysql.php";
    echo "<b>Table Status Check:</b><br /><br />";
    if (!@mysql_connect($mysql_host, $mysql_user, $mysql_pass)) {
        printf("<font color='#ff0000'><b>Failed to connect to database:</b></font> (%d) %s<br />", mysql_errno(), mysql_error());
    } else {
        if (!@mysql_select_db($mysql_db)) {
            printf("<font color='#ff0000'><b>Failed to select database:</b></font> (%d) %s<br />", mysql_errno(), mysql_error());
        } else {
            $r = mysql_query("SHOW TABLES");
            if (!$r) {
                printf("<font color='#ff0000'><b>Failed to list tables:</b></font> (%d) %s<br />", mysql_errno(), mysql_error());
            } else {
                $tables = array();
                while ($rr = mysql_fetch_row($r)) {
                    $tables[] = $rr[0];
                }
                $arr[] = "announce";
                $arr[] = "bans";
                $arr[] = "blocks";
                $arr[] = "categories";
                $arr[] = "censor";
                $arr[] = "comments";
                $arr[] = "completed";
                $arr[] = "countries";
                $arr[] = "email_bans";
                $arr[] = "faq";
                $arr[] = "groups";
                $arr[] = "guests";
                $arr[] = "languages";
                $arr[] = "log";
                $arr[] = "messages";
                $arr[] = "news";
                $arr[] = "peers";
                $arr[] = "pollanswers";
                $arr[] = "polls";
                $arr[] = "ratings";
                $arr[] = "reports";
                $arr[] = "rules";
                $arr[] = "shoutbox";
                $arr[] = "stylesheets";
                $arr[] = "tasks";
                $arr[] = "teams";
                $arr[] = "torrentlang";
                $arr[] = "torrents";
                $arr[] = "users";
                $arr[] = "warnings";
                $arr[] = "forumcats";
                $arr[] = "forum_topics";
                $arr[] = "forum_posts";
                $arr[] = "forum_forums";
                $arr[] = "forum_readposts";
                $arr[] = "sqlerr";
                echo "<table cellpadding='3' cellspacing='1' style='border-collapse: collapse' border='1'>";
                echo "<tr><th>Table</th><th>Status</th></tr>";
                foreach ($arr as $t) {
                    if (!in_array($t, $tables)) {
                        echo "<tr><td>{$t}</td><td align='right'><font color='#ff0000'><b>MISSING</b></font></td></tr>";
                    } else {
                        echo "<tr><td>{$t}</td><td align='right'><font color='green'><b>OK</b></font></td></tr>";
                    }
                }
                echo "</table>";
                require "backend/config.php";
                echo "<br /><br /><b>Default Theme:</b> ";
                if (!is_numeric($site_config["default_theme"])) {
                    echo "<font color='#ff0000'><b>Invalid.</b></font> (Not a number)";
                } else {
                    $res = mysql_query("SELECT uri FROM stylesheets WHERE id={$site_config['default_theme']}");
                    if ($row = mysql_fetch_row($res)) {
                        if (file_exists("themes/{$row['0']}/header.php")) {
                            echo "<font color='green'><b>Valid.</b></font> (ID: {$site_config['default_theme']}, Path: themes/{$row['0']}/)";
                        } else {
                            echo "<font color='#ff0000'><b>Invalid.</b></font> (No header.php found)";
                        }
                    } else {
                        echo "<font color='#ff0000'><b>Invalid.</b></font> (No theme found with ID {$site_config['default_theme']})";
                    }
                }
                echo "<br /><b>Default Language:</b> ";
                if (!is_numeric($site_config["default_language"])) {
                    echo "<font color='#ff0000'><b>Invalid.</b></font> (Not a number)";
                } else {
                    $res = mysql_query("SELECT uri FROM languages WHERE id={$site_config['default_language']}");
                    if ($row = mysql_fetch_row($res)) {
                        if (file_exists("languages/{$row['0']}")) {
                            echo "<font color='green'><b>Valid.</b></font> (ID: {$site_config['default_language']}, Path: languages/{$row['0']})";
                        } else {
                            echo "<font color='#ff0000'><b>Invalid.</b></font> (File languages/{$row['0']} missing)";
                        }
                    } else {
                        echo "<font color='#ff0000'><b>Invalid.</b></font> (No language found with ID {$site_config['default_language']})";
                    }
                }
            }
        }
    }
    ?>
</body>
</html>
<?php 
}
Ejemplo n.º 3
0
permissions on the file or directory to allow Knomos
to write to it.
<div class="clr">&nbsp;&nbsp;</div>
<div class="ctr"></div>
</div>

<div class="install-form">
<div class="form-block">

<table class="content">
<?php 
writableCell('tmp');
writableCell('tmp/document');
writableCell('tmp/document/txtindex');
writableCell('tmp/export');
writableCell('tmp/export/cache');
?>
</table>
</div>
<div class="clr"></div>
</div>
<div class="clr"></div>
</div>
<div class="clr"></div>
</div>
</div>

<div class="ctr">
<a href="http://www.knomos.org" target="_blank">Knomos</a> Web Installer based on <a href="http://www.mamboserver.com" target="_blank">Mambo</a>'s web installer. Mambo And Knomos are Free Software released under the GNU/GPL License.
</div>
Ejemplo n.º 4
0
defined('_VALID_MOS') or die('Restricted access');
// ensure user has access to this function
if (!$acl->acl_check('administration', 'install', 'users', $my->usertype, $element . 's', 'all')) {
    mosRedirect('index2.php', _NOT_AUTH);
}
require_once $mainframe->getPath('installer_html', 'mambot');
HTML_installer::showInstallForm('Install new Mambots', $option, 'mambot', '', dirname(__FILE__));
?>
<table class="content">
<?php 
writableCell('media');
writableCell('language');
writableCell('mambots');
writableCell('mambots/content');
writableCell('mambots/search');
writableCell('mambots/system');
?>
</table>
<?php 
showInstalledMambots($option);
function showInstalledMambots($_option)
{
    global $database, $mosConfig_absolute_path;
    $query = "SELECT id, name, folder, element, client_id" . "\n FROM #__mambots" . "\n WHERE iscore = 0" . "\n ORDER BY folder, name";
    $database->setQuery($query);
    $rows = $database->loadObjectList();
    // path to mambot directory
    $mambotBaseDir = mosPathName(mosPathName($mosConfig_absolute_path) . "mambots");
    $id = 0;
    $n = count($rows);
    for ($i = 0; $i < $n; $i++) {
Ejemplo n.º 5
0
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined('_VALID_MOS') or die('Restricted access');
// ensure user has access to this function
if (!$acl->acl_check('administration', 'install', 'users', $my->usertype, $element . 's', 'all')) {
    mosRedirect('index2.php', _NOT_AUTH);
}
require_once $mainframe->getPath('installer_html', 'module');
HTML_installer::showInstallForm('Install new Modules', $option, 'module', '', dirname(__FILE__));
?>
<table class="content">
<?php 
writableCell('media');
writableCell('administrator/modules');
writableCell('modules');
?>
</table>
<?php 
showInstalledModules($option);
/**
* @param string The URL option
*/
function showInstalledModules($_option)
{
    global $database, $mosConfig_absolute_path;
    $filter = mosGetParam($_POST, 'filter', '');
    $select[] = mosHTML::makeOption('', 'All');
    $select[] = mosHTML::makeOption('0', 'Site Modules');
    $select[] = mosHTML::makeOption('1', 'Admin Modules');
    $lists['filter'] = mosHTML::selectList($select, 'filter', 'class="inputbox" size="1" onchange="document.adminForm.submit();"', 'value', 'text', $filter);
Ejemplo n.º 6
0
<h1>Directory and File Permissions:</h1>
<div class="install-text">
In order for PHP-Syslog-NG to function
correctly it needs to be able to access or write to certain files
or directories. If you see "Unwriteable" you need to change the
permissions on the file or directory to allow PHP-Syslog-NG
to write to it.
<div class="clr">&nbsp;&nbsp;</div>
<div class="ctr"></div>
</div>

<div class="install-form">
<div class="form-block">

<table class="content">
<?php 
writableCell('config');
writableCell('jpcache');
?>
</table>
</div>
<div class="clr"></div>
</div>
<div class="clr"></div>
</div>
<div class="clr"></div>
</div>
</div>
</body>
</html>
Ejemplo n.º 7
0
<?php

/**
* @package Mambo
* @subpackage Installer
* @author Mambo Foundation Inc see README.php
* @copyright Mambo Foundation Inc.
* See COPYRIGHT.php for copyright notices and details.
* @license GNU/GPL Version 2, see LICENSE.php
* Mambo is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2 of the License.
*/
/** ensure this file is being included by a parent file */
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');
// ensure user has access to this function
if (!$acl->acl_check('administration', 'install', 'users', $my->usertype, $element . 's', 'all')) {
    mosRedirect('index2.php', T_('You are not authorized to view this resource.'));
}
$backlink = '<a href="index2.php?option=com_languages">' . T_('Back to Language Manager') . '</a>';
HTML_installer::showInstallForm(T_('Install new Language - Site'), $option, 'language', '', dirname(__FILE__), $backlink);
?>
<table class="content">
<?php 
writableCell('media');
writableCell('language');
?>
</table>
Ejemplo n.º 8
0
	/**
	* Writes a list of the defined modules
	* @param array An array of category objects
	*/
	static function showPlugins( &$rows, &$pageNav, $option, &$lists, $search ) {
		global $_CB_framework, $_PLUGINS;

		HTML_comprofiler::secureAboveForm('showPlugins');

		outputCbTemplate( 2 );
		outputCbJs( 2 );
	    initToolTip( 2 );

		global $_CB_Backend_Title;
		$_CB_Backend_Title	=	array( 0 => array( 'cbicon-48-plugins', htmlspecialchars( CBTxt::T('CB Plugin Manager') )
											 . ' <small><small> &nbsp;&nbsp;&nbsp;&nbsp; <a href="#getplugins">' . htmlspecialchars( CBTxt::T('Get Plugins') ) . '</a></small></small>'
											 . ' &nbsp;&nbsp;&nbsp;'
											 . ' <small><small> &nbsp;&nbsp;&nbsp;&nbsp; <a href="#install">' . htmlspecialchars( CBTxt::T('Install Plugin') ) . '</a></small></small>' ) );
											 
		HTML_comprofiler::_saveOrderJs( 'savepluginorder' );
		ob_start();
	?>
		function submitbutton3(pressbutton) {
			var form = document.adminForm_dir;

			// do field validation
			if (form.userfile.value == ""){
				alert('<?php echo addslashes( CBTxt::T('Please select a directory') ); ?>');
			} else {
				form.submit();
			}
		}
<?php
		$js			=	ob_get_contents();
		ob_end_clean();
		$_CB_framework->document->addHeadScriptDeclaration( $js );
?>
		<form action="<?php echo $_CB_framework->backendUrl( 'index.php' ); ?>" method="post" name="adminForm">

		<table class="adminheading" style="width:100%">
		<tr>
			<td style="width:80%">
			<?php echo htmlspecialchars( CBTxt::T('Filter') ); ?>: <input type="text" name="search" value="<?php echo htmlspecialchars( $search );?>" class="text_area" onChange="document.adminForm.submit();" />
			</td>
			<td align="right">
			<?php echo $lists['type'];?>
			</td>
		</tr>
		</table>

		<table class="adminlist">
		<thead>
		  <tr>
			<th width="20"><?php echo htmlspecialchars( CBTxt::T('#') ); ?></th>
			<th width="20">
			<input type="checkbox" name="toggle" value="" <?php echo 'onclick="checkAll(' . count( $rows ) . ');"';?> />
			</th>
			<th class="title">
			<?php echo htmlspecialchars( CBTxt::T('Plugin Name') ); ?>
			</th>
			<th nowrap="nowrap" width="5%">
	  		<?php echo htmlspecialchars( CBTxt::T('Installed') ); ?>
			</th>
			<th nowrap="nowrap" width="5%">
	  		<?php echo htmlspecialchars( CBTxt::T('Published') ); ?>
			</th>
			<th colspan="2" nowrap="nowrap" width="5%">
			<?php echo htmlspecialchars( CBTxt::T('Reorder') ); ?>
			</th>
			<th width="2%">
			<?php echo htmlspecialchars( CBTxt::T('Order') ); ?>
			</th>
			<th width="4%">
			<a href="javascript: cbsaveorder( <?php echo count( $rows )-1; ?> )"><img src="../components/com_comprofiler/plugin/templates/luna/images/mini-icons/icon-16-filesave.png" border="0" width="16" height="16" alt="<?php echo htmlspecialchars( CBTxt::T('Save Order') ); ?>" /></a>
			</th>
			<th nowrap="nowrap" align="left" width="10%">
			<?php echo htmlspecialchars( CBTxt::T('Access') ); ?>
			</th>
			<th nowrap="nowrap" align="left" width="10%">
			<?php echo htmlspecialchars( CBTxt::T('Type') ); ?>
			</th>
			<th nowrap="nowrap" align="left" width="10%">
			<?php echo htmlspecialchars( CBTxt::T('Directory') ); ?>
			</th>
		  </tr>
		</thead>
		<tbody>
		<?php
		$k = 0;
		for ($i=0, $n=count( $rows ); $i < $n; $i++) {
			$row 	= &$rows[$i];

			$xmlfile			=	$_PLUGINS->getPluginXmlPath( $row );
			$filesInstalled		=	file_exists($xmlfile);

			$link = $_CB_framework->backendUrl( "index.php?option=com_comprofiler&task=editPlugin&cid=$row->id" );

			//Access
			if ( !$row->access ) {
				$color_access = 'style="color: green;"';
				$task_access = 'accessregistered';
			} else if ( $row->access == 1 ) {
				$color_access = 'style="color: red;"';
				$task_access = 'accessspecial';
			} else {
				$color_access = 'style="color: black;"';
				$task_access = 'accesspublic';
			}

			$access = '	<a href="javascript: void(0);" onclick="return listItemTask(\'cb'. $i .'\',\''. $task_access .'\')" '. $color_access .'>
			'. $row->groupname .'
			</a>';

			//Checked Out
			if ( $filesInstalled && $row->checked_out ) {
				$hover = '';
				$date 				= cbFormatDate( $row->checked_out_time );
				$checked_out_text 	= '<table>';
				$checked_out_text 	.= '<tr><td>'. addslashes($row->editor) .'</td></tr>';
				$checked_out_text 	.= '<tr><td>'. $date .'</td></tr>';
				$checked_out_text 	.= '</table>';
				$hover = 'onMouseOver="return overlib(\''. htmlspecialchars( $checked_out_text ) .'\', CAPTION, \'Checked Out\', BELOW, RIGHT);" onMouseOut="return nd();"';

				if ( checkJversion() == 2 ) {
					$checked_img	 = 'templates/hathor/images/admin/checked_out.png';
				} else {
					$checked_img	 = 'images/checked_out.png';
				}

				$checked	 		= '<img src="'. $checked_img .'" '. $hover .'/>';
			} else {
				$checked = '<input type="checkbox" id="cb'.$i.'" name="cid[]" value="'.$row->id.'" onclick="isChecked(this.checked);" />';
			}

			$imgpath='../components/com_comprofiler/images/';
			//Installedg
			$instImg 	= $filesInstalled ? 'tick.png' : 'publish_x.png';
			$instAlt 	= htmlspecialchars( $filesInstalled ? CBTxt::T('Installed') : CBTxt::T('Plugin Files missing') );
			$installed  = '<img src="' . $imgpath . $instImg .'" border="0" alt="'. $instAlt .'"  title="'. $instAlt .'" />';

			//Published
			$img 	= $row->published ? 'publish_g.png' : 'publish_x.png';
			$task 	= $row->published ? 'unpublishPlugin' : 'publishPlugin';
			$alt 	= $row->published ? CBTxt::T('Published') : CBTxt::T('Unpublished');
			$action	= $row->published ? CBTxt::T('Unpublish Item') : CBTxt::T('Publish item');
			if ( ( $row->type == "language" ) && $row->published ) {
				$published = '<img src="' . $imgpath . 'publish_g.png" border="0" alt="' . htmlspecialchars( CBTxt::T('Published') ) . '" title="' . htmlspecialchars( CBTxt::T('language plugins cannot be unpublished, only uninstalled') ) . '" />';
			} elseif ( ( $row->id == 1 ) && $row->published ) {
				$published = '<img src="' . $imgpath . 'publish_g.png" border="0" alt="' . htmlspecialchars( CBTxt::T('Published') ) . '" title="' . htmlspecialchars( CBTxt::T('CB core plugin cannot be unpublished') ) . '" />';
			} else {
				$published = '<a href="javascript: void(0);" onclick="return listItemTask(\'cb'. $i .'\',\''. $task .'\')" title="'. htmlspecialchars( $action ) .'">
			<img src="'. $imgpath . $img .'" border="0" alt="'. htmlspecialchars( $alt ) .'" />
			</a>';
			}

			//Backend plugin menu:
			$backendPluginMenus = array();
			if ( isset( $row->backend_menu ) && $row->backend_menu ) {
				$backend = explode( ",", $row->backend_menu );
				foreach ( $backend as $backendAction ) {
					$backendActionParts = explode( ":", $backendAction );
					$backendActionLink = $_CB_framework->backendUrl( "index.php?option=com_comprofiler&task=pluginmenu&pluginid=$row->id&menu=$backendActionParts[1]" );
					$backendPluginMenus[] = '&nbsp; [<a href="' . $backendActionLink . '">' . $backendActionParts[0] . '</a>] ';
				}
			}

			?>
			<tr class="<?php echo "row$k"; ?>">
				<td align="right"><?php echo $i + 1 + $pageNav->limitstart ?></td>
				<td>
				<?php echo $checked; ?>
				</td>
				<td>
				<?php
				if ( ($row->checked_out && ( $row->checked_out != $_CB_framework->myId() )) || !$filesInstalled ) {
					if ( ! $filesInstalled ) {
						echo '<span title="' . $instAlt , '">';
					}
					echo $row->name;
					if ( ! $filesInstalled ) {
						echo "</span>";
					}
				} else {
					?>
					<a href="<?php echo $link; ?>">
					<?php echo htmlspecialchars( $row->name ); ?>
					</a>
					<?php
					echo implode( '', $backendPluginMenus );
				}
				?>
				</td>
				<td align="center">
				<?php echo $installed;?>
				</td>
				<td align="center">
				<?php echo $published;?>
				</td>
				<td>
				<?php    if (($i > 0 || ($i+$pageNav->limitstart > 0)) && $row->type == @$rows[$i-1]->type) { ?>
			         <a href="#reorder" onClick="return listItemTask('cb<?php echo $i;?>','orderupPlugin')">
			            <img src="../components/com_comprofiler/plugin/templates/luna/images/mini-icons/icon-12-uparrow.png" width="12" height="12" border="0" alt="<?php echo htmlspecialchars( CBTxt::T('Move Up') ); ?>" />
			         </a>
				<?php    } ?>
			      </td>
			      <td>
				<?php    if (($i < $n-1 || $i+$pageNav->limitstart < $pageNav->total-1) && $row->type == @$rows[$i+1]->type) { ?>
			         <a href="#reorder" onClick="return listItemTask('cb<?php echo $i;?>','orderdownPlugin')">
			            <img src="../components/com_comprofiler/plugin/templates/luna/images/mini-icons/icon-12-downarrow.png" width="12" height="12" border="0" alt="<?php echo htmlspecialchars( CBTxt::T('Move Down') ); ?>" />
			         </a>
				<?php    } ?>
				</td>
				<td align="center" colspan="2">
				<input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?>" class="text_area" style="text-align: center" />
				</td>
				<td align="left">
				<?php echo $access;?>
				</td>
				<td align="left" nowrap="nowrap">
				<?php echo $row->type;?>
				</td>
				<td align="left" nowrap="nowrap">
				<?php
			if ( ! $filesInstalled ) {
				echo '<span style="text-decoration:line-through" title="' . $instAlt , '">';
			}
			echo $row->element;
			if ( ! $filesInstalled ) {
				echo "</span>";
			}
				?>
				</td>
			</tr>
			<?php
			$k = 1 - $k;
		}
		?>
	</tbody>
	<tfoot>
     <tr>
      <th align="center" colspan="12"> <?php echo $pageNav->getListFooter(); ?></th>
     </tr>
    </tfoot>
  </table>
		<input type="hidden" name="option" value="<?php echo $option;?>" />
		<input type="hidden" name="task" value="showPlugins" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="hidemainmenu" value="0" />
		<?php
	echo cbGetSpoofInputTag( 'plugin' );
		?>
</form>


	<div style="clear:both; margin:20px 0px;">
		<table class="adminheading">
		<tr>
			<th class="install">
				<a name="getplugins"><?php echo htmlspecialchars( CBTxt::T('Get Plugins') ); ?></a>
			</th>
		</tr>
		<tr>
			<td align="left" style="padding-bottom:10px;">
				<a href="http://www.joomlapolis.com/cb-solutions" target="_blank"><?php echo htmlspecialchars( CBTxt::T('Click here to see more CB Plugins (Languages, Fields, Tabs, Signup-Connect, Paid Memberships and over 30 more) by CB Team at joomlapolis.com') ); ?></a>
			</td>
		</tr>
		<tr>
			<td align="left" style="padding-bottom:10px;">
				<a href="http://www.joomlapolis.com/cb-solutions/directory" target="_blank"><?php echo htmlspecialchars( CBTxt::T('Click here to see CB Directory listing hundreds of CB extensions at joomlapolis.com') ); ?></a>
			</td>
		</tr>
		<tr>
			<td align="left" style="padding-bottom:10px;">
				<a href="http://extensions.joomla.org/extensions/clients-a-communities/communities/210" target="_blank"><?php echo htmlspecialchars( CBTxt::T('Click here to Check our CB listing on JED and find more third-party free add-ons for your website') ); ?></a>
			</td>
		</tr>
		</table>
	</div>



	<div style="clear:both;">
		<table class="adminheading">
		<tr>
			<th class="install">
			<a name="install"><?php echo htmlspecialchars( CBTxt::T('Install New Plugin') ); ?></a>
			</th>
		</tr>
		</table>

		<form enctype="multipart/form-data" action="<?php echo $_CB_framework->backendUrl( 'index.php' ); ?>" method="post" name="filename">
		<table class="adminform">
		<tr>
			<th>
			<?php echo htmlspecialchars( CBTxt::T('Upload Package File') ); ?>
			</th>
		</tr>
		<tr>
			<td align="left">
			<?php echo htmlspecialchars( CBTxt::T('Package File:') ); ?>
			<input class="text_area" name="userfile" type="file" size="70"/>
			<input class="button" type="submit" value="<?php echo htmlspecialchars( CBTxt::T('Upload File & Install') ); ?>" />
			<?php echo CBTxt::P( 'Maximum upload size: <strong>[filesize]</strong> <em>(upload_max_filesize setting in file [php.ini] )</em>',
							 array( '[filesize]' => ini_get( 'upload_max_filesize' ),
							 		'[php.ini]' => ( is_callable( 'php_ini_loaded_file' ) && php_ini_loaded_file() ? htmlspecialchars( php_ini_loaded_file() ) : 'php.ini' ) ) ); ?>
			</td>
		</tr>
		</table>

		<input type="hidden" name="task" value="installPluginUpload"/>
		<input type="hidden" name="option" value="com_comprofiler"/>
		<input type="hidden" name="client" value=""/>
		<?php
	echo cbGetSpoofInputTag( 'plugin' );
		?>
		</form>
		<br />

		<form enctype="multipart/form-data" action="<?php echo $_CB_framework->backendUrl( 'index.php' ); ?>" method="post" name="adminForm_dir">
		<table class="adminform">
		<tr>
			<th>
			<?php echo htmlspecialchars( CBTxt::T('Install from directory') ); ?>
			</th>
		</tr>
		<tr>
			<td align="left">
			<?php echo htmlspecialchars( CBTxt::T('Install directory') ); ?>:&nbsp;
			<input type="text" name="userfile" class="text_area" size="65" value=""/>&nbsp;
			<input type="button" class="button" value="<?php echo htmlspecialchars( CBTxt::T('Install') ); ?>" onclick="submitbutton3()" />
			</td>
		</tr>
		</table>

		<input type="hidden" name="task" value="installPluginDir" />
		<input type="hidden" name="option" value="com_comprofiler"/>
		<input type="hidden" name="client" value=""/>
		<?php
	echo cbGetSpoofInputTag( 'plugin' );
		?>
		</form>
		<br />

		<form enctype="multipart/form-data" action="<?php echo $_CB_framework->backendUrl( 'index.php' ); ?>" method="post" name="adminForm_URL">
		<table class="adminform">
		<tr>
			<th>
			<?php echo htmlspecialchars( CBTxt::T('Install package from web (http/https)') ); ?>
			</th>
		</tr>
		<tr>
			<td align="left">
			<?php echo htmlspecialchars( CBTxt::T('Installation package URL') ); ?>:&nbsp;
			<input type="text" name="userfile" class="text_area" size="65" value=""/>&nbsp;
			<input class="button" type="submit" value="<?php echo htmlspecialchars( CBTxt::T('Download Package & Install') ); ?>" />
			</td>
		</tr>
		</table>

		<input type="hidden" name="task" value="installPluginURL" />
		<input type="hidden" name="option" value="com_comprofiler"/>
		<input type="hidden" name="client" value=""/>
		<?php
	echo cbGetSpoofInputTag( 'plugin' );
		?>
		</form>
		<br />
		<table class="content">
		<?php
	if (!is_callable(array("JFile","write")) || ($_CB_framework->getCfg('ftp_enable') != 1)) {
			writableCell( 'components/com_comprofiler/plugin/user' );
			// writableCell( 'components/com_comprofiler/plugin/fieldtypes' );
			writableCell( 'components/com_comprofiler/plugin/templates' );
			writableCell( 'components/com_comprofiler/plugin/language' );
	}
		writableCell( 'media' );

		?>
		</table>
	</div>
		<?php
	}
Ejemplo n.º 9
0
* as published by the Free Software Foundation; version 2 of the License.
*/
/** ensure this file is being included by a parent file */
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');
// ensure user has access to this function
//if ( !$acl->acl_check( 'administration', 'install', 'users', $my->usertype, $element . 's', 'all' ) ) {
//	mosRedirect( 'index2.php', T_('You are not authorized to view this resource.') );
//}
require_once $mainframe->getPath('installer_html', 'component');
$suppress_install = false;
if (!$suppress_install) {
    HTML_installer::showInstallForm(T_('Install Mambo plugin (component, module, mambot, template, include, parameter, composite)'), $option, 'universal', '', dirname(__FILE__));
    ?>
<table class="content">
<?php 
    writableCell('administrator/components');
    writableCell('administrator/modules');
    writableCell('administrator/templates');
    writableCell('components');
    writableCell('mambots');
    writableCell('mambots/content');
    writableCell('mambots/editors');
    writableCell('mambots/editors-xtd');
    writableCell('mambots/search');
    writableCell('media');
    writableCell('modules');
    writableCell('templates');
    ?>
</table>
<?php 
}
Ejemplo n.º 10
0
Archivo: mambot.php Proyecto: cwcw/cms
// ensure user has access to this function
if (!$acl->acl_check('administration', 'install', 'users', $my->usertype, $element . 's', 'all')) {
    mosRedirect('index2.php', _NOT_AUTH);
}
require_once $mainframe->getPath('installer_html', 'mambot');
showInstalledMambots($option);
HTML_installer::showInstallForm($adminLanguage->A_INSTALL_MAMB_INSTALL_MAMBOT, $option, 'mambot', '', dirname(__FILE__));
?>
<br /><br />
<table class="content">
<?php 
writableCell('media');
writableCell('language');
writableCell('mambots');
writableCell('mambots/content');
writableCell('mambots/search');
?>
</table>

<?php 
function showInstalledMambots($_option)
{
    global $database, $mosConfig_absolute_path;
    $database->setQuery("SELECT id, name, folder, element, client_id" . "\n FROM #__mambots" . "\n WHERE iscore='0'" . "\n ORDER BY folder, name");
    $rows = $database->loadObjectList();
    // path to mambot directory
    $mambotBaseDir = mosPathName(mosPathName($mosConfig_absolute_path) . "mambots");
    $id = 0;
    $n = count($rows);
    for ($i = 0; $i < $n; $i++) {
        $row =& $rows[$i];
Ejemplo n.º 11
0
writableCell('administrator/templates');
writableCell('components');
writableCell('images');
writableCell('images/banners');
writableCell($cparams->get('image_path'));
writableCell('language');
// List all site languages
$site_langs = JFolder::folders(JPATH_SITE . DS . 'language');
foreach ($site_langs as $slang) {
    writableCell('language/' . $slang);
}
writableCell('media');
writableCell('modules');
writableCell('plugins');
writableCell('plugins/content');
writableCell('plugins/editors');
writableCell('plugins/editors-xtd');
writableCell('plugins/search');
writableCell('plugins/system');
writableCell('plugins/user');
writableCell('plugins/xmlrpc');
writableCell('templates');
writableCell(JPATH_SITE . DS . 'cache', 0, '<strong>' . JText::_('Cache Directory') . '</strong> ');
writableCell(JPATH_ADMINISTRATOR . DS . 'cache', 0, '<strong>' . JText::_('Cache Directory') . '</strong> ');
writableCell($config->getValue('config.log_path', JPATH_ROOT . DS . 'log'), 0, '<strong>' . JText::_('Log Directory') . ' ($log_path)</strong> ');
writableCell($config->getValue('config.tmp_path', JPATH_ROOT . DS . 'tmp'), 0, '<strong>' . JText::_('Temp Directory') . ' ($tmp_path)</strong> ');
?>
		</tbody>
		</table>
</fieldset>
Ejemplo n.º 12
0
function configuration()
{
    global $secteur, $page, $php_recommended_settings, $_path;
    if ($page == 'configuration') {
        foreach ($php_recommended_settings as $l => $phprec) {
            $setting[$l] = get_php_setting($phprec[1]);
        }
        $sp = ini_get('session.save_path');
        ?>
<div id="ctr" align="center">
  <div class="install">
    <div class="Conteneur">
    
 <h1>Condition minimale requise:</h1>
    <ul style='text-align:left'>
<li>Serveur HTTP (Apache 2.x)</li>
<li>PHP (5.2.X)</li>
<li>Mysql (5.5) - (Caranille fonctionne aussi avec PostgreSQL et la base de donnée Oracle)</li>
</ul>
    
      <h1> Permissions des répertoires: </h1>
      <div class="install-text">
        <p> Certains répertoires doivent être accessibles en lecture et écriture. </p>
        <p> Si certains des répertoires listés co-contre sont dans l'état "Non modifiable", alors vous devrez changer les CHMOD pour les rendre "Modifiables". </p>
        <div class="clr">&nbsp;&nbsp;</div>
        <div class="ctr"></div>
      </div>
      <div class="install-form">
        <div class="form-block">
          <table class="content">
            <?php 
        writableCell('');
        writableCell('Logs');
        writableCell('Design');
        //writableCell( 'configuration' );
        writableCell('Scripts');
        writableCell('Styles');
        //	writableCell( 'tmp' );
        //writableCell( 'modules' );
        //writableCell( 'templates' );
        ?>
          </table>
        </div>
        <div class="clr"></div>
      </div>
      <div class="clr"></div>
      <h1> Vérification des paramètres nécessaires: </h1>
      <div class="install-text"> 
        <p> Si certains éléments sont écrits en rouge, alors veuillez prendre les mesures nécessaires pour les corriger. </p>
        <div class="ctr"></div>
      </div>
      <div class="install-form">
        <div class="form-block">
          <table class="content">
            <tr>
              <td class="item"> PHP version >= 5 </td>
              <td align="left"><?php 
        echo phpversion() < '5' ? '<b><font color="red">Non</font></b>' : '<b><font color="green">Oui</font></b>';
        ?>
 </td>
            </tr>
            <tr>
              <td>Compression ZLIB </td>
              <td align="left"><?php 
        echo extension_loaded('zlib') ? '<b><font color="green">Oui</font></b>' : '<b><font color="red">Non</font></b>';
        ?>
 </td>
            </tr>
            <tr>
              <td>Support XML </td>
              <td align="left"><?php 
        echo extension_loaded('xml') ? '<b><font color="green">Oui</font></b>' : '<b><font color="red">Non</font></b>';
        ?>
 </td>
            </tr>
            <tr>
              <td>Support MySQL </td>
              <td align="left"><?php 
        echo function_exists('mysql_connect') ? '<b><font color="green">Oui</font></b>' : '<b><font color="red">Non</font></b>';
        ?>
 </td>
            </tr>
            <tr>
              <td valign="top" class="item"> Config.php </td>
              <td align="left"><?php 
        if (@file_exists($_path . 'Config.php') && @is_writable($_path . 'Config.php')) {
            echo '<b><font color="green">Modifiable</font></b>';
        } elseif (is_writable($_path)) {
            echo '<b><font color="green">Modifiable</font></b>';
        } else {
            echo '<b><font color="red">Non modifiable</font></b>';
            echo "<br /><span class='small'>Vous pouvez poursuivre l'installation, vous devrez toutefois copier et coller les données de configuration affichées à la fin de l'installation dans un fichier Config.php, que vous devrez ensuite uploader.</span>";
        }
        ?>
              </td>
            </tr>
            
            <tr>
              <td class="item"> Session save path </td>
              <td align="left" valign="top"><?php 
        echo is_writable($sp) ? '<b><font color="green">Modifiable</font></b>' : '<b><font color="red">Non modifiable</font></b>';
        ?>
 </td>
            </tr>
            <tr>
              <td class="item" colspan="2"><b> <?php 
        echo $sp ? $sp : 'Not set';
        ?>
 </b> </td>
            </tr>
        </table>
        </div>
      </div>
      <div class="clr"></div>
      <?php 
        $wrongSettingsTexts = array();
        if (ini_get('magic_quotes_gpc') == '1') {
            $wrongSettingsTexts[] = 'Paramètre PHP magic_quotes_gpc est sur `ON` au lieu de `OFF`';
        }
        if (ini_get('register_globals') == '1') {
            $wrongSettingsTexts[] = 'Paramètre PHP register_globals est sur `ON` au lieu de `OFF`';
        }
        if (count($wrongSettingsTexts)) {
            ?>
      <h1> Vérification de la sécurité: </h1>
      <div class="install-text">
        <p> Les paramètres PHP Serveur suivants ne sont pas optimum pour la <strong>Sécurité</strong> de votre site, il vous est recommandé de les modifier: </p>
      </div>
      <div class="install-form">
        <div class="form-block" style=" border: 1px solid #cc0000; background: #ffffcc;">
          <table class="content">
            <tr>
            
            
              <td class="item"><ul style="margin: 0px; padding: 0px; padding-left: 5px; text-align: left; padding-bottom: 0px; list-style: none;">
                  <?php 
            foreach ($wrongSettingsTexts as $txt) {
                ?>
                  <li style="min-height: 25px; padding-bottom: 5px; padding-left: 25px; color: red; font-weight: bold;" >
                    <?php 
                echo $txt;
                ?>
                  </li>
                  <?php 
            }
            ?>
                </ul></td>
            </tr>
          </table>
        </div>
      </div>
      <div class="clr"></div>
      <?php 
        }
        ?>
      <h1> Configuration recommandée: </h1>
      <div class="install-text">
        <p> Ces paramètres PHP sont recommandés afin d'assurer 
          une pleine compatibilité avec le script. </p>
        <p> Toutefois cela fonctionne correctement s'ils ne sont pas activés. <br />
        </p>
        <div class="ctr"></div>
      </div>
      <div class="install-form">
        <div class="form-block">
          <table class="content">
            <tr>
              <td class="toggle" width="500px"> Directive </td>
              <td class="toggle"> Recommandé </td>
              <td class="toggle"> Actuel </td>
            </tr>
              

                       <?php 
        foreach ($php_recommended_settings as $l => $phprec) {
            ?>
            <tr>
            
              <td class="item"><?php 
            echo $phprec[0];
            ?>
</td>
              <td class="toggle"><font color="blue"><?php 
            echo $phprec[2];
            ?>
</font></td>
              <td>
                <strong>
          <font color="<?php 
            echo $setting[$l] == $phprec[2] ? "green" : "red";
            ?>
"><?php 
            echo $setting[$l];
            ?>
</font> 
                </strong>
              </td>
            </tr>
            <?php 
        }
        ?>
            
                        <tr>
              <td>Réécriture URL </td>
               <td class="toggle"><font color="blue">ON</font></td>
              <td align="left"><?php 
        echo function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules()) ? '<b><font color="green">ON</font></b>' : '<b><font color="red">OFF</font></b>';
        ?>
 </td>
            </tr>
            
          </table>
        </div>
      </div>
    </div>
  </div>
</div>
<?php 
    }
}
Ejemplo n.º 13
0
writableCell('cache');
writableCell('logs');
writableCell('css');
writableCell('js');
writableCell('images');
writableCell('system/config');
writableCell('application/config');
writableCell('admin/application/config');
writableCell('modules/plugins/controllers');
writableCell('modules/plugins/views');
writableCell('modules/plugins/i18n');
writableCell('images/background');
writableCell('images/articles');
writableCell('images/character');
writableCell('images/items');
writableCell('images/sorts');
?>
</table>

<h1> Vérification des paramètres nécessaires</h1>
<hr/>
<p> Si certains éléments sont écrits en <font color="red">rouge</font>, alors veuillez prendre les mesures nécessaires pour les corriger. </p>
<table class="list_table">
		<tr>
				<td class="item"> PHP version &gt;= 5.2 </td>
				<td align="left"><?php 
$vs = @phpversion();
echo $vs < 5.2 ? '<b><font color="red">Non (' . $vs . ')</font></b>' : '<b><font color="green">Oui (' . $vs . ')</font></b>';
?>
</td>
		</tr>
Ejemplo n.º 14
0
function view()
{
    $sp = ini_get('session.save_path');
    $_VERSION = new joomlaVersion();
    $versioninfo = $_VERSION->RELEASE . '.' . $_VERSION->DEV_LEVEL . ' ' . $_VERSION->DEV_STATUS;
    $version = $_VERSION->PRODUCT . ' ' . $_VERSION->RELEASE . '.' . $_VERSION->DEV_LEVEL . ' ' . $_VERSION->DEV_STATUS . ' [ ' . $_VERSION->CODENAME . ' ] ' . $_VERSION->RELDATE . ' ' . $_VERSION->RELTIME . ' ' . $_VERSION->RELTZ;
    echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?" . ">";
    ?>
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<title>Joomla! - Web Installer</title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<link rel="shortcut icon" href="../images/favicon.ico" />
	<link rel="stylesheet" href="install.css" type="text/css" />
	</head>
	<body>

	<div id="wrapper">
		<div id="header">
			<div id="joomla">
				<img src="header_install.png" alt="Joomla! Installation" />
			</div>
		</div>
	</div>

	<div id="ctr" align="center">
		<div class="install">
			<div id="stepbar">
				<div class="step-on">pre-installation check</div>
				<div class="step-off">license</div>
				<div class="step-off">step 1</div>
				<div class="step-off">step 2</div>
				<div class="step-off">step 3</div>
				<div class="step-off">step 4</div>
			</div>

			<div id="right">
				<div id="step">pre-installation check</div>

				<div class="far-right">
					<input name="Button2" type="submit" class="button" value="Next >>" onclick="window.location='install.php';" />
					<br/>
					<br/>
					<input type="button" class="button" value="Check Again" onclick="window.location=window.location" />
				</div>
				<div class="clr"></div>

				<h1 style="text-align: center; border-bottom: 0px;">
					<?php 
    echo $version;
    ?>
				</h1>

				<h1>
					Required Settings Check:
				</h1>

				<div class="install-text">
					<p>
						If any of these items are highlighted in red then please take actions to correct them.
					</p>
					<p>
						Failure to do so could lead to your Joomla! installation not functioning correctly.
					</p>
					<div class="ctr"></div>
				</div>

				<div class="install-form">
					<div class="form-block">
						<table class="content">
						<tr>
							<td class="item">
								PHP version >= 4.1.0
							</td>
							<td align="left">
								<?php 
    echo phpversion() < '4.1' ? '<b><font color="red">No</font></b>' : '<b><font color="green">Yes</font></b>';
    ?>
							</td>
						</tr>
						<tr>
							<td>
								&nbsp; - zlib compression support
							</td>
							<td align="left">
								<?php 
    echo extension_loaded('zlib') ? '<b><font color="green">Available</font></b>' : '<b><font color="red">Unavailable</font></b>';
    ?>
							</td>
						</tr>
						<tr>
							<td>
								&nbsp; - XML support
							</td>
							<td align="left">
								<?php 
    echo extension_loaded('xml') ? '<b><font color="green">Available</font></b>' : '<b><font color="red">Unavailable</font></b>';
    ?>
							</td>
						</tr>
						<tr>
							<td>
								&nbsp; - MySQL support
							</td>
							<td align="left">
								<?php 
    echo function_exists('mysql_connect') ? '<b><font color="green">Available</font></b>' : '<b><font color="red">Unavailable</font></b>';
    ?>
							</td>
						</tr>
						<tr>
							<td valign="top" class="item">
								configuration.php
							</td>
							<td align="left">
								<?php 
    if (@file_exists('../configuration.php') && @is_writable('../configuration.php')) {
        echo '<b><font color="green">Writeable</font></b>';
    } else {
        if (is_writable('..')) {
            echo '<b><font color="green">Writeable</font></b>';
        } else {
            echo '<b><font color="red">Unwriteable</font></b><br /><span class="small">You can still continue the install as the configuration will be displayed at the end, just copy & paste this and upload.</span>';
        }
    }
    ?>
							</td>
						</tr>
						<tr>
							<td class="item">
								Session save path
							</td>
							<td align="left" valign="top">
								<?php 
    echo is_writable($sp) ? '<b><font color="green">Writeable</font></b>' : '<b><font color="red">Unwriteable</font></b>';
    ?>
							</td>
						</tr>
						<tr>
							<td class="item" colspan="2">
								<b>
									<?php 
    echo $sp ? $sp : 'Not set';
    ?>
								</b>
							</td>
						</tr>
						</table>
					</div>
				</div>
				<div class="clr"></div>

				<?php 
    $wrongSettingsTexts = array();
    if (ini_get('magic_quotes_gpc') != '1') {
        $wrongSettingsTexts[] = 'PHP magic_quotes_gpc setting is `OFF` instead of `ON`';
    }
    if (ini_get('register_globals') == '1') {
        $wrongSettingsTexts[] = 'PHP register_globals setting is `ON` instead of `OFF`';
    }
    if (count($wrongSettingsTexts)) {
        ?>
					<h1>
						Security Check:
					</h1>

					<div class="install-text">
						<p>
							Following PHP Server Settings are not optimal for <strong>Security</strong> and it is recommended to change them:
						</p>
						<p>
							Please check <a href="http://forum.joomla.org/index.php/topic,81058.0.html" target="_blank">the Official Joomla! Server Security post</a> for more information.
						</p>
						<div class="ctr"></div>
					</div>

					<div class="install-form">
						<div class="form-block" style=" border: 1px solid #cc0000; background: #ffffcc;">
							<table class="content">
							<tr>
								<td class="item">
									<ul style="margin: 0px; padding: 0px; padding-left: 5px; text-align: left; padding-bottom: 0px; list-style: none;">
										<?php 
        foreach ($wrongSettingsTexts as $txt) {
            ?>
											<li style="min-height: 25px; padding-bottom: 5px; padding-left: 25px; color: red; font-weight: bold; background-image: url(../includes/js/ThemeOffice/warning.png); background-repeat: no-repeat; background-position: 0px 2px;" >
												<?php 
            echo $txt;
            ?>
											</li>
											<?php 
        }
        ?>
									</ul>
								</td>
							</tr>
							</table>
						</div>
					</div>
					<div class="clr"></div>
					<?php 
    }
    ?>

				<h1>
					Recommended Settings Check:
				</h1>

				<div class="install-text">
					<p>
						These settings are recommended for PHP in order to ensure full
						compatibility with Joomla!.
					</p>
					<p>
						However, Joomla! will still operate if your settings do not quite match the recommended
					</p>
					<div class="ctr"></div>
				</div>

				<div class="install-form">
					<div class="form-block">

						<table class="content">
						<tr>
							<td class="toggle" width="500px">
								Directive
							</td>
							<td class="toggle">
								Recommended
							</td>
							<td class="toggle">
								Actual
							</td>
						</tr>
						<?php 
    $php_recommended_settings = array(array('Safe Mode', 'safe_mode', 'OFF'), array('Display Errors', 'display_errors', 'ON'), array('File Uploads', 'file_uploads', 'ON'), array('Magic Quotes GPC', 'magic_quotes_gpc', 'ON'), array('Magic Quotes Runtime', 'magic_quotes_runtime', 'OFF'), array('Register Globals', 'register_globals', 'OFF'), array('Output Buffering', 'output_buffering', 'OFF'), array('Session auto start', 'session.auto_start', 'OFF'));
    foreach ($php_recommended_settings as $phprec) {
        ?>
							<tr>
								<td class="item">
									<?php 
        echo $phprec[0];
        ?>
:
								</td>
								<td class="toggle">
									<?php 
        echo $phprec[2];
        ?>
:
								</td>
								<td>
									<b>
										<?php 
        if (get_php_setting($phprec[1]) == $phprec[2]) {
            ?>
											<font color="green">
											<?php 
        } else {
            ?>
											<font color="red">
											<?php 
        }
        echo get_php_setting($phprec[1]);
        ?>
										</font>
									</b>
								<td>
							</tr>
							<?php 
    }
    ?>
						</table>
					</div>
				</div>
				<div class="clr"></div>

				<h1>
					Directory and File Permissions Check:
				</h1>

				<div class="install-text">
					<p>
						In order for Joomla! to function correctly it needs to be able to access or write to certain files or directories.
					</p>
					<p>
						If you see "Unwriteable" you need to change the permissions on the file or directory to allow Joomla! to write to it.
					</p>
					<div class="clr">&nbsp;&nbsp;</div>
					<div class="ctr"></div>
				</div>

				<div class="install-form">
					<div class="form-block">
						<table class="content">
						<?php 
    writableCell('administrator/backups');
    writableCell('administrator/components');
    writableCell('administrator/modules');
    writableCell('administrator/templates');
    writableCell('cache');
    writableCell('components');
    writableCell('images');
    writableCell('images/banners');
    writableCell('images/stories');
    writableCell('language');
    writableCell('mambots');
    writableCell('mambots/content');
    writableCell('mambots/editors');
    writableCell('mambots/editors-xtd');
    writableCell('mambots/search');
    writableCell('mambots/system');
    writableCell('media');
    writableCell('modules');
    writableCell('templates');
    ?>
						</table>
					</div>
					<div class="clr"></div>
				</div>


				<div class="clr"></div>
			</div>
			<div class="clr"></div>
		</div>
	</div>

	<div class="ctr">
		<a href="http://www.joomla.org" target="_blank">Joomla!</a> is Free Software released under the GNU/GPL License.
	</div>

	</body>
	</html>
	<?php 
}
Ejemplo n.º 15
0
<?php

/**
* @version $Id: template.php,v 1.1 2004/10/13 08:16:15 dappa Exp $
* @package Mambo_4.5.1
* @copyright (C) 2000 - 2004 Miro International Pty Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* Mambo is Free Software
* @subpackage Installer
*/
/** ensure this file is being included by a parent file */
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');
// ensure user has access to this function
if (!$acl->acl_check('administration', 'install', 'users', $my->usertype, $element . 's', 'all')) {
    mosRedirect('index2.php', _NOT_AUTH);
}
$client = mosGetParam($_REQUEST, 'client', '');
$userfile = mosGetParam($_REQUEST, 'userfile', dirname(__FILE__));
$userfile = mosPathName($userfile);
HTML_installer::showInstallForm($adminLanguage->A_INSTALL_TEMPL_INSTALL . ($client == 'admin' ? $adminLanguage->A_INSTALL_TEMPL_ADMIN_TEMPL : $adminLanguage->A_INSTALL_TEMPL_SITE_TEMPL), $option, 'template', $client, $userfile, '<a href="index2.php?option=com_templates&client=' . $client . '">' . $adminLanguage->A_INSTALL_TEMPL_BACKTTO_TEMPL . '</a>');
?>
<table class="content">
<?php 
writableCell('media');
writableCell('administrator/templates');
writableCell('templates');
writableCell('images/stories');
?>
</table>
Ejemplo n.º 16
0
function view()
{
    $sp = ini_get('session.save_path');
    $_VERSION = new joomlaVersion();
    $versioninfo = $_VERSION->RELEASE . '.' . $_VERSION->DEV_LEVEL . ' ' . $_VERSION->DEV_STATUS;
    $version = $_VERSION->PRODUCT . ' ' . $_VERSION->RELEASE . '.' . $_VERSION->DEV_LEVEL . ' ' . $_VERSION->DEV_STATUS . ' [ ' . $_VERSION->CODENAME . ' ] ' . $_VERSION->RELDATE . ' ' . $_VERSION->RELTIME . ' ' . $_VERSION->RELTZ;
    echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?" . ">";
    ?>
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<title>Joomla! - Instalador Web</title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<link rel="shortcut icon" href="../images/favicon.ico" />
	<link rel="stylesheet" href="install.css" type="text/css" />
	</head>
	<body>
	
	<div id="wrapper">
	  <div id="div">
        <div id="header">
          <div id="joomla"><img src="header_install.png" alt="Instalação do Joomla" /></div>
        </div>
      </div>
	</div>
	
	<div id="ctr" align="center">
		<div class="install">
			<div id="stepbar">
				<div class="step-on">Checagem de <br /> pré-instalação</div>
				<div class="step-off">Licença</div>
				<div class="step-off">1º passo</div>
				<div class="step-off">2º passo</div>
				<div class="step-off">3º passo</div>
				<div class="step-off">4º passo</div>
			</div>
	
			<div id="right">
				<div id="step">Checagem de pré-instalação</div>
	
				<div class="far-right">
					<input name="Button2" type="submit" class="button" value="Próximo >>" onclick="window.location='install.php';" />
					<br/>
					<br/>
					<input type="button" class="button" value="Checar Novamente" onclick="window.location=window.location" />
				</div>
				<div class="clr"></div>				
					
				<h1>Checagem de pré-instalação para:<br/><?php 
    echo $version;
    ?>
</h1>
	
				<h1>
					Configurações requeridas:
				</h1>
				
<div class="install-text"> Se algum destes itens estiver destacado em vermelho
  então por favor providencie a correção do mesmo. A persistência da falha pode
  levar a sua instalação do Joomla a não funcionar corretamente.
  <div class="ctr"></div>
			  </div>
	
				<div class="install-form">
					<div class="form-block">
						<table class="content">
						<tr>
							<td class="item">
								Versão do PHP >  4.1.0							</td>
							<td align="left">
								<?php 
    echo phpversion() < '4.1' ? '<b><font color="red">Não</font></b>' : '<b><font color="green">Sim</font></b>';
    ?>
							</td>
						</tr>
						<tr>
							<td>
								&nbsp; - Suporte à compressão zlib							</td>
							<td align="left">
								<?php 
    echo extension_loaded('zlib') ? '<b><font color="green">Disponível</font></b>' : '<b><font color="red">Não Disponível</font></b>';
    ?>
							</td>
						</tr>
						<tr>
							<td>
								&nbsp; - Suporte à XML							</td>
							<td align="left">
								<?php 
    echo extension_loaded('xml') ? '<b><font color="green">Disponível</font></b>' : '<b><font color="red">Não Disponível</font></b>';
    ?>
							</td>
						</tr>
						<tr>
							<td>
								&nbsp; - Suporte à MySQL							</td>
							<td align="left">
								<?php 
    echo function_exists('mysql_connect') ? '<b><font color="green">Disponível</font></b>' : '<b><font color="red">Não Disponível</font></b>';
    ?>
							</td>
						</tr>
						<tr>
							<td valign="top" class="item">
								configuration.php							</td>
							<td align="left">
								<?php 
    if (@file_exists('../configuration.php') && @is_writable('../configuration.php')) {
        echo '<b><font color="green">Permissão para escrita</font></b>';
    } else {
        if (is_writable('..')) {
            echo '<b><font color="green">Permissão para escrita</font></b>';
        } else {
            echo '<b><font color="red">Sem permissão para escrita</font></b><br /><span class="small">You can still continue the install as the configuration will be displayed at the end, just copy & paste this and upload.</span>';
        }
    }
    ?>
							</td>
						</tr>
						<tr>
							<td class="item">
								Caminho das sessões							</td>
							<td align="left" valign="top">
								<?php 
    echo is_writable($sp) ? '<b><font color="green">Permissão para escrita</font></b>' : '<b><font color="red">Sem permissão para escrita</font></b>';
    ?>
							</td>
						</tr>
						<tr>
							<td class="item" colspan="2">
								<b>
									<?php 
    echo $sp ? $sp : 'Não definido';
    ?>
								</b>							</td>
						</tr>
						</table>
					</div>
				</div>
				<div class="clr"></div>
		
				<?php 
    $wrongSettingsTexts = array();
    if (ini_get('magic_quotes_gpc') != '1') {
        $wrongSettingsTexts[] = 'Configuração PHP - Citações Mágicas (magic_quotes_gpc) está `Desligado` em vez de `Ligado`';
    }
    if (ini_get('register_globals') == '1') {
        $wrongSettingsTexts[] = 'Configuração PHP - Registo de Globais (register_globals) está `Ligado` em vez de `Desligado`';
    }
    if (count($wrongSettingsTexts)) {
        ?>
<h1>
						Checar Segurança:
			  </h1>
					
					<div class="install-text">
						<p>
							As seguintes configurações de segurança do servidor PHP não estão otimizadas para SEGURANÇA é recomendado que elas sejam alteradas						</p>
						<p>
							Por favor, consulte o <a href="http://forum.joomla.org/index.php/topic,81058.0.html" target="_blank">artigo oficial Joomla! sobre Segurança de Servidores</a> para mais informações.						</p>
						<div class="ctr"></div>
					</div>
							
					<div class="install-form">
						<div class="form-block" style=" border: 1px solid #cc0000; background: #ffffcc;">
							<table class="content">
							<tr>
								<td class="item">
									<ul style="margin: 0px; padding: 0px; padding-left: 5px; text-align: left; padding-bottom: 0px; list-style: none;">
										<?php 
        foreach ($wrongSettingsTexts as $txt) {
            ?>
	
											<li style="min-height: 25px; padding-bottom: 5px; padding-left: 25px; color: red; font-weight: bold; background-image: url(../includes/js/ThemeOffice/warning.png); background-repeat: no-repeat; background-position: 0px 2px;" >
												<?php 
            echo $txt;
            ?>
											</li>
											<?php 
        }
        ?>
									</ul>								</td>
							</tr>
							</table>
						</div>
					</div>
					<div class="clr"></div>
					<?php 
    }
    ?>
												
				<h1>
					Configurações recomendadas:
			  </h1>
				
				<div class="install-text">
					<p>
						Estas configurações são recomendadas para o PHP de modo a assegurar total compatibilidade com o Joomla. 
Contudo, o Joomla ainda poderá funcionar caso suas configurações não estejam totalmente de acordo com o recomendado (como é o caso do Registar Globais)					</p>
					<div class="ctr"></div>
				</div>
		
				<div class="install-form">
					<div class="form-block">
		
						<table class="content">
						<tr>
							<td class="toggle" width="500px">
								Diretiva							</td>
							<td class="toggle">
								Recomendado							</td>
							<td class="toggle">
								Atual							</td>
						</tr>
						<?php 
    $php_recommended_settings = array(array('Modo Seguro', 'safe_mode', 'DESLIGADO'), array('Exibir erros', 'display_errors', 'LIGADO'), array('Enviar arquivos', 'file_uploads', 'LIGADO'), array('Citações mágicas GPC', 'magic_quotes_gpc', 'LIGADO'), array('Citações mágicas runtime', 'magic_quotes_runtime', 'DESLIGADO'), array('Registro globais', 'register_globals', 'DESLIGADO'), array('Memória de saída', 'output_buffering', 'DESLIGADO'), array('Início aut. de sessão', 'session.auto_start', 'DESLIGADO'));
    foreach ($php_recommended_settings as $phprec) {
        ?>
							<tr>
								<td class="item">
									<?php 
        echo $phprec[0];
        ?>
:								</td>
								<td class="toggle">
									<?php 
        echo $phprec[2];
        ?>
:								</td>
								<td>
									<b>
										<?php 
        if (get_php_setting($phprec[1]) == $phprec[2]) {
            ?>
											<font color="green">
											<?php 
        } else {
            ?>
											<font color="red">
											<?php 
        }
        echo get_php_setting($phprec[1]);
        ?>
										</font>									</b>
							<td>							</tr>
							<?php 
    }
    ?>
						</table>
					</div>
				</div>
				<div class="clr"></div>
		
				<h1>
					Permissões de Arquivos e Diretórios:
				</h1>
				
				<div class="install-text">
					Para que o Joomla funcione corretamente é necessário que ele tenha permissão de acesso ou gravação a alguns arquivos e diretórios. Caso esteja visível a indicação de "Sem permissão " deverá alterar as permissões nos arquivos ou diretórios para permitir acesso de escrita ao Joomla (por FTP fazer CHOMOD 755 ou 777 aos arquivos).
					<div class="clr">&nbsp;&nbsp;</div>
					<div class="ctr"></div>
				</div>
		
				<div class="install-form">
					<div class="form-block">	
						<table class="content">
						<?php 
    writableCell('administrator/backups');
    writableCell('administrator/components');
    writableCell('administrator/modules');
    writableCell('administrator/templates');
    writableCell('cache');
    writableCell('components');
    writableCell('images');
    writableCell('images/banners');
    writableCell('images/stories');
    writableCell('language');
    writableCell('mambots');
    writableCell('mambots/content');
    writableCell('mambots/editors');
    writableCell('mambots/editors-xtd');
    writableCell('mambots/search');
    writableCell('mambots/system');
    writableCell('media');
    writableCell('modules');
    writableCell('templates');
    ?>
						</table>
					</div>
					<div class="clr"></div>
				</div>
	
				
				<div class="clr"></div>
			</div>
			<div class="clr"></div>
		</div>
	</div>
	
	<div class="ctr">
        <a href="http://www.joomla.org" target="_blank">JoomlaClube</a> Comunidade do Joomla no Brasil.<br />
		<a href="http://www.joomla.org" target="_blank">Joomla!</a> é um Software Livre liberado sob a licença GNU/GPL.
	</div>
	
	</body>
	</html>
	<?php 
}
Ejemplo n.º 17
0
}
writableCell('administrator/modules');
writableCell('administrator/templates');
writableCell('components');
writableCell('images');
writableCell('images/banners');
writableCell($cparams->get('image_path'));
writableCell('language');
// List all site languages
$site_langs = JFolder::folders(JPATH_SITE . DS . 'language');
foreach ($site_langs as $slang) {
    writableCell('language/' . $slang);
}
writableCell('media');
writableCell('modules');
writableCell('plugins');
writableCell('plugins/content');
writableCell('plugins/editors');
writableCell('plugins/editors-xtd');
writableCell('plugins/search');
writableCell('plugins/system');
writableCell('plugins/user');
writableCell('plugins/xmlrpc');
writableCell('tmp');
writableCell('templates');
writableCell(JPATH_SITE . DS . 'cache', 0, '<strong>' . JText::_('Cache Directory') . '</strong> ');
writableCell(JPATH_ADMINISTRATOR . DS . 'cache', 0, '<strong>' . JText::_('Cache Directory') . '</strong> ');
?>
		</tbody>
		</table>
</fieldset>
Ejemplo n.º 18
0
    }
    ?>
			</table>
		</td>
	</tr>
	<tr>
		<td colspan="2"><h3>Directory &amp; File Permissions</h3></td>
	</tr>
	<tr>
		<td class="item-desc">In order for eLitius Pro to function correctly it needs to be able to access or write to certain files or directories. If you see "Unwriteable" you need to change the permissions on the file or directory to allow eLitius Pro to write to it.</td>
		<td class="inner-content">
			<table width="100%">
			<?php 
    /*writableCell('ads');
    		writableCell('backup');*/
    writableCell('tmp');
    /*writableCell('uploads');*/
    ?>
			<tr>
				<td valign="top" class="elem">config.inc.php</td>
				<td align="left">
				<?php 
    if (is_writable('../includes/config.inc.php')) {
        echo '<span class="yes">Writeable</span>';
    } else {
        echo '<span class="no">Unwriteable</span><br />';
        echo 'You can still continue the install as the configuration will be displayed at the end, just copy &amp; paste this and upload.';
    }
    ?>
				</td>
			</tr>