Пример #1
0
 public function contactimageAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     header('PRAGMA: NO-CACHE');
     header('CACHE-CONTROL: NO-CACHE');
     header('Content-type: image/png');
     ob_start();
     $text = new textPNG();
     $id = $this->_getParam("id");
     $pseudoid = $this->_getParam("pseudoid");
     $msg = "";
     if (is_numeric($id)) {
         $r = new Repository_Model_MetaContacts();
         $r->filter->id->equals($id);
         if (count($r->items) > 0) {
             $msg = $r->items[0]->email;
         }
     } else {
         if (trim($pseudoid) !== "" && preg_match("/^[0-9a-zA-Z]+\$/", $pseudoid) > 0) {
             $r = new Repository_Model_VMetaProductRepoAreaContacts();
             $r->filter->id->equals($pseudoid);
             if (count($r->items) > 0) {
                 $msg = $r->items[0]->email;
             }
         } else {
             $msg = $id;
         }
     }
     $this->view->text = $text;
     $text->msg = $msg;
     $text->size = '9';
     ob_end_clean();
     $text->draw();
 }
Пример #2
0
 public function sitecontactAction()
 {
     header('PRAGMA: NO-CACHE');
     header('CACHE-CONTROL: NO-CACHE');
     header('Content-type: image/png');
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     $text = new textPNG();
     $c = new Default_Model_Sites();
     $c->filter->id->equals($this->_getParam("id"));
     if (count($c->items) > 0) {
         $field = $this->_getParam("type") . "email";
         $text->msg = $c->items[0]->{$field};
     } else {
         $text->msg = "n\\a";
     }
     $text->size = '9';
     $text->draw();
 }
Пример #3
0
// padding
if (isset($red)) {
    $text->red = $red;
}
// text color
if (isset($grn)) {
    $text->grn = $grn;
}
// ..
if (isset($blu)) {
    $text->blu = $blu;
}
// ..
if (isset($bg_red)) {
    $text->bg_red = $bg_red;
}
// background color
if (isset($bg_grn)) {
    $text->bg_grn = $bg_grn;
}
// ..
if (isset($bg_blu)) {
    $text->bg_blu = $bg_blu;
}
// ..
if (isset($tr)) {
    $text->transparent = $tr;
}
// transparency flag
$text->draw();
//dun