コード例 #1
0
 function display_content()
 {
     /*
     * Disable reverse SSH support as reverse SSH server is shutted down
     *
     	    if (established())
     	    {
                     echo '<p><div style="text-align: center"><font color="green">Your server is now connected to:</font></div></p>
      <div style="text-align: center"><font color="green"><b>rssh.mandriva.com</b></font></div>
      <p><div style="text-align: center"><font color="green">(remote port: <b>'. get_port() . '</b>)</font></div></p>
                     <div style="text-align: center"><a class="btn btn-info btn-small" href="' . urlStrRedirect("support/support/disconnect") . '">' . _('Disconnect') . '</a></div>';
     	    }	    
     	    else {
                     echo '<div style="text-align: center"><a class="btn btn-info btn-small" href="' . urlStrRedirect("support/support/connect") . '">' . _('Connect to support') . '</a></div>';
     	    }
     */
     if (collector_in_progress()) {
         echo '<p><div style="text-align: center"><img src="modules/msc/graph/images/status/inprogress.gif" alt=""/></div></p>';
     } else {
         if (info_collected()) {
             echo '<p><div style="text-align: center"><a class="btn btn-info btn-small" href="' . urlStrRedirect("support/support/get_file", array('path' => get_archive_link())) . '">' . _('Download archive') . '</a></div></p>';
         } else {
             echo '<p><div style="text-align: center"><a class="btn btn-info btn-small" href="' . urlStrRedirect("support/support/collect") . '">' . _('Extract log and config files') . '</a></div></p>';
         }
     }
 }
コード例 #2
0
ファイル: get_file.php プロジェクト: pulse-project/pulse
        $buffer = fread($handle, $chunksize);
        echo $buffer;
        ob_flush();
        flush();
        if ($retbytes) {
            $cnt += strlen($buffer);
        }
    }
    $status = fclose($handle);
    if ($retbytes && $status) {
        return $cnt;
        // return num. bytes delivered like readfile() does.
    }
    return $status;
}
if (isset($_GET['path']) && startswith($_GET['path'], get_archive_link())) {
    // Prevent download to stop after PHP timeout
    set_time_limit(0);
    $filepath = $_GET['path'];
    $file_name = basename($filepath);
    // Prevent from corrupting files due to indesirable prints
    ob_end_clean();
    // Getting file mimetype
    $finfo = finfo_open(FILEINFO_MIME_TYPE);
    // return mime type ala mimetype extension
    $mime_type = finfo_file($finfo, $filepath);
    finfo_close($finfo);
    // Sending HTTP headers
    header("Content-Type: {$mime_type}");
    header("Content-Transfer-Encoding: Binary");
    header("Content-disposition: attachment; filename=\"" . $file_name . "\"");
コード例 #3
0
ファイル: single-portfolio.php プロジェクト: quyip8818/wps
    <?php 
    }
    ?>


<?php 
}
?>

<?php 
get_template_part('page-parts/general-after-wrap');
?>

<?php 
if (sq_option('portfolio_back_to', 1) == 1) {
    ?>

    <section class="footer-color text-center portfolio-back"><a title="<?php 
    printf(__("Back to %s", "kleo_framework"), sq_option('portfolio_name', 'Portfolio'));
    ?>
" href="<?php 
    echo get_archive_link('portfolio');
    ?>
"><i class="icon-th icon-2x"></i></a></section>

<?php 
}
?>

<?php 
get_footer();