rendered paste body<!-- #include file="inc/serv/db.asp"-->
<%
dim proc, idArtist, status_msg
dim title, hierarchy(4, 2)
title = "Create Artist"
hierarchy(0, 0) = "Home"
hierarchy(0, 1) = "home.asp"
hierarchy(1, 0) = "Inventory Management"
hierarchy(1, 2) = "inventoryOverview.asp"
hierarchy(2, 0) = "Artists"
hierarchy(2, 1) = "viewAllArtists.asp"
hierarchy(3, 0) = "Create Artist"
hierarchy(3, 1) = "createArtist.asp"
if not isempty(request.form("btnCreateArtist")) then
set adoProc = server.createObject("ADODB.Command")
proc = run_proc_return(adoProc, "sp_insertArtist", adExecuteNoRecords, idArtist, adInteger)
if proc = true then
status_msg = "<p class=""success"">successfully inserted artist id # "& idArtist &"</p>"
else
status_msg = "<p class=""error"">ERROR: could not insert artist.<br /><br />"& proc &"</p>"
end if
set adoProc = nothing
end if
%>
<!-- #include file="doc.asp"-->
<!-- #include file="hierarchy.asp"-->
<h1 id="title">create artist</h1>
<form action="createArtist.asp" method="post" name="frmArtist">
<table cellspacing="2" cellpadding="0" border="0" class="form">
<% if not isempty(status_msg) then %>
<tr>
<td colspan="2" class="status">
<%= status_msg %>
</td>
</tr>
<tr>
<td colspan="2" class="rowspace" />
</tr>
<tr>
<td colspan="2" class="rowspace" />
</tr>
<% end if %>
<tr>
<th>first name</th>
<td><input type="text" name="fname" maxlength="150" /></td>
</tr>
<tr>
<th>last name</th>
<td><input type="text" name="lname" maxlength="150" /></td>
</tr>
<tr>
<td colspan="2" class="rowspace" />
</tr>
<tr>
<th>display name</th>
<td><input type="text" name="display_name" maxlength="300" /></td>
</tr>
<tr>
<td colspan="2" class="rowspace" />
</tr>
<tr>
<td colspan="2" class="rowspace" />
</tr>
<tr>
<th colspan="2" class="textarea_title">artist biography</th>
</tr>
<tr>
<td colspan="2" class="textarea">
<textarea name="biography"></textarea>
</td>
</tr>
<tr>
<td colspan="2" class="rowspace" />
</tr>
<tr>
<td colspan="2" class="form_controls">
<input type="hidden" name="is_active" value="1" />
<input id="disable" type="checkbox" name="disable" value="1" class="chk"
onclick="this.form.is_active.value = (this.checked) ? 0 : 1;" />
<label for="disable">disable this artist</label>
</td>
</tr>
<tr>
<td colspan="2" class="rowspace" />
</tr>
<tr>
<td colspan="2" class="form_controls">
<input type="submit" name="btnCreateArtist" value="Create Artist" class="submit" />
</td>
</tr>
</table>
</form>
<div id="related_links">
<a href="viewAllArtists.asp" class="related_link">view all artists</a><br />
<a href="viewArtistBatches.asp" class="related_link">view artist batches</a><br />
<a href="createPhoto.asp" class="related_link">upload photograph</a>
</div>
<!-- #include file="bottom.asp"-->