Просмотр файла script/admin/info.php

Размер файла: 2.91Kb
<?php
/*-----------------------------------------------------------------------------------------
mcGalleryPRO
All code is © 2003 Marc Cagninacci.
No files may be redistributed in whole or significant part.
----------------- mcgalleryPRO IS NOT FREE SOFTWARE -------------------
You should have receive a file called license.txt in this package
--------------------------------------------------------------------------------------------*/

/*
*   THIS FILE IS FOR mcGalleryPRO SUPPORT USE.
*   PLEASE DO NOT REMOVE OR MODIFY IT.
*/
?>
<html>
<head>
<style type="text/css">
<!--
a:link {  font-family: Verdana, Arial; color: blue; text-decoration: none}
a:actif {  font-family: Verdana, Arial; color: blue; text-decoration: none}
a:visited {  font-family: Verdana, Arial; color: blue; text-decoration: none}
a:hover {  font-family: Verdana, Arial; color: blue; text-decoration: none}
-->
</style>
</head><body><font face="verdana" size="2">
<?php
if (!empty($_GET)) { extract($_GET, EXTR_OVERWRITE); }

echo '<a href="info.php?t=php"><b>PHP info</b></a>&nbsp;&nbsp;&nbsp;';
echo '<a href="info.php?t=tables"><b>Tables</b></a>&nbsp;&nbsp;&nbsp;';
echo '<a href="info.php?t=photos"><b>Photos</b></a>&nbsp;&nbsp;&nbsp;';
echo '<a href="info.php?t=videos"><b>Videos</b></a>&nbsp;&nbsp;&nbsp;';
echo '<a href="info.php?t=flash"><b>Flash</b></a><br><br>';

if (empty($t)) $t = 'photos';
if (empty($d)) $d = '';

if ($t == 'tables')
{
$table_liste = array("mcgallery_albumflash","mcgallery_albumphoto","mcgallery_albumvideo",
		"mcgallery_card","mcgallery_comment","mcgallery_flash",
		"mcgallery_members","mcgallery_news","mcgallery_photo",
		"mcgallery_select","mcgallery_upload","mcgallery_video");
include './conf.inc.php';
$connect = mysql_connect($host,$login,$pass);
mysql_select_db($base, $connect);

$result = mysql_list_tables ($base);
  $i = 0;
  $j = 0;
  while ($i < mysql_num_rows($result))
  {
    $tb_names[$i] = mysql_tablename ($result, $i);
    if (substr($tb_names[$i],0,10) == 'mcgallery_')  
	{ 
	 $j++; 
	 $tables[] = $tb_names[$i];
	 echo '<b>'.$j.'</b>: '.$tb_names[$i].'<br>';
	}
    $i++;
  }
echo '<br><b>'.$j.'</b> mcgallery_xx tables in the database.<br><br>';
if ($diff = array_diff ($table_liste, $tables))
 {
  echo '<b>Missing:<br></b>';
  while (list($key, $val) = each($diff)) echo $val.'<br>';
 } 
}

elseif ($t == 'php') phpinfo();

else
{
$dir='../'.$t.'/'.$d;
echo '<b>'.$t.'/'.$d.'</b>';
$handle=opendir($dir);
rewinddir($handle);
       while ($file = readdir($handle))
       {
          if ($file != "." && $file != "..")
          {
		    if (is_dir($dir.'/'.$file))
		    {
		      if ($file == 'small' || $file == 'big') $file = $d.'/'.$file;
			 echo '<br>&nbsp;&nbsp;<a href="info.php?t='.$t.'&d='.$file.'"><b>'.$file.'</b></a>';
		    }
		  else   echo '<br>&nbsp;&nbsp;'.$file;
          }
       }
closedir($handle);
}
?>
</font></body></html>