<?php
require_once("cmscommon.inc");
?>
<html>
<head>
<title>CMS Article Entry/Edit</title>
<STYLE TYPE="text/css">
.headw { font: BOLD 14pt arial, helvetica, sans-serif; }
.headw { color: #336600; }
.headk { font: BOLD 11pt arial, helvetica, sans-serif; }
.headk { color: #336600; }
.smallk { font: 10pt arial, helvetica, sans-serif; }
.smallgk { font: 10pt arial, helvetica, sans-serif; }
.smallgk { color: #336600; }
.tinyk { font: 8pt arial, helvetica, sans-serif; }
</style>
<script language="javascript1.2">
var disStyle=0
var dom=document.getElementById||document.all
function getItem(id) {
return document.getElementById&&document.getElementById(id)? document.getElementById(id) : document.all&&document.all[id]? document.all[id] : null;
}
if(dom)
document.write('<style type="text/css" id="dummy">\
.tlink{\
display:none;\
}\
<\/style>')
if(dom&&typeof getItem('dummy').disabled=='boolean'){
document.write('<style type="text/css" id="showhide">\
.showhide{\
display:none;\
}\
#cdiv0 {\
display:block;\
}\
<\/style>');
disStyle=1;
}
function displayOne(idPrefix, idNum){
var i=0;
while (getItem(idPrefix+i)!==null){
getItem(idPrefix+i).style.display='none';
i++;
}
if (typeof idNum!=='undefined')
getItem(idPrefix+idNum).style.display='';
}
onload=function(){
displayOne('cdiv', 0);
if (disStyle)
getItem('showhide').disabled=true;
}
</script>
</head>
<?php
$sql = "SELECT * FROM cmsmain WHERE cmsid = 100606";
$result = db_query($sql, $db);
$myrow = mysql_fetch_array($result);
$coveragearea=$myrow["coveragearea"];
$application=$myrow["application"];
$topicid = $myrow["topicid"];
$sql = "SELECT * FROM cmstopic";
$topicresult = db_query($sql, $db);
?>
<body link="#336600" alink="#669966" vlink="#669966" >
<form name="addarticle" method="post" action="2.3EditorUpdateDatabase.php">
<input type="hidden" name="apptype" value="">
<input type="hidden" name="cmsid" value="<?php echo $cmsid?>">
<table width="100%" cellpadding="0" cellspacing="4" border="0" bgcolor="#FFFFFF">
<tr>
<td align="left" width="20%" class="smallgk"><b>Application:</b></td>
<td width="30%" align="left"><select name="application" onChange="displayOne('cdiv', this.selectedIndex);">
<option <?php if($application == ""){?> selected <?php } ?>value="">Please Select</option>
<option <?php if($application == "Need To Know Guides"){?> selected <?php } ?>value="Need to Know Guides">Need To Know Guides</option>
<option <?php if($application == "Buying Guides"){?> selected <?php } ?>value="Buying Guides">Buying Guides</option>
<option <?php if($application == "Local Page Articles"){?> selected <?php } ?>value="Local Page Articles">Local Page Articles</option>
</select></td>
<td width="49%" align="left" class="smallgk"><b>
<div id="apptype">
<div class="showhide" id="cdiv0" name="cdiv0"> </div>
<div class="showhide" id="cdiv1" name="cdiv1"> </div>
<div class="showhide" id="cdiv2" name="cdiv2">Topic:
<select name="topic">
<option value="" selected>- Select -</option>
<?php
while ($mytopic = mysql_fetch_array($topicresult))
{
?>
<option value="<?php echo $mytopic["topicid"]; ?>" <?php if($topicid == $myrow["topicid"]){?>selected<?php } ?>><?php echo $mytopic["topicname"] ?></option>
<?php
}
?>
</select>
</div>
<div class="showhide" id="cdiv3" name="cdiv3">Coverage Area:
<select name="coveragearea">
<option value="0" selected>- Select -</option>
<option <?php if($coveragearea == "Alaska"){?>selected<?php } ?>>Alaska </option>
<option <?php if($coveragearea == "Arizona"){?>selected<?php } ?>>Arizona</option>
<option <?php if($coveragearea == "Arkansas"){?>selected<?php } ?>>Arkansas</option>
<option <?php if($coveragearea == "California"){?>selected<?php } ?>>California</option>
<option <?php if($coveragearea == "Colorado"){?>selected<?php } ?>>Colorado</option>
<option <?php if($coveragearea == "Connecticut"){?>selected<?php } ?>>Connecticut</option>
<option <?php if($coveragearea == "Delaware"){?>selected<?php } ?>>Delaware</option>
<option <?php if($coveragearea == "Florida"){?>selected<?php } ?>>Florida</option>
<option <?php if($coveragearea == "Georgia"){?>selected<?php } ?>>Georgia</option>
<option <?php if($coveragearea == "Hawaii"){?>selected<?php } ?>>Hawaii</option>
<option <?php if($coveragearea == "Idaho"){?>selected<?php } ?>>Idaho</option>
<option <?php if($coveragearea == "Illinois"){?>selected<?php } ?>>Illinois</option>
<option <?php if($coveragearea == "Indiana"){?>selected<?php } ?>>Indiana</option>
<option <?php if($coveragearea == "Iowa"){?>selected<?php } ?>>Iowa</option>
<option <?php if($coveragearea == "Kansas"){?>selected<?php } ?>> Kansas</option>
<option <?php if($coveragearea == "Kentucky"){?>selected<?php } ?>>Kentucky</option>
<option <?php if($coveragearea == "Louisiana"){?>selected<?php } ?>>Louisiana</option>
<option <?php if($coveragearea == "Maine"){?>selected<?php } ?>>Maine</option>
<option <?php if($coveragearea == "Maryland"){?>selected<?php } ?>>Maryland</option>
<option <?php if($coveragearea == "Massachusetts"){?>selected<?php } ?>>Massachusetts</option>
<option <?php if($coveragearea == "Michigan"){?>selected<?php } ?>>Michigan</option>
<option <?php if($coveragearea == "Minnesota"){?>selected<?php } ?>> Minnesota</option>
<option <?php if($coveragearea == "Mississippi"){?>selected<?php } ?>> Mississippi</option>
<option <?php if($coveragearea == "Missouri"){?>selected<?php } ?>>Missouri</option>
<option <?php if($coveragearea == "Montana"){?>selected<?php } ?>>Montana</option>
<option <?php if($coveragearea == "Nebraska"){?>selected<?php } ?>>Nebraska</option>
<option <?php if($coveragearea == "Nevada"){?>selected<?php } ?>>Nevada</option>
<option <?php if($coveragearea == "New Hampshire"){?>selected<?php } ?>>New Hampshire</option>
<option <?php if($coveragearea == "New Jersey"){?>selected<?php } ?>>New Jersey</option>
<option <?php if($coveragearea == "New Mexico"){?>selected<?php } ?>>New Mexico</option>
<option <?php if($coveragearea == "New York"){?>selected<?php } ?>>New York</option>
<option <?php if($coveragearea == "North Carolina"){?>selected<?php } ?>>North Carolina </option>
<option <?php if($coveragearea == "North Dakota"){?>selected<?php } ?>>North Dakota</option>
<option <?php if($coveragearea == "Ohio"){?>selected<?php } ?>>Ohio</option>
<option <?php if($coveragearea == "Oklahoma "){?>selected<?php } ?>>Oklahoma</option>
<option <?php if($coveragearea == "Oregon"){?>selected<?php } ?>> Oregon</option>
<option <?php if($coveragearea == "Pennsylvania"){?>selected<?php } ?>>Pennsylvania</option>
<option <?php if($coveragearea == "Rhode Island"){?>selected<?php } ?>>Rhode Island</option>
<option <?php if($coveragearea == "South Carolina"){?>selected<?php } ?>>South Carolina</option>
<option <?php if($coveragearea == "South Dakota"){?>selected<?php } ?>>South Dakota</option>
<option <?php if($coveragearea == "Tennessee"){?>selected<?php } ?>>Tennessee</option>
<option <?php if($coveragearea == "Texas"){?>selected<?php } ?>>Texas</option>
<option <?php if($coveragearea == "Utah"){?>selected<?php } ?>>Utah</option>
<option <?php if($coveragearea == "Vermont"){?>selected<?php } ?>>Vermont</option>
<option <?php if($coveragearea == "Virginia"){?>selected<?php } ?>> Virginia</option>
<option <?php if($coveragearea == "Washington"){?>selected<?php } ?>>Washington</option>
<option <?php if($coveragearea == "West Virginia"){?>selected<?php } ?>> West Virginia</option>
<option <?php if($coveragearea == "Wisconsin"){?>selected<?php } ?>>Wisconsin</option>
<option <?php if($coveragearea == "Wyoming"){?>selected<?php } ?>>Wyoming</option>
<option <?php if($coveragearea == "District of Columbia"){?>selected<?php } ?>>District of Columbia</option>
</select></div>
</div>
</td>
</tr>
</table>
</form>
</body>
</html>
|