/web/htdocs/www.euroroma.net/home/public/gallery2/lib/support/index.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
define
('G2_SUPPORT_URL_FRAGMENT''');
require_once(
dirname(__FILE__) . '/security.inc');
ob_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php
/* Tell other scripts we passed security.inc ok */
define('G2_SUPPORT'true);
if (!empty(
$_SERVER['QUERY_STRING'])) {
    foreach (array(
'phpinfo''cache''gd''chmod''import') as $script) {
        
/*
         * Don't use isset($_GET[$script]) since we want to allow for GET args could collide
         * with the above mentioned script names
         */
    
if ($_SERVER['QUERY_STRING'] == $script ||
            
strncmp($_SERVER['QUERY_STRING'], $script '&'strlen($script)+1) == 0) {
        include(
dirname(__FILE__) . '/' $script '.php');
        
$results ob_get_contents();
        
ob_end_clean();
        print 
$results;
        return;
    }
    }
}
function 
generateUrl($uri$print=true) {
    
/* If session.use_trans_sid is on then it will add the session id. */
    
if (!GallerySetupUtilities::areCookiesSupported() && !ini_get('session.use_trans_sid')) {
    
$sid session_name() . '=' session_id();
    
$uri .= (!strpos($uri'?') ? '?' '&amp;') . $sid;
    }
    if (
$print) {
    print 
$uri;
    }
    return 
$uri;
}
?>
<html>
  <head>
    <title>Gallery Support</title>
    <link rel="stylesheet" type="text/css" href="<?php print $baseUrl ?>support.css"/>
  </head>

  <body>
    <div id="content">
      <div id="title">
        <a href="../../">Gallery</a> &raquo; Support
      </div>

      <h2>
    This is a collection of scripts that you use to troubleshoot problems with
    your Gallery installation.
      </h2>

      <h2>
        <a href="<?php generateUrl('index.php?phpinfo'?>">PHP Info</a>
      </h2>
      <p class="description">
        PHP configuration information
      </p>
      <hr class="faint" />

      <h2>
        <a href="<?php generateUrl('index.php?cache'?>">Cache Maintenance</a>
      </h2>
      <p class="description">
        Delete files from the Gallery data cache
      </p>
      <hr class="faint" />

      <h2>
        <a href="<?php generateUrl('index.php?chmod'?>">Filesystem Permissions</a>
      </h2>
      <p class="description">
        Change the filesystem permissions of your Gallery and your storage folder.
      </p>
      <hr class="faint" />

      <h2>
        <a href="<?php generateUrl('index.php?gd'?>">GD</a>
      </h2>
      <p class="description">
        Information about your GD configuration
      </p>
      <hr class="faint" />

      <h2>
        <a href="<?php generateUrl('index.php?import'?>">Import Database</a>
      </h2>
      <p class="description">
        Restore your Gallery database from an export that was made from the site administration
        maintenance screen or from the Database Backup step of the Gallery upgrader.
      </p>
      <hr class="faint" />

      <h2>
    <?php
      
require_once('../../embed.php');
      
$ret GalleryEmbed::init(array('fullInit' => false'noDatabase' => true));
      
/* Ignore error */
      
$url GalleryUrlGenerator::appendParamsToUrl('../../' GALLERY_MAIN_PHP,
          array(
'view' => 'core.UserAdmin''subView' => 'core.UserRecoverPasswordAdmin'));
    
?>
    <a href="<?php print $url ?>">Reset User Password</a>
      </h2>
      <p class="description">
    Set new password for any user.  Can be used to regain access to an administrator
    account when the "forgot password" feature cannot be used due to invalid/missing
    email address or other email problems.
      </p>
    </div>
  </body>
</html>