Code:
function setVertColor(indic){
var n=256/6, j=256/n, C=indic, c=C%n;
baseColor = {
r : parseInt(C<n?255:C<n*2?255-c*j:C<n*4?0:C<n*5?c*j:255),
g : parseInt(C<n*2?0:C<n*3?c*j:C<n*5?255:255-c*j),
b : parseInt(C<n?c*j:C<n*3?255:C<n*4?255-c*j:0)
};
document.getElementById('color').style.backgroundColor = 'rgb(' + baseColor.r + ',' + baseColor.g + ',' + baseColor.b + ')';
}
function setGradientColor(){
var r = Math.round((1-(1-(baseColor.r/255))*(lastValues[0]/255))*(255-lastValues[1]));
var g = Math.round((1-(1-(baseColor.g/255))*(lastValues[0]/255))*(255-lastValues[1]));
var b = Math.round((1-(1-(baseColor.b/255))*(lastValues[0]/255))*(255-lastValues[1]));
document.getElementById('colorCurrent').style.backgroundColor = 'rgb(' + r + ',' + g + ',' + b + ')';
document.getElementById('rgbR').value = r;
document.getElementById('rgbG').value = g;
document.getElementById('rgbB').value = b;
document.getElementById('hex').value = (toHex(r) + toHex(g) + toHex(b)).toUpperCase();
currentColor = {r:r,g:g,b:b};
}
function toHex(color){
color=parseInt(color).toString(16);
return color.length<2?"0"+color:color;
}
</script>
</head><body>
<div id="colorPicker">
<div id="color">
<div id="colorIndic"></div>
</div>
<div id="hue">
<div id="hueIndic"></div>
</div>
<div id="colorCurrent"><div id="oldColor"></div></div>
<div id="colorValues">
<table cellpadding="0" cellspacing="2">
<tr>
<td>R:</td><td><input type="text" size="2" id="rgbR" value="255" /></td>
</tr>
<tr>
<td>G:</td><td><input type="text" size="2" id="rgbG" value="255" /></td>
</tr>
<tr>
<td>B:</td><td><input type="text" size="2" id="rgbB" value="255" /></td>
</tr>
<tr>
<td>#</td><td><input type="text" size="5" id="hex" value="FFFFFF" /></td>
</tr>
</table>
</div>
</div>
<div style="position:relative;top:200px;">
<form action="coreadmin.php" method="post" name="headerad">
<input type="hidden" name="admintype" value="headerad">
<table>
<tr><td>Ad Type:</td><td><select name="adtype" onchange="setOptions(document.headerad.adtype.options[document.headerad.adtype.selectedIndex].value);">
<option value="preselected" selected="selected"><?PHP echo $typesel;?></option>
<option value="text_image">Text & Image</option>
<option value="text">Text Only</option>
<option value="image">Image Only</option>
<option value="linkunit">Link Unit</option>
</select></td></tr>
<tr><td>Ad Size:</td><td><select name="adsize" size="1">
<option value=" " selected="selected">(SELECTED) <?PHP echo $addata[0][4];?></option>
</select></td></tr>
<tr><td>Ad Channel:</td><td><input type="text" size="10" name="ad_channel" value="<?PHP echo $addata[0][5] ;?>" /></td></tr>
<tr><td> </td><td> </td></tr>
<tr><td>Background Color:</td><td>#<input type="text" name="color_bg" size="8" value="<?PHP echo $addata[0][6] ;?>" onChange="document.getElementById('prevback').style.backgroundColor='#'+document.headerad.color_bg.value;document.getElementById('prevback2').style.backgroundColor='#'+document.headerad.color_bg.value" /></td></tr>
<tr><td>Alternate Color:</td><td>#<input type="text" name="alternate_color" size="8" value="<?PHP echo $addata[0][7] ;?>" /></td></tr>
<tr><td>Border Color:</td><td>#<input type="text" name="color_border" size="8" value="<?PHP echo $addata[0][8] ;?>" onChange="document.getElementById('prevtitle').style.backgroundColor='#'+document.headerad.color_border.value;document.getElementById('prevtitle').style.borderColor='#'+document.headerad.color_border.value;document.getElementById('prevback').style.borderColor='#'+document.headerad.color_border.value;document.getElementById('prevback2').style.borderColor='#'+document.headerad.color_border.value;" /></td></tr>
<tr><td>Link Color:</td><td>#<input type="text" name="color_link" size="8" value="<?PHP echo $addata[0][9] ;?>" onChange="document.getElementById('prevadtitle').style.color='#'+document.headerad.color_link.value;document.getElementById('prevadtitle2').style.color='#'+document.headerad.color_link.value;" /></td></tr>
<tr><td>Text Color:</td><td>#<input type="text" name="color_text" size="8" value="<?PHP echo $addata[0][10] ;?>" onChange="document.getElementById('prevdesc').style.color='#'+document.headerad.color_text.value;document.getElementById('prevdesc2').style.color='#'+document.headerad.color_text.value;" /></td></tr>
<tr><td>URL Color:</td><td>#<input type="text" name="color_url" size="8" value="<?PHP echo $addata[0][11] ;?>" onChange="document.getElementById('prevwww').style.color='#'+document.headerad.color_url.value;document.getElementById('prevwww2').style.color='#'+document.headerad.color_url.value;" /></td></tr>
<tr><td></td><td><input type="submit" value="Submit" /></td></tr>
</table>
</form>
</div>
<div style="position:relative;top:20px;left:250px;height:150px;width:200px;border:1px;font-size:11px;top:-20px;" name="prevwhole" id="prevwhole">
<div name="prevtitle" id="prevtitle" style="font-size:10px;border-color:#<?PHP echo $addata[0][8] ;?>;background-color:#<?PHP echo $addata[0][8] ;?>;"><u>Preview Ad</u></div>
<div name="prevback" id="prevback" style="background-color:#<?PHP echo $addata[0][6] ;?>;border: 1px solid #<?PHP echo $addata[0][8] ;?>;"><p />
<div name="prevadtitle" id="prevadtitle" style="color:#<?PHP echo $addata[0][9] ;?>;"><u><b>Sponsors Title Goes Here</b></u></div>
<div name="prevdesc" id="prevdesc" style="color:#<?PHP echo $addata[0][10] ;?>;">Here's the descriptive information used to get the reader to click on the ad.</div>
<div name="prevwww" id="prevwww" style="font-size:10px;color:#<?PHP echo $addata[0][11] ;?>;">www</div><p /></div>
<div name="prevback2" id="prevback2" style="background-color:#<?PHP echo $addata[0][6] ;?>;border: 1px solid #<?PHP echo $addata[0][8] ;?>;"><p />
<div name="prevadtitle2" id="prevadtitle2" style="color:#<?PHP echo $addata[0][9] ;?>;"><u><b>Sponsors Title Goes Here</b></u></div>
<div name="prevdesc2" id="prevdesc2" style="color:#<?PHP echo $addata[0][10] ;?>;">Here's the descriptive information used to get the reader to click on the ad.</div>
<div name="prevwww2" id="prevwww2" style="font-size:10px;color:#<?PHP echo $addata[0][11] ;?>;">www</div><p /></div>
</div>
<?PHP
exit;
} else {
echo "<p>This page requires authentication. Please login.</p>";
exit;
}
}
if (isset($_GET['p']) && $_GET['p'] == "login") {
if ($_POST['name'] != $reg_user) {
echo "<p>Sorry, that username does not match. Use your browser back button to go back and try again.</p>";
exit;
} else if ($reg_pass != sha1($_POST['pass'].$regsalt)) {
echo "<p>Sorry, that password does not match. Use your browser back button to go back and try again.</p>";
exit;
} else if ($_POST['name'] == $reg_user && sha1($_POST['pass'].$regsalt) == $reg_pass) {
setcookie('AMCMS31admin', $reg_pass);
header("Location: $_SERVER[PHP_SELF]");
} else {
echo "<p>Sorry, you could not be logged in at this time. Refresh the page and try again.</p>";
}
}
?>
This page is not directly accessable.