コード例 #1
0
ファイル: index.php プロジェクト: redrock/xlrstats-web-v2
// show a "index" page with general stats. This is the default as well
if ($func == "index") {
    global $useppllist;
    global $b3_status_url;
    // show general data for index page
    welcometext();
    echo "<br/>";
    if ($useppllist == 1) {
        $fp = @fopen($b3_status_url, "r");
        if (@fread($fp, 4096)) {
            currentplayers();
            echo "<br/>";
        }
    }
    menubox(1);
    //echo "<br/>";
    topplayers("skill");
    echo "<br/>";
    global_awards();
    echo "<br/>";
    global_lame_awards();
}
if ($func == "medal") {
    if (isset($_GET['fname'])) {
        $fname = $_GET['fname'];
        eval($fname . "();");
    }
}
// Close the page properly (footer)
displayfooter();
コード例 #2
0
ファイル: upimages.php プロジェクト: lmcro/fcms
/**
 * displayUploadSubmit 
 * 
 * @return void
 */
function displayUploadSubmit()
{
    global $img;
    displayHeader();
    $uploadsPath = getUploadsAbsolutePath();
    $img->destination = $uploadsPath . 'upimages/';
    $img->upload($_FILES['upfile']);
    if ($img->error == 1) {
        echo '
    <p class="error-alert">
        ' . sprintf(T_('Photo [%s] is not a supported photo type.  Photos must be of type (.jpg, .jpeg, .gif, .bmp or .png).'), $img->name) . '
    </p>';
        displayFooter();
        return;
    }
    $img->resize(600, 400);
    if ($img->error > 0) {
        echo '
    <p class="error-alert">
        ' . T_('There was an error uploading your image.') . '
    </p>';
        displayFooter();
        return;
    }
    $path = 'uploads/upimages/';
    if (defined('UPLOADS')) {
        $path = 'file.php?u=';
    }
    echo '
    <p>
        <b>' . T_('Click to insert image into message.') . '</b><br/>
        <a href="#" onclick="insertUpImage(\'[IMG=' . $path . $img->name . ']\')" 
            title="' . T_('Click to insert image into message.') . '"><img src="' . URL_PREFIX . $path . $img->name . '"/></a>
    </p>';
    displayfooter();
}