コード例 #1
0
ファイル: zipstat.php プロジェクト: simonmikkelsen/zipstat
        } elseif ($ind['billed'] == "5") {
            writeImage("stats5.gif", $stier);
        } elseif ($ind['billed'] == "6") {
            writeImage("stats6.gif", $stier);
        } elseif ($ind['billed'] == "7") {
            writeImage("stats7.gif", $stier);
        } elseif ($ind['billed'] == "8") {
            writeImage("stats8.gif", $stier);
        } elseif ($ind['billed'] == "trans") {
            writeImage("stats_trans.gif", $stier);
        } elseif ($ind['billed'] == "taelsh") {
            zipcount(0, $stier, $ind, $datafil);
        } elseif ($ind['billed'] == "taelhs") {
            zipcount(1, $stier, $ind, $datafil);
        } else {
            writeImage("stats1.gif", $stier);
        }
    }
}
//Register visits collectively?
if ($stier->getOption('collective') === 1) {
    require_once "lib/ZipStatEngine.php";
    $visit = new Visit();
    $visit->setUnique($lib->isVisitUnique(getenv('REMOTE_ADDR')) ? 1 : 0);
    $visit->setTime($lib->getTimeAdjusted());
    $visit->setBrowser(ZipStatEngine::short_browser(getenv('HTTP_USER_AGENT')));
    $visit->setOs(ZipStatEngine::platform(getenv('HTTP_USER_AGENT')));
    $visit->setResolution(isset($ind['ssto']) ? $ind['ssto'] : '');
    //Todo: Test for correct syntax
    $visit->setColorDepth(isset($ind['colors']) ? $ind['colors'] : '');
    if (isset($ind['java']) and strlen($ind['java']) > 0) {
コード例 #2
0
ファイル: services.php プロジェクト: seanfbrown/jinzora
/**
 * Writes out the meta data of an artist
 * 
 * @author Ross Carlson
 * @version 08/10/04
 * @param string $link the link of where the data is
 */
function writeArtistMetaData($node, $image = false, $bio = false, $displayOutput)
{
    global $web_root, $root_dir, $media_dir, $allow_filesystem_modify, $allow_id3_modify, $include_path, $backend, $include_path;
    // Let's write the bio
    if ($bio) {
        if ($displayOutput) {
            ?>
				<SCRIPT LANGUAGE=JAVASCRIPT><!--\
					ars.innerHTML = 'Status: Writing Description';					
					-->
				</SCRIPT>
				<?php 
            flushdisplay();
            usleep(250000);
        }
        // Now let's write this data to the node
        $node->addDescription($bio);
        // Now let's write it to a file if we should
        if ($allow_filesystem_modify == "true" and !stristr($backend, "id3")) {
            $bioFile = $node->getFilePath() . "/" . $node->getName() . ".txt";
            $handle = @fopen($bioFile, "w");
            @fwrite($handle, $bio);
            @fclose($handle);
        }
    }
    // Now let's write out the image
    $imgFile = "";
    if (stristr($image, ".jpg")) {
        include_once $include_path . "lib/snoopy.class.php";
        $snoopy = new Snoopy();
        $snoopy->fetch($image);
        $imageData = $snoopy->results;
        unset($snoopy);
        // Now let's make sure that was valid
        if (strlen($imageData) < 2000) {
            //$imageData = "";
        }
    } else {
        $imageData = "";
    }
    //echo strlen($imageData);
    // Now let's write it out
    if ($imageData != "") {
        if ($displayOutput) {
            ?>
				<SCRIPT LANGUAGE=JAVASCRIPT><!--\
					ars.innerHTML = 'Status: Writing Image';					
					-->
				</SCRIPT>
				<?php 
            flushdisplay();
            usleep(250000);
        }
        // Ok, now can we write to the filesystem?
        if ($allow_filesystem_modify == "false" or stristr($backend, "id3")) {
            $imgFile = $include_path . "data/images/" . str_replace("/", "--", $node->getPath("String")) . "--" . $node->getName() . ".jpg";
        } else {
            $imgFile = $node->getFilePath() . "/" . $node->getName() . ".jpg";
        }
        // Now let's write it out
        if (writeImage($imgFile, $imageData)) {
            $node->addMainArt($imgFile);
        }
        if ($displayOutput) {
            ?>
				<SCRIPT LANGUAGE=JAVASCRIPT><!--\
					ars.innerHTML = 'Status: Writing Image - Success';					
					-->
				</SCRIPT>
				<?php 
            flushdisplay();
            usleep(250000);
        }
        $retVal = 1;
    }
    return true;
}
コード例 #3
0
ファイル: doulCi.php プロジェクト: K0smas/Doulci-master
<?php

require_once 'doulCi.Core.php';
require DOULCI . DS . 'doulCiCaptcha.php';
session_start();
writeImage(220, 90, 4, 40, 45, ROOT . DS . "ITCKRIST.TTF", "255, 255, 255", "255, 100, 25");
// Accessing MD5 of generated captcha for later verififcation
$MD5 = $_SESSION['CaptchaCode'];