Advertisement
|
[x]
Attachment Details
|
||
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: |
DATABASE
mysql_select_db($database_conn, $conn);
$query_Recordset1 = "SELECT user_usr.name_usr, user_usr.id_usr, contact_frm.idusr_frm, contact_frm.from_frm, contact_frm.subject_frm, contact_frm.to_frm, contact_frm.date_frm, contact_frm.read_frm FROM (contact_frm LEFT JOIN user_usr ON user_usr.name_usr=contact_frm.to_frm) ";
$Recordset1 = mysql_query($query_Recordset1, $conn) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
mysql_select_db($database_conn, $conn);
$query_Recordset2 = "SELECT id_usr, name_usr FROM user_usr";
$Recordset2 = mysql_query($query_Recordset2, $conn) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);
--------------------------------------------------------------
FORM
<select name="to_frm_<?php echo $cnt1; ?>" id="to_frm_<?php echo $cnt1; ?>">
<option value=""><?php echo NXT_getResource("Select one..."); ?></option>
<?php
do {
?>
<option value="<?php echo $row_Recordset2['name_usr']?>"<?php if (!(strcmp($row_Recordset2['id_usr'], $row_rscontact_frm['to_frm']))) {echo "SELECTED";} ?>><?php echo $row_Recordset2['name_usr']?></option>
<?php
} while ($row_Recordset2 = mysql_fetch_assoc($Recordset2));
$rows = mysql_num_rows($Recordset2);
if($rows > 0) {
mysql_data_seek($Recordset2, 0);
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
}
?>
</select>
<?php echo $tNGs->displayFieldError("contact_frm", "to_frm", $cnt1); ?> </td>
</tr>
<tr>
<td class="KT_th"><label for="subject_frm_<?php echo $cnt1; ?>">Subject:</label></td>
<td><input type="text" name="subject_frm_<?php echo $cnt1; ?>" id="subject_frm_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rscontact_frm['subject_frm']); ?>" size="32" maxlength="255" />
<?php echo $tNGs->displayFieldHint("subject_frm");?> <?php echo $tNGs->displayFieldError("contact_frm", "subject_frm", $cnt1); ?> </td>
</tr>
<tr>
<td class="KT_th"><label for="date_frm_<?php echo $cnt1; ?>">Date:</label></td>
<td><input name="date_frm_<?php echo $cnt1; ?>" id="date_frm_<?php echo $cnt1; ?>" value="<?php echo KT_formatDate($row_rscontact_frm['date_frm']); ?>" size="10" maxlength="22" wdg:subtype="Calendar" wdg:mask="<?php echo $KT_screen_date_format; ?>" wdg:type="widget" wdg:mondayfirst="false" wdg:singleclick="true" wdg:restricttomask="yes" wdg:readonly="true" />
<?php echo $tNGs->displayFieldHint("date_frm");?> <?php echo $tNGs->displayFieldError("contact_frm", "date_frm", $cnt1); ?> </td>
</tr>
<tr>
<td class="KT_th"><label for="message_frm_<?php echo $cnt1; ?>">Message:</label></td>
<td><textarea name="message_frm_<?php echo $cnt1; ?>" cols="50" rows="5" id="message_frm_<?php echo $cnt1; ?>" wdg:subtype="RestrictedTextArea" wdg:type="widget" wdg:maxchars="255" wdg:showcount="true" wdg:showmessage="true"><?php echo KT_escapeAttribute($row_rscontact_frm['message_frm']); ?></textarea>
<?php echo $tNGs->displayFieldHint("message_frm");?> <?php echo $tNGs->displayFieldError("contact_frm", "message_frm", $cnt1); ?> </td>
</tr>
</table>
<input type="hidden" name="from_frm_<?php echo $cnt1; ?>" id="from_frm_<?php echo $cnt1; ?>" value="Admin" />
<input type="hidden" name="read_frm" value="1" />
<input type="hidden" name="idusr_frm" id="idusr_frm" value="<?php if (isset($_POST['to_frm'])) {
qry = mysql_query("SELECT * FROM `user_usr` WHERE `name_usr` = '{$_POST['to_frm']}'");} echo $qry['id_usr'];?>"/>
|
|
[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! |
||
|
Loading Advertisement... |