|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: |
PHP
------
<TR style="font-size:12px;font-family:arial;background-color:<?php echo $row_color; ?>">
<TD><?php echo $row["medDte"]; ?></TD>
<TD><?php echo getMediaName($row["medType"]); ?></TD>
<TD><?php echo $row["medCopy"]; ?></TD>
<TD><?php echo $row["medPurpose"]; ?></TD>
<TD align="center">
<?php
//echo "copies: ".$row["medCopy"];
if ($row["medCopy"] > 1)
{
echo "<a href='mediaDetail.php?medid=".$row["medID"]."&reqID=".$row["ReqID"]."'>Detail</a>";
}
else
{
$sql = "SELECT
dbo.tblRequestor.ReqID AS Expr1,
dbo.tblRequestor.pid,
dbo.tblMediaTracker.statusID AS medStatusID,
dbo.tblMediaTracker.MediaID,
dbo.tblMediaTracker.MediaIDNumber As medIDNumber,
dbo.tblMediaTracker.mediaTrackID as mediaTrackID
FROM
dbo.tblMediaTracker INNER JOIN
dbo.tblRequestor ON dbo.tblMediaTracker.reqID = dbo.tblRequestor.ReqID WHERE dbo.tblRequestor.pid=".$_SESSION["pid"]." AND dbo.tblMediaTracker.MediaID=".$row["medID"];
//echo $sql;
$results = mssql_query($sql);
if ($rows=mssql_fetch_array($results))
{
if ($rows["medStatusID"] == 4)
{
echo "<a href='cancelRequest.php?trackId=".$rows["mediaTrackID"]."&type=single&medid=".$row["medID"]."'><img border=0 src='image/delete.gif' alt='Delete Request'></a>";
}
elseif ($rows["medStatusID"] != 3)
{
echo "<A HREF=javascript:popUp('statusPop.php?trackId=".$rows["mediaTrackID"]."&statusId=".$rows["medStatusID"]."&typed=".$row["medType"]."&cnt=(1)')>".getStatusName($rows["medStatusID"])."</a>";
echo "<br><span style=font-size:10px;font-weight:bold>Media ID #:".$rows["medIDNumber"]."</span>";
}
else
{
echo "<span style='font-style:italics;color:red'>DESTROYED</span>";
}
}
}
?>
</TD>
<!-- <TD><a HREF=javascript:popUp('statusPop.php')>Cancel</a></TD> -->
</TR>
ASP.NET
----------
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="myRequest.aspx.cs" Inherits="RequestMedia.myRequest" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<link href="mediaCSS.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<!-- ****************** BEGIN OUTER TABLE ****************** -->
<table width="95%" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td width="15%" bgcolor="#ffffff" valign="top">
<div id="navcontainer">
<ul id="navlist">
<li><a href="default.aspx" id="newNavMed" style="">New Media Request</a></li>
<li><a href="#" id="navReq" style="">My Media Requests</a></li>
</ul>
</div>
</td>
<td bgcolor="#dddddd">
<!-- ****************** BEGIN 1ST INNER TABLE ****************** -->
<table width="100%" cellpadding="3" cellspacing="1" border="0">
<tr>
<td class="tblHeading" colspan="2">New Media Request</td>
</tr>
<tr>
<td class="formFields" colspan="2">
<asp:GridView ID="myRequestGridView1" runat="server" onselectedindexchanged="GridView1_SelectedIndexChanged" AutoGenerateColumns="false" Width="100%">
<Columns>
<asp:BoundField DataField="medDte" HeaderText="Request Date" HeaderStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="medType" HeaderText="Type" HeaderStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="medCopy" HeaderText="# of Media" HeaderStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="medPurpose" HeaderText="Purpose" HeaderStyle-HorizontalAlign="Left" />
<asp:templatefield>
<ItemTemplate>
<label id="mediaLink"><a href="requestDetail.aspx?">Detail</a></label>
</ItemTemplate>
</asp:templatefield>
</Columns>
</asp:GridView>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
Code Behind
---------------
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
namespace RequestMedia
{
public partial class myRequest : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection();
conn.ConnectionString = ConfigurationManager.ConnectionStrings["toucanMedia"].ConnectionString;
conn.Open();
SqlCommand cmd = new SqlCommand("getUserMedID", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@pid", 1208));
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
DataSet media = new DataSet();
adapter.SelectCommand = cmd;
adapter.Fill(media);
myRequestGridView1.DataSource = media;
myRequestGridView1.DataBind();
conn.Close();
}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
}
|
Advertisement
| Hall of Fame |