Beispiel #1
0
<?php

include_once "../../sessionCheck.php";
show_img();
function show_img()
{
    $report_id = $_GET['report_id'];
    $query = "select img_file from accounting_reports\n        \tWHERE id = '{$report_id}'";
    $result = mysql_query($query);
    if (!$result) {
        print "failed to execute query {$query}<br>";
        return false;
    }
    $obj = mysql_fetch_object($result);
    $db_img = $obj->img_file;
    $db_img = base64_decode($db_img);
    //print_r($db_img );
    $db_img = imagecreatefromstring($db_img);
    if ($db_img !== false) {
        header("Content-Type: image/png");
        imagepng($db_img);
        #echo $db_img;
    }
    imagedestroy($db_img);
}
?>

Beispiel #2
0
                $result_nb_sessions[$k] += 1;
            } else {
                $time_stop = strtotime($session->getStopTime());
                $str_stop = date($mode_->get_prefix(), $time_stop);
                if ($str_stop >= $k) {
                    $result_nb_sessions[$k] += 1;
                } else {
                    break;
                }
            }
        }
    }
    return $result_nb_sessions;
}
if (isset($_GET['img']) && isset($_GET['file'])) {
    show_img($_GET['file']);
}
clean_cache();
if (!isset($_GET['mode'])) {
    $_GET['mode'] = '';
}
switch ($_GET['mode']) {
    case 'minute':
        $mode = new ReportMode_minute();
        break;
    case 'hour':
        $mode = new ReportMode_hour();
        break;
    case 'day':
    default:
        $mode = new ReportMode_day();
Beispiel #3
0
<?php

$banner = $db->assoc("Select * From site_adv Where adv_show > 0 order by id desc");
$ip = $core->getIp();
$show_ip = $db->read("select * From site_show Where date = '" . date("d.m.Y") . "' and ip = '{$ip}' and site_adv_id = '" . $banner['id'] . "' ");
if (!$show_ip) {
    $data = array("date" => date("d.m.Y"), "ip" => $ip, "site_adv_id" => $banner['id']);
    $db->insert_("site_show", $data);
    $db->update("site_adv", "adv_show = adv_show - 1 Where id = '" . $banner['id'] . "'");
}
show_img(@substr($banner['img'], 1));
function show_img($src)
{
    header("Expires: Sun, 1 Jan 2000 12:00:00 GMT");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("Cache-Control: post-check=0, pre-check=0", false);
    header("Pragma: no-cache");
    header('Content-type: image/png');
    $image = read_file($src);
    echo $image;
}
function read_file($file)
{
    $f = @fopen($file, 'r');
    @flock($f, LOCK_SH);
    if ($f) {
        clearstatcache();
        $data = @fread($f, filesize($file));
        @flock($f, LOCK_UN);
        @fclose($f);
Beispiel #4
0
          <?php 
$i = 0;
while ($db->next_record()) {
    if ($i % 2 == 0) {
        echo "</tr><tr>";
    }
    ?>
          <td width="50%" align="center">
            <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center" height="120">
              <tr> 
                <td colspan="3" height="4"></td>
              </tr>
              <tr> 
                <td width="20%" align="center"> 
                  <?php 
    echo "<a href='goods_list.php?id=" . $db->f('id') . "' target='_blank'><img src='" . show_img($db->f('image'), 80, 80) . " border='0'></a>";
    ?>
                </td>
                <td width="2" valign="top">&nbsp;</td>
                <td width="77%" valign="top"><b><font class=p14 color=#000000> 
                  <?php 
    echo "<a href='goods_list.php?id=" . $db->f('id') . "' class='softtitle' target='_blank'>" . stripslashes($db->f('name')) . "</a>";
    ?>
                  </font></b><br>
                  retail:<font color=red> 
                  <?php 
    echo $db->f('price_m');
    ?>
                  </font>$<br>
                  membership:<font class=p13 color=#ff3333 
                  size=2><?php 
Beispiel #5
0
          </td>
        </tr>
        </tbody> 
      </table>
    </td>
    <td width="558" align="center"> 
      <?php 
$db->query("select * from {$goods_t} where id={$id}");
$db->next_record();
if ($db->num_rows()) {
    ?>
      <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr> 
          <td width="27%" align="center"> 
            <?php 
    echo "<img src='" . show_img($db->f('image'), 100, 100) . " border='0'>";
    ?>
          </td>
          <td width="73%" valign="top"><b><font class=p14 color=#000000> 
            <?php 
    echo stripslashes($db->f('name'));
    ?>
            </font></b><br>
            retail:<font color=red> 
            <?php 
    echo $db->f('price_m');
    ?>
            </font>$<br>
            membership:<font class=p13 color=#ff3333 
                  size=2><?php 
    if ($user_price) {