I have this ticker script, that is flat file based. It writes the variables to a conf.php file. Here is that code:
[code=php]
<?php
$tablewidth= “100%”;
$tableheight= “80”;
$bgcolor = “#FFFFFF”;
$border = “0px”;
$scrollspeed = “35”;
$fontsize = “2”;
$fontstyle = “Univers”;
$fontcolor = “#C41F3A”;
$bold = “100”;
$lineheight = “0.8cm”;
$sent1 = “<b>test1</b>”;
$sent2 = “<i>test2</i>”;
$sent3 = “<u>test3</u>”;
$sent4 = “<a href=”http://dets2005/bna-intranet/”>Text</a>”;
$sent5 = “<b>test5</b>”;
$sent6 = “<b>test6</b>”;
$sent7 = “<u>test7</u>”;
$sent8 = “<u>test8</u>”;
$sent9 = “test9”;
?>
I wrote a backup script that takes all those variables, and outputs/backs them up to a html file. However, when it outputs the variables to the html file, the universal font color and family doesnt show. It should display the text [COLOR=crimson]#C41F3A
Here is the code for the backup script:
[code=php]
<?
include(“conf.php”);
$textarea[1] = “$sent1”;
$textarea[2] = “$sent2”;
$textarea[3] = “$sent3”;
$textarea[4] = “$sent4”;
$textarea[5] = “$sent5”;
$textarea[6] = “$sent6”;
$textarea[7] = “$sent7”;
$textarea[8] = “$sent8”;
$textarea[9] = “$sent9”;
$textarea[10] = “$sent10”;
$textarea[11] = “$sent11”;
$textarea[12] = “$sent12”;
$textarea[13] = “$sent13”;
$textarea[14] = “$sent14”;
$counttextareas = count($textarea);
$array = array();
FOR($i = 1; $i <= $counttextareas; $i++) {
array_push($array, $textarea[$i]);
$today = date(“M-d-Y”);
$filename = $today.”.ticker_archive.html”;
$path = “C:/Inetpub/wwwroot/bna-intranet/ticker_archive/”;
$somecontent = $textarea[$i].”<br /><br />”;
// Let’s make sure the file exists and is writable first.
// In our example we’re opening $filename in append mode.
// The file pointer is at the bottom of the file hence
// that’s where $somecontent will go when we fwrite() it.
if (!$handle = fopen($filename, ‘a’)) {
echo “Cannot open file ($filename)”;
exit;
}
// Write $somecontent to our opened file.
if (fwrite($handle, $somecontent) === FALSE) {
echo “Cannot write to file ($filename)”;
exit;
}
echo “<b>Success</b>, wrote $somecontent to file ($filename)<br />”;
fclose($handle);
}
echo “<br /><br /><br /><br />”;
if (!copy($filename, $path.$filename)) {
echo “Failed to copy $filename…<br />n”;
} else {
echo “Your file has been copied too $path<br /><br />n”; }
if (file_exists($filename))
{
unlink($filename);
}else{
echo (“$filename could not be found!”);
}
?>
Here is a screenshot of what the html file displays. The color though should be that # hex code color
[upl-file uuid=e4c6fe61-97a3-4839-8c2f-79af9dfe7693 size=13kB]test3.jpg