Пример #1
0
            if (strlen($network) == 0) {
                $pt = ms_newPointObj();
                $pt->setXY($bzz->db["x"], $bzz->db["y"], 0);
                $pt->draw($map, $sname, $img, 0, $bzz->db["sname"]);
            } else {
                $pt = ms_newPointObj();
                $pt->setXY($bzz->db["x"], $bzz->db["y"], 0);
                $pt->draw($map, $sname, $img, 0, $key);
            }
        }
    }
}
$ts = strftime("%d %b @ %I:%M %p %Z");
if (in_array('county', $layers)) {
    $counties->draw($img);
}
$stlayer->draw($img);
if (in_array('radar', $layers)) {
    $radar->draw($img);
}
if (in_array('cwa', $layers)) {
    $cwa->draw($img);
}
$title = $ts . " " . $network . " " . $varDef[$var];
if (in_array('barbs', $layers)) {
    $title .= " and Wind Barbs";
}
mktitle($map, $img, $title);
$map->drawLabelCache($img);
header("Content-type: image/png");
$img->saveImage('');
Пример #2
0
 // We skip post if post to short or user unknown
 if (!$skip && strlen($line[1]) >= 100) {
     $node = new StdClass();
     $node->name = $old_to_new[$old_uname];
     $account = user_load(array('name' => $node->name));
     if (!$account) {
         die('User: '******' does not exist, check mapping for ' . $old_uname . '.<br />');
     }
     // Assigned when calling node_submit (if $node->name is set), so not really necessary to set value here
     $node->uid = $account->uid;
     $node->type = 'nyhet';
     $node->created = olddate_to_unix_time($line[3]);
     $node->changed = $node->created;
     // Must set this so that created is not overwritten some where else
     $node->date = format_date($node->created, 'custom', 'Y-m-d H:i:s O');
     $node->title = mktitle(html_entity_decode($line[1]), 30);
     $node->body = $line[1];
     // Format set to filtered html
     $node->format = 1;
     $node->log = 'Importerad frŒn HEABNET ' . date('d/m-y H:m') . '.';
     // Status set to published
     $node->status = 1;
     // Promote to first page
     $node->promote = 1;
     $node->sticky = 0;
     $node->revision = 0;
     // Enable read/write comments
     $node->comment = 2;
     $node->pathauto_perform_alias = 1;
     print '<pre>';
     print '<em>Before submit:</em><br />';