bate_ico
Posts: 30
|
| Posted: 08/24/2007, 1:31 PM |
|
Hi how I can make a email from database to show me in png format not in text format
|
 |
 |
klwillis
Posts: 428
|
| Posted: 08/24/2007, 2:30 PM |
|
Are you wanting to convert your email text message into a graphics equivalent?
You'll need to be more specific as to what you need done in order to get help.
_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"
Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006 |
 |
 |
bate_ico
Posts: 30
|
| Posted: 08/24/2007, 2:49 PM |
|
yes I want to convert emailme@mysite.com to graphics
I have a work web bussines catalog for firms I want to protect mail /me@mysite.com/ form
email spider I create catalog to codecharge studio
|
 |
 |
klwillis
Posts: 428
|
| Posted: 08/24/2007, 3:14 PM |
|
Wouldn't just creating a graphical version (i.e. email.gif) of your email address work?
Quote bate_ico:
yes I want to convert email me@mysite.com to graphics
I have a work web bussines catalog for firms I want to protect mail /me@mysite.com/ form
email spider I create catalog to codecharge studio
_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"
Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006 |
 |
 |
DonB
|
| Posted: 08/24/2007, 4:20 PM |
|
<?php
# Generate a png image with 'txt
function chunkMarker($caption, $w = 50, $h=30) {
$im = imagecreatetruecolor ($w, $h); # Create image in desired
width/height
imagefill($im, 0, 0, imagecolorallocate($im, 253, 253, 224));
imagerectangle($im ,1, 1, $w-1, $h-1, imagecolorallocate($im, 244, 203,
28));
ImageStringWrap($im, 1, $caption, imagecolorallocate($im, 0, 0, 0));
imagepng($im);
imagedestroy($im);
}
function ImageStringWrap($image, $font, $text, $color)
{
$fontwidth = imagefontwidth($font);
$fontheight = imagefontheight($font);
$string=explode(' ',$text);
$vspace=0;
$words = count($string);
$y=((imagesy($image)-($fontheight*$words)-($words*$vspace))/2);
foreach($string as $st){
$x=((imagesx($image)-($fontwidth * strlen($st)))/2);
ImageString($image,$font,$x,$y,$st,$color);
$y+=($fontheight+$vspace);
}
}
?>
Play with the values of $w and $h and the color values (expressed as RGB) to
suit your needs. I needed to break strings into more than one line, so
that's what the ImageStringWrap function does. It directly outputs the image
to the browser.
--
DonB
http://ccswiki.gotodon.net
"bate_ico" <bate_ico@forum.codecharge> wrote in message
news:546cf5283da610@news.codecharge.com...
> yes I want to convert emailme@mysite.com to graphics
> I have a work web bussines catalog for firms I want to protect mail
> /me@mysite.com/ form
> email spider I create catalog to codecharge studio
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
|
|
|
 |
