Hallo mensen
ik ben met een uber moeilijk project bezig(voor mij dan).
Wat ik wil is:
css
javascript
html
liefst ook asp
higliten net zoals php
voor css heb ik het wel maar de code ziet er niet uit
voor javascript ben ik een heel eind maar nog lange
niet klaaar wie kan mij helpen of op gang helpen of
een site verwijzen
de code die ik nu heb voor css:
<?
$output = preg_replace('[\.(.*?)\{]', '<i>.$1 {</i>', $output);
$output = preg_replace('/(.*?)\{/', '<i>$1 {</i>', $output);
$output = preg_replace('/(.*)\:/', '<em>$1</em><i>:</i>', $output);
$output = preg_replace('/:(.*)\;/', ':<b>$1</b><i>;</i>', $output);
$output = preg_replace('/}/', '<i>}</i>', $output);
$output = preg_replace("/\n/", "<br/>", $output);
$output = preg_replace("/\t/", " ", $output);
echo '
<!--remove-->
<style type="text/css">
html{
border: 1px solid;
height: 95%;
width: 99%;
font-size: 12;
font-family: Courier New;
}
i {color: #FF00FE;font-style: normal;}
em {color: #000098; font-style: normal;}
b {color: #0001FE; font-weight: normal;}
</style>
<!--remove-->
';
echo $output;
echo '<br/><--GO-->';
}
?>
Code voor javascript:
<?
$str = "<script language=\"javascript\">
<!--
//
/*
*/
alert('LAL12312asddadshgasdgasdgakjdgsklajhsdlkjha43785687345kjhdskjhsdlfkhsldkufyil5k3jh45lkjhsdlfuhlskhfklshfuhe2l3');
prompt('lal');
function loletjes(){
asdasda
}
</script>";
//$out = preg_replace('/(&|=|\+|\*|\^|%|!|-|\?)/','<span style="color: #0402FC">$1</span>',$out);
$out = str_replace('<','<',$str);
$out = str_replace('>','>',$out);
$out = preg_replace('/\n/','<br/>',$out);
$out = ereg_replace('<script(.*)(["| ])>','<span style="color: #9C0204"><script \\1\\2></span>',$out);
$out = preg_replace('/"([a-z|A-Z]{1,18})"/','<span style="color: #0402FC">"\\1"</span>',$out);
$out = ereg_replace('<\/script>','<span style="color: #9C0204"></script></span>',$out);
$out = ereg_replace('function','<strong>function</strong>',$out);
$out = preg_replace('/\(([\'|"])([a-z|A-Z|1-9|]+)([\'|"])\)/','(<span style="color: #0402FC">\\1\\2\\3</span>)',$out);
$out = ereg_replace('\{','<span style="color: #04029C;font-weight:bold">{</span>',$out);
$out = ereg_replace('\}','<span style="color: #04029C;font-weight:bold">}</span>',$out);
$out = ereg_replace('\(','<span style="color: #04029C;font-weight:bold">(</span>',$out);
$out = ereg_replace('\)','<span style="color: #04029C;font-weight:bold">)</span>',$out);
$out = ereg_replace('alert','<span style="color: #9C029C">alert</span>',$out);
$out = ereg_replace('prompt','<span style="color: #9C029C">prompt</span>',$out);
$out = ereg_replace('confirm','<span style="color: #9C029C">confirm</span>',$out);
$out = ereg_replace('close','<span style="color: #9C029C">close</span>',$out);
$out = ereg_replace('go','<span style="color: #9C029C">go</span>',$out);
$out = ereg_replace('document','<span style="color: #9C029C">document</span>',$out);
$out = ereg_replace('all','<span style="color: #9C029C">all</span>',$out);
echo $out;
?>
Wie kan mij helpen
1.766 views