I have a script that I commissioned sometime back. I need to insert target tag into the link but am having hard time figuring it out. Here are the functions that create document part that has links:
function Show($string, $x, $y, $font_size, $font_style, $color, $align='L', $font=PDF_FONT, $link = '') {
$this->SetXY($x, $y);
$this->SetFont(PDF_FONT, $font_style, $font_size);
$this->SetTextColor($color);
$this->Cell(0, 0, $string, 0, 0, $align, 0, $link);
}
function draw_item($str_name, $str_value) {
$this->SetFont(PDF_FONT, 'I', 9);
$this->SetTextColor(ITEM_FONT_COLOR);
$this->Cell(48, 10, $str_name, 0, 0, 'R');
$this->setX(PDF_LEFT+49);
$this->SetTextColor(TEXT_COLOR);
$this->SetFont(PDF_FONT, '', 9);
$this->MultiCell(0, 10, $str_value, 0, 1);
}
function draw_more($link) {
$y = $this->getY();
$this->Show("more", PDF_DOC_WIDTH-32, $y, 8, 'U', MORE_FONT_COLOR, 'L', PDF_FONT, $this->pdf_more_path.$link);
$size = getimagesize($pdf_more_image);
$this->Image($this->pdf_more_image, PDF_DOC_WIDTH-$size[0]-9, $y-$size[1]-2, $size[0], $size[1], '', $this->pdf_more_path.$link);
$this->Ln(2);
}
function draw_articles($articles) {
$count = count($articles)-1;
if (is_array($articles))
foreach($articles as $ind => $val) {
$this->draw_item("Article Title:", $val["toc_articletitle"]);
$postfix = ereg(",", $val["toc_authors"])?"s":"";
$this->draw_item("Author$postfix:", $val["toc_authors"]);
$this->draw_item("Abstract:", $val["toc_abstract"]);
$this->draw_item("Page:", $val["toc_page"]);
$this->draw_more("?b=0&PID=".$val["pub_id"]."&iID=".$val["toc_issue"]."&tID=".$val["toc_id"]);
if ($ind != $count)
$this->draw_line(ITEM_FONT_COLOR, 4, 10);
}
}
I need to insert the following tag: target="mainPage"
Need help to detangle this.