function template_submit() { global $txt, $context, $scripturl, $modSettings; echo ' <div class="tborder"> <table border="0" cellpadding="4" cellspacing="1" align="center" class="bordercolor" width="100%"> <tr class="titlebg"> <td height="26" align="center">' . $txt['smftrader_submittitle'] . ' - ' . $context['tradername'] . '</td> </tr> <tr> <td class="windowbg"> <form action="' . $scripturl . '?action=trader;sa=submit2" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="20%"><b>' . $txt['smftrader_whoareu'] . '</b></td> <td align="left"> <select size="1" name="saletype"> <option value="0" selected="selected">' . $txt['smftrader_buyer'] . '</option> <option value="1">' . $txt['smftrader_seller'] . '</option> <option value="2">' . $txt['smftrader_trade'] . '</option> </select> </td> </tr> <tr> <td width="25%">' . $txt['smftrader_transaction'] . '</td> <td align="left"> <select size="1" name="salevalue"> <option value="0" selected="selected">' . $txt['smftrader_positive'] . '</option> <option value="1">' . $txt['smftrader_neutral'] . '</option> <option value="2">' . $txt['smftrader_negative'] . '</option> </select> </td> </tr> <tr> <td width="25%">' . $txt['smftrader_shortcomment'] . '</td> <td align="left"><input type="text" max="100" name="shortcomment" size="75" /> <br />' . $txt['smftrader_shortcommentnote'] . ' </td> </tr>'; if (IsClassifiedsInstalled() == true) { if (count($context['class_listings_trader']) != 0) { echo '<tr> <td width="25%">' . $txt['smftrader_classifieds_listing'] . '</td> <td align="left"> <select name="listingid"> <option value="0"></option> '; } foreach ($context['class_listings_trader'] as $row) { echo '<option value="' . $row['ID_LISTING'] . '">' . htmlspecialchars($row['title'], ENT_QUOTES) . ' - ' . $row['realName'] . '</option>'; } echo ' </select> </td> </tr>'; } if (isset($modSettings['class_set_trader_feedback']) && $modSettings['class_set_trader_feedback'] == 1) { // Show nothing } else { echo ' <tr> <td width="25%">' . $txt['smftrader_topicurl'] . '</td> <td align="left"><input type="text" name="topicurl" size="75" /></td> </tr>'; } echo ' <tr> <td width="25%" valign="top">' . $txt['smftrader_longcomment'] . '</td> <td align="left"><textarea rows="10" name="longcomment" cols="64"></textarea></td> </tr> <tr> <td colspan="2" align="center"><br /> <input type="submit" value="', $txt['smftrader_submitfeedback2'], '" name="cmdsubmit" /> </td> </tr> </table> <input type="hidden" name="id" value="' . $context['traderid'] . '" /> </form> </td> </tr> </table> </div>'; TraderSystemCopyright(); }
function CheckIfInClassifieds($ID_LISTING, $memid) { global $db_prefix, $ID_MEMBER; if (IsClassifiedsInstalled() == true) { // Gets any listed that is completed with bids // WHERE the LIST OWNER = CURRENT VIEWER AND BIDDER = PROFILEID $context['class_listings_trader'] = array(); $request = db_query("\n\t\tSELECT \n\t\t\tl.title, l.ID_LISTING, m.realName, m.ID_MEMBER \n\t\tFROM ({$db_prefix}class_listing as l, {$db_prefix}class_bids as b)\n\t\t\tLEFT JOIN {$db_prefix}members as m ON (m.ID_MEMBER = b.ID_MEMBER)\n\t\tWHERE b.ID_LISTING = l.ID_LISTING AND b.bid_accepted = 1 AND l.listingstatus = 2 AND l.ID_MEMBER = {$ID_MEMBER} AND b.ID_MEMBER = {$memid} ", __FILE__, __LINE__); while ($row = mysql_fetch_assoc($request)) { $context['class_listings_trader'][] = $row; } mysql_free_result($request); // Gets any listed that is completed with bids // WHERE the LIST OWNER = PROFILEID AND BIDDER = CURRENT VIEWER $request = db_query("\n\t\tSELECT \n\t\t\tl.title, l.ID_LISTING, m.realName, m.ID_MEMBER \n\t\tFROM ({$db_prefix}class_listing as l, {$db_prefix}class_bids as b)\n\t\t\tLEFT JOIN {$db_prefix}members as m ON (m.ID_MEMBER = l.ID_MEMBER)\n\t\tWHERE b.ID_LISTING = l.ID_LISTING AND b.bid_accepted = 1 AND l.listingstatus = 2 AND l.ID_MEMBER = {$memid} AND b.ID_MEMBER = {$ID_MEMBER} ", __FILE__, __LINE__); while ($row = mysql_fetch_assoc($request)) { $context['class_listings_trader'][] = $row; } mysql_free_result($request); $found = false; foreach ($context['class_listings_trader'] as $listing) { if ($listing['ID_LISTING'] == $ID_LISTING) { $found = true; } } if ($found == true) { return true; } else { return false; } } else { return false; } }