Código PHP:
<script type="text/javascript">
// drawPercentBar()
// Written by Matthew Harvey (matt AT unlikelywords DOT com)
// (http://www.unlikelywords.com/html-morsels/)
// Mod by Yvonne
// (http://www.cogknition.org/knitblogging/percentagebar/)
// Distributed under the Creative Commons
// "Attribution-NonCommercial-ShareAlike 2.0" License
// (http://creativecommons.org/licenses/by-nc-sa/2.0/)
function drawPercentBar(percent, v_color) {
var width = 200;
var color = 'images/green.png';
var background = 'images/bar.png';
var border = "#4C0039";
if (!color) { color = "#B0B0B0"; }
if (!background) { background = "none"; }
if (!border) { border = "#000000"; }
var pixels = width * (percent / 100);
document.write("<div style=\"position: relative; line-height: 1em; background-image: " + background + "; border: 1px solid " + border + "; width: "+ width + "px\">");
document.write("<div style=\"height: 1em; width: " + pixels + "px; background-image: " + color + ";\"><\/div>");
document.write("<\/div>"); }
</script>
<script type="text/javascript">
drawPercentBar(10,"#FF0000");
</script>
Fondo: http://demo.swiftpanel.com/admin/tem...ercent/bar.png
Barra: http://demo.swiftpanel.com/admin/tem...cent/green.png
Gracias!