bate_ico
Posts: 30
|
| Posted: 08/25/2007, 7:07 AM |
|
Thank for script DonB but I'm a beginer to code charge studio I dont кnow where to put this script into the page
I have a form grid and label /mail/. I try to put the script after the BEFORE SHOW control label
but I don't see any result
Is the any way to show me where I to put the script
Thanks again
-------------------------------------------------------------------------------
<?php
//Include Common Files @1-5471E0F2
define("RelativePath", ".");
include(RelativePath . "/Common.php");
include(RelativePath . "/Template.php");
include(RelativePath . "/Sorter.php");
include(RelativePath . "/Navigator.php");
//End Include Common Files
class clsGridfirm_all { //firm_all class @2-2E320BD2
//Variables @2-9DA56C47
// Public variables
var $ComponentName;
var $Visible; var $Errors;
var $ds; var $PageSize;
var $SorterName = "";
var $SorterDirection = "";
var $PageNumber;
var $CCSEvents = "";
var $CCSEventResult;
// Grid Controls
var $StaticControls; var $RowControls;
var $Navigator;
//End Variables
//Class_Initialize Event @2-0B2D99C1
function clsGridfirm_all()
{
global $FileName;
$this->ComponentName = "firm_all";
$this->Visible = True;
$this->Errors = new clsErrors();
$this->ds = new clsfirm_allDataSource();
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 10;
else
$this->PageSize = intval($this->PageSize);
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
$this->mail = new clsControl(ccsLabel, "mail", "mail", ccsText, "", CCGetRequestParam("mail", ccsGet));
$this->Navigator = new clsNavigator($this->ComponentName, "Navigator", $FileName, 10, tpCentered);
}
//End Class_Initialize Event
//Initialize Method @2-383CA3E0
function Initialize()
{
if(!$this->Visible) return;
$this->ds->PageSize = $this->PageSize;
$this->ds->SetOrder($this->SorterName, $this->SorterDirection);
$this->ds->AbsolutePage = $this->PageNumber;
}
//End Initialize Method
//Show Method @2-A8792D01
function Show()
{
global $Tpl;
if(!$this->Visible) return;
$ShownRecords = 0;
$this->ds->Prepare();
$this->ds->Open();
$GridBlock = "Grid " . $this->ComponentName;
$Tpl->block_path = $GridBlock;
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow");
$is_next_record = $this->ds->next_record();
if($is_next_record && $ShownRecords < $this->PageSize)
{
do {
$this->ds->SetValues();
$Tpl->block_path = $GridBlock . "/Row";
$this->mail->SetValue($this->ds->mail->GetValue());
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow");
$this->mail->Show();
$Tpl->block_path = $GridBlock;
$Tpl->parse("Row", true);
$ShownRecords++;
$is_next_record = $this->ds->next_record();
} while ($is_next_record && $ShownRecords < $this->PageSize);
}
else // Show NoRecords block if no records are found
{
$Tpl->parse("NoRecords", false);
}
$this->Navigator->TotalPages = $this->ds->PageCount();
$this->Navigator->Show();
$Tpl->parse("", false);
$Tpl->block_path = "";
}
//End Show Method
} //End firm_all Class @2-FCB6E20C
class clsfirm_allDataSource extends clsDBConnection1 { //firm_allDataSource Class @2-84D6B9BA
//DataSource Variables @2-A7EC186B
var $CCSEvents = "";
var $CCSEventResult;
var $CountSQL;
var $wp;
// Datasource fields
var $mail;
//End DataSource Variables
//Class_Initialize Event @2-81A6369A
function clsfirm_allDataSource()
{
$this->Initialize();
$this->mail = new clsField("mail", ccsText, "");
}
//End Class_Initialize Event
//SetOrder Method @2-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @2-DFF3DD87
function Prepare()
{
}
//End Prepare Method
//Open Method @2-9A9B0B4A
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect");
$this->CountSQL = "SELECT 1 " .
"FROM firm_all";
$this->SQL = "SELECT * " .
"FROM firm_all";
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect");
$this->RecordsCount = CCGetDBValue(CCBuildSQL($this->CountSQL, $this->Where, ""), $this);
$this->query(CCBuildSQL($this->SQL, $this->Where, $this->Order));
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect");
$this->MoveToPage($this->AbsolutePage);
}
//End Open Method
//SetValues Method @2-E7C33417
function SetValues()
{
$this->mail->SetDBValue($this->f("mail"));
}
//End SetValues Method
} //End firm_allDataSource Class @2-FCB6E20C
//Initialize Page @1-FE486DDE
// Variables
$FileName = "";
$Redirect = "";
$Tpl = "";
$TemplateFileName = "";
$BlockToParse = "";
$ComponentName = "";
// Events;
$CCSEvents = "";
$CCSEventResult = "";
$FileName = "index.php";
$Redirect = "";
$TemplateFileName = "index.html";
$BlockToParse = "main";
$PathToRoot = "./";
//End Initialize Page
//Initialize Objects @1-A245282E
$DBConnection1 = new clsDBConnection1();
// Controls
$firm_all = new clsGridfirm_all();
$firm_all->Initialize();
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize");
//End Initialize Objects
//Go to destination page @1-BEB91355
if($Redirect)
{
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
header("Location: " . $Redirect);
exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
//Show Page @1-6AC77BA2
$firm_all->Show();
$Tpl->PParse("main", false);
//End Show Page
//Unload Page @1-AB7622EF
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
unset($Tpl);
//End Unload Page
?>
|
 |
 |
redExpertos
Posts: 4
|
| Posted: 08/25/2007, 11:01 AM |
|
You should add an event before_show to the image you want to display the emai, then call the function Don_B has post
maybe you should check some tutorial to be familiar with CCS
_________________
Desarrollo en Español
Hosting en Colombia |
 |
 |
|