public function __construct() { $host = gatorconf::get('db_host'); $username = gatorconf::get('db_username'); $password = gatorconf::get('db_password'); $database = gatorconf::get('db_database'); $this->open($host, $database, $username, $password); }
public static function get($string) { $lang_conf = gatorconf::get('language'); $lang_file = gatorconf::get('base_path') . "/languages/{$lang_conf}.php"; // caching: load language file on session start and on file change if (!isset($_SESSION['cached_lang']) || $_SESSION['lang_file_stamp'] != filemtime($lang_file)) { require $lang_file; $_SESSION['lang_file_stamp'] = filemtime($lang_file); $_SESSION['cached_lang'] = $lang; } if ($_SESSION['cached_lang'][$string] == '') { return $string; } return $_SESSION['cached_lang'][$string]; }
</button> <button type="button" class="nice secondary radius button paste-selected"<?php if (!isset($_SESSION['buffer'])) { echo ' disabled="disabled"'; } ?> "><?php echo lang::get("Paste"); ?> </button> <?php } ?> <?php if (gatorconf::get('use_zip')) { ?> <button type="button" class="nice secondary radius button zip-selected"><?php echo lang::get("Zip"); ?> </button> <?php } ?> <button type="button" class="nice secondary radius button delete-selected"><?php echo lang::get("Delete"); ?> </button> </div> <?php
?> </p> <table class="file-list"> <tbody> <?php foreach ($params as $user) { ?> <?php if ($user['username'] == 'guest' && !gatorconf::get('allow_guests')) { continue; } ?> <?php if (gatorconf::get('mask_repository_path')) { $user['homedir'] = str_replace(gatorconf::get('repository'), '', $user['homedir']); } ?> <tr class="accounts" > <td class="username"> <?php echo $user['username']; ?> </td> <td class="homedir"> <?php if (isset($user['homedir']) && $user['username'] != 'admin') { echo $user['homedir']; } ?> </td>
/include/foundation/javascripts/jquery.foundation.reveal.js"></script> <script src="<?php echo gatorconf::get('base_url'); ?> /include/foundation/javascripts/responsive-tables.js"></script> <!-- FileGator styles --> <link rel="stylesheet" href="<?php echo gatorconf::get('base_url'); ?> /include/views/style.css"> <!-- Mobile breakpoint --> <style type="text/css"> @media only screen and (max-width: <?php echo gatorconf::get('mobile_breakpoint'); ?> px) { #fileset td { line-height: 50px; } div#content { background: none; } .search-img, .bottom-actions, #topcorners, #bottomcorners, .small-auth-menu,
?> "><img alt="filegator" src="<?php echo gatorconf::get('base_url'); ?> /include/views/img/logo.gif"></a> </div> <?php if (isset($params['goactivate'])) { ?> <h5><?php echo lang::get("Please open your email and click on the link to proceed."); ?> </h5><br /> <a href="<?php echo gatorconf::get('base_url'); ?> " class="button right"><?php echo lang::get("Done"); ?> </a> <?php } else { ?> <?php if (isset($params['errors'])) { ?> <div class="error"><?php echo $params['errors']; ?>
echo $file['type']; ?> " data-link="<?php echo gator::encodeurl($file['link']); ?> " data-name="<?php echo $file['name']; ?> " data-crypt="<?php echo $file['crypt']; ?> " data-size="<?php echo $file['size']; ?> " data-time="<?php echo date(gatorconf::get('time_format'), $file['time']); ?> "></button> </td> <?php } ?> </tr> <?php } } ?> <?php
* * This Software is protected by copyright law and international treaties. This Software is licensed (not sold). * The unauthorized use, copying or distribution of this Software may result in severe criminal or civil penalties, * and will be prosecuted to the maximum extent allowed by law. * * DISCLAIMER OF WARRANTY: You acknowledge that this software is provided "AS IS" and may not be functional on * any machine or in any environment. Copyright owner have no obligation to correct any bugs, defects or errors, * to otherwise support the Software or otherwise assist you evaluate the Software. IN NO EVENT SHALL THE COPYRIGHT * OWNER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * */ define('VERSION', 'PRO v5.0'); error_reporting(NULL); // start session & handle logout session_start(); if (isset($_GET["logout"]) && $_GET["logout"] == 1) { session_destroy(); session_start(); } require_once "configuration.php"; if (gatorconf::get('use_database')) { require_once "./include/common/mysqli.php"; } require_once "./include/common/phpass.php"; require_once "./include/file-gator.php"; $app = new gator(); $app->init();