Jump to content

musicradiolive

Members
  • Content Count

    63
  • Joined

  • Last visited

Community Reputation

0 Neutral

About musicradiolive

  • Rank
    Newbie
  1. www.faceangels.comThe new community social networking site.Register for free. First 30 sign ups are currently getting FREE gold membership.Lots of new features being introduced to the site over the coming weeks.Register for free now!www.faceangels.com
  2. Hi.I'm trying to work out how to use www.blat.netIt's a command line program for sending mail.Can anyone tell me how to set it up.I want to use smtp.gmail.com as the sending server.But you have to give them a login for it.How do i specify my gmail login info?ThanksJon
  3. Hi All,I need some help with Parent & Child data.Basically, all my pages are stored in a database. The website contains sections and then in each section is the pages for that part of the site.The database is laid out like this:ID - The page ID NumberPName - The Page NamePCon - The Page ContentPType - Page Type (EITHER PARENT/CHILD)PParent - Parent of the page (If child).If the page is a parent then i just set the PParent to 0000.I want to display all the pages within the site as a table, in the layout of: <table width="100%" border="0"><tr><td>ID</td><td>Name</td></tr>---IF THE PAGE IS A PARENT IT THEN DISPLAYS:<tr><td><% =rs("ID") %></td><td><% =rs("PName") %></td></tr>---THEN IT MOVES ON TO DISPLAY THE NEXT PARENT.---HOWEVER, IF THERE IS A CHILD THAT BELONG TO THE PARENT (Found by ID, so if PParent = The ID of the parent pageit belongs to it)So then it will show:The parent as above then:<table width="100%><tr><td> </td><td><% = rs("id") %></td><td><% =rs("PName") %></td></tr></table>---THEN IT WILL CARRY ON. Thanks in advance for any help on this.Jon
  4. Hi.I'm using the script from http://javascript.internet.com/cookies/cookie-redirect.htmli cant work out how to remove the cookie.I've had no probs setting it,. I've used an image map. The user selects where they live, it redirects to that area page when they re-visit.But say it's a shared pc etc, they need to be able to remove the cookie.How do i do it?ThanksJon
  5. Any ideas on re-writing the processing page then?How would you have done it?
  6. Thanks for that, it worked a treat to create the table and form.I'm still having problems getting the processing page to work.FORM NOW LOOKS LIKE THIS: <form method="post" action="sendhere.asp?chart=<% =request.querystring("chart") %>&tracks=<% =Request.QueryString("tracks") %>"><font class="style1">Chart Date:</font> <input class="style1" type="text" name="ChartDate" value="DD.MM.YYYY" /><table class="style1" width="530" border="1" cellpadding="0" cellspacing="0"><tr><td width="60"> Position</td><td> Artist</td><td> Track Name</td><td> Status</td><td width="60"> Move</td></tr><%for i = 1 to request.QueryString("tracks")%><tr><td><input class="style1" size="3" type="text" readonly="yes" name="position<% =i %>" value="<% =i %>"></td><td><input class="style1" type="text" name="tartist<% =i %>"></td><td><input class="style1" type="text" name="tname<% =i %>"></td><td><select class="style1" name="tstatus<% =i %>"><OPTION>NO MOVE</OPTION><OPTION>DOWN</OPTION><OPTION>UP</OPTION><OPTION>NEW ENTRY</OPTION></select></td><td><input class="style1" size="3" type="text" name="tmove<%=i%>"></td></tr><%next%><tr><td colspan="5"><div align="center"><input class="style1" type="submit" value="SAVE CHART" /></div></td></tr></table></form> The processing page looks like this: <% strSql = "SELECT * FROM tblChartTables"rs.CursorType = 2rs.LockType = 3rs.open strSQL, adoConrs.AddNew if err.number <> 0 then response.write(sql) if adocon.errors.count > 0 then for each e in adocon.errors response.write e.description & "<br>" next end if response.end end if rs.Fields("CDate") = Request.Form("ChartDate")for i = 1 to request.QueryString("tracks")rs.fields("chart") = Request.QueryString("chart")rs.Fields("position") = Request.Form("position" & (i) & "")rs.Fields("artist") = Request.Form("tartist" & (i) & "")rs.Fields("track") = Request.Form("tname" & (i) & "")rs.Fields("status") = Request.Form("tstatus" & (i) & "")rs.Fields("move") = Request.Form("tmove" & (i) & "")nextrs.Update%>
  7. Hi.I need some help working out how to do something.As part of my radio stations website re-development, the new website management system will allow the Dj's to manage pages within the site, which i have aced .The only problem i've ran into is our chart editor. The system will allow Dj's to update their charts on the site.In the database is a table that has the following fields:ID - AUTO NUMBERNAME - NAME OF THE CHARTTRACKS - THE NUMBER OF TRACKS IN THE CHART-----------------------The next table contains the chart data.ID - AUTO NUMBERCHART - NUMBER (CORRESPONDING TO ID IN THE PREVIOUS TABLE)POSITION - THIS WEEKS POSITION (1, 2 ETC)ARTIST - THE TRACK ARTISTTRACK - THE TRACK NAMESTATUS - STATUS IN THE CHART (I.E. No Move, Down, Up, New Entry)MOVE - NUMBER OF POSITIONS MOVED (IF APPLICABLE)CDATE - THE DATE OF THE CHART------------------------Using the values in the table fields, they get sent to the chart creator page.In the querystring is the following:CHART= ("id number of the chart")TRACKS = ("the number of tracks in the chart")Knowing which chart to update isn't a problem the BIG problem is the number of tracks.I want it to build a form depending of this numberFor example <form method="post" action="sendhere.asp?chart=<% =Request.Querystring("chart") %>">Chart Date: <input type="text" name="text" value="MM/DD/YYYY"><table width="700" border="1" cellpadding="0" cellspacing="0"><tr><td>POSITION</td><td>ARTIST</td><td>TRACK NAME</td><td>STATUS</td><td>MOVE</td></tr><% 'TAKE THE NUMBER IN THE QUERYSTRING HERE TO BUILD THE FORM %><% <% DIM fields = RequestQuerystring("tracks") %><% 'COUNT THE NUMBER SPECIFIED WITHIN FIELDS / TRAKS QUERYSTRING AND BUILD THE TABLE BASED ON IT, FOR EACH NUMBER CREATE THIS: %><tr><td><input type="text" readonly="yes" name="position"></td><td><input type="text" name="artist"></td><td><input type="text" name="name"></td><td><select name="status"><OPTION>NO MOVE</OPTION><OPTION>DOWN</OPTION><OPTION>UP</OPTION><OPTION>NEW ENTRY</OPTION></select></td><td><input type="text" name="move"></td></tr><% 'loop it here'now close it here %><tr><td colspan="5"><input type="submit" value="SAVE CHART"></td></tr></table> My next problem is the taking each track and inserting it as a seperate record, any ideas how i do that? All help is appreciated.ThanksJon
  8. musicradiolive

    Invoice

    How do i write the code for the maths though!!I know the calculations, but i cant work out how to make the code take each item within the invoice to make them add together etc.
  9. musicradiolive

    Invoice

    Hey,Thanks for the reply.I'm stuck with the calculations.Basically, i am pulling the tblItems recordset to create the invoice, so it create the invoice list.For each item i have managed to use a calculation (shown in the above code) to create the total for that items. The calculation takes the QTY * the UnitPrice to create the answer, the total amount is then put into a text box which is read only.To make each text box unique i have made it so it names it using the rs("id") from tblItems. <input readonly="yes" style="background-color:#FFFFCC" size="4" name="<% =rs("id") %>" type="text" value="<% Response.write(theAnswer) %>"> The next bit is the shipping, tax1 and tax2 from tblInvoices. I want to take the values of the items and add the shipping, tax1 and tax2 to create the GrandTotal. Next is the payments, so when a customer pays an amount of the invoice is deducts it from the grand total.When a customer pays it will put the details in tblPayments. The payments will be shown on the invoice the same way the invoice is shown using the id field to make each text field unique.I want to take the grand total - each payment = AMOUNT OUTSTANDING.I hope that makes sense and appreciate your help.ThanksJon
  10. musicradiolive

    Invoice

    Hi.I'm creating an online payment system for my company, but i am encountering a few problems.DATABASEtblItems¦- id (Auto Number)¦- ItemNumber¦- IDescription¦- Qty¦- UnitPrice¦- Invoice¦- TDatetblInvoices¦- id (Auto Number)¦- IDate¦- Amount¦- Client¦- AmountDue¦- DueDate¦- InvoiceNumber¦- Rep¦- Shipping¦- Tax1¦- Tax2tblPayments¦- id (Auto Number)¦- IDate¦- InvoiceNumber¦- Amount¦- Method¦- RunningTotal <%strSQL = "Select * FROM tblItems WHERE Invoice = '" & Request.QueryString("id") & "'"rs.Open strSQL, strCondo while not rs.eoftheVarA = rs("Qty")theVarB = rs("UnitPrice")theOperator = "Multiply"if theOperator = "Multiply" then theAnswer = theVarA * theVarB%> A table then lists the items in the invoice and the QTY is multiplied by the Amount to create the total of that part of the invoice.I then need to take each of those totals to create a subtotal. Then i will pull the shipping amount, the tax1 and the tax2 from the databse and i want to then calculate subtotal + shipping + tax1 + tax2 to create the grand total.Next, i want to pull payments from the tblPayments.When a payment is made online the details are sent back to the database, and i want that total to be deducted from the invoice to show how much is outstanding.So basically GrandTotal - Each payment.Thanks in advance.Jon
  11. Hi All,I need a bit of help with some code.Brief:On the homepage of my site i have got 2 sections, 1 shows the latest news and the other will show the latest forum posts.I use Snitz for forums and KustomPage for Content Management System.The news one i have done without any problems, but the forums one i am having a few problems with.HERE IS THE CODE I USE FOR THE NEWS (SUPPLIED BY KUSTOM PAGE BUT TWEAKED BY ME) <% strSQL = "Select * FROM tblNews ORDER BY tblNews.pDate DESC" rs.Open strSQL, strCon for i = 1 to newsItems if not rs.eof then dim desc, tmp 'desc = removeHTML(desc) desc = left(rs("Text"), newsDesc)%><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#333333" bgcolor="#CCCCCC"> <tr> <td class="newsdate"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div align="left"><font class="newsdate"><% =rs("pDate") %></span></div></td> </tr> <tr> <td><img src="/images/trans.gif" width="1" height="2" /></td> </tr> <tr> <td><div align="left"><span class="newsquick"><% =Desc %></span></div></td> </tr> <tr> <td><img src="/images/trans.gif" width="1" height="2" /></td> </tr> <tr> <td><div align="right" class="readfull"><a class="readfull" href="?Page=News&Title=<% =server.urlEncode(rs("Title")) %>">Read Full Story</a></div></td> </tr> </table> </td> </tr> </table> <% rs.movenext desc = "" if i < newsItems then if not rs.eof then response.write("<img src=/images/trans.gif height=3 width=1>") end if else end if nextrs.close%> Now, for the forums i want to display the items in a similiar way.For each one (it will show the last 5) i want it to do this:> SUBJECT (linked through to view the full post) [T_SUBJECT]Posted by USERNAME - DATE AND TIME [T_LAST_POSTER] [T_LAST_POST]The problem i face with this is that the topics and usernames are in 2 seperate tables.From FORUM_TOPICS i need to pull:T_SUBJECT - Subject of the postT_LAST_POSTER - The last poster in the topicT_LAST_POST - The date of the last postThe last poste field just uses a number which is the ID Number of the user. From FORUM_MEMBERS i need to pull:MEMBER_ID - ID Number of the userM_USERNAME - Username of the userAny help is really appreciated.ThanksJon
  12. strsql= SELECT AdName, Forward FROM tblAds WHERE AdName = 'Connect' GIVES:Microsoft VBScript compilation (0x800A03EA)Syntax errorstrsql= "SELECT AdName, Forward FROM tblAds WHERE AdName = 'Connect' "GIVES:ADODB.Recordset (0x800A0BB9)Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
  13. str_sql = "SELECT tblAds.AdName, tblAds.Forward FROM tblAds WHERE AdName ='" & which & "'"Still gives the same error though....Or have i mis-understood?
  14. Changed bottom of through.asp str_sql = "SELECT tblAds.AdName, tblAds.Forward FROM tblAds WHERE AdName = " & which & "" 'rs.Open str_sql, conn, 1, 2 response.Write(str_sql)'Response.Redirect =rs("Forward") GENERATES::SELECT AdName, Forward FROM tblAds WHERE AdName = Connect
×
×
  • Create New...