Long time no blog
http://www.campaignmonitor.com/templates/
Wednesday, 13 October 2010
Thursday, 3 June 2010
moving my Mac Home folder
nice article
http://chris.pirillo.com/how-to-move-the-home-folder-in-os-x-and-why/
http://chris.pirillo.com/how-to-move-the-home-folder-in-os-x-and-why/
Tuesday, 18 May 2010
Friday, 7 May 2010
Thursday, 29 April 2010
Thursday, 8 April 2010
Wednesday, 7 April 2010
Thickbox
So i've also been using the thickbox modal pop in java script to make nice modal boxes.Thickbox 3.1 here However my site is 900px wide and rather than covering the whole window I wanted it to simply cover the page.
To do this I added this to the css:
#TB_narrowbk {
position: relative;
z-index:102;
top:0px;
height:100%;
width:900px;
margin-left: 100px;
background-color:#000;
filter:alpha(opacity=75);
-moz-opacity: 0.75;
opacity: 0.75;
}
and this to the java script
}else{//all others
if(document.getElementById("TB_overlay") === null){
$("body").append("
$("#TB_overlay").click(tb_remove);
$("#TB_narrowbk").click(tb_remove); <-- added this
}
}
I can't be bothered to make it work with ie6. Damn ie6.
To do this I added this to the css:
#TB_narrowbk {
position: relative;
z-index:102;
top:0px;
height:100%;
width:900px;
margin-left: 100px;
background-color:#000;
filter:alpha(opacity=75);
-moz-opacity: 0.75;
opacity: 0.75;
}
and this to the java script
}else{//all others
if(document.getElementById("TB_overlay") === null){
$("body").append("
"); <-- modified this
$("#TB_overlay").click(tb_remove);
$("#TB_narrowbk").click(tb_remove); <-- added this
}
}
I can't be bothered to make it work with ie6. Damn ie6.
Tuesday, 6 April 2010
OK solved.
So I have solved this user specific download "problem". Now I know it should be easy as most websites have user based dynamic content but as a newbie I struggled to read through the complicated code on some sites.
But 've now solved it :) My function queries the database to see what level of acces each user should have, it then is basically an if statement as I mentioned before to check to see what should be outputted. The function also reads the version.txt files to output the current software versions below the download link.
So this is the code I call.
Function Pl1()
Session("P1") = 0
Session("ST") = 0
'Declare variable to hold the content of the version page
Dim strInclude
strInclude = getFileContents("updates/P1ver.txt")
Dim strConn ' Our Connection string to access the database
' -- Create objects
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
' Open the database connection object.
objConn.Open "driver={Microsoft Access Driver (*.mdb)}; dbq=" & Server.MapPath(MDB_URL) & "; uid=admin; pwd="
' ------Query database for P1
strSQL = "SELECT ID1 FROM " & USERS_TABLE & " WHERE (UID='" & Session("uid") & "');"
' Run Query
Set objRS = objConn.Execute(strSQL)
'check for records
if (objRS.BOF and objRS.EOF) then
response.write "No records found"
response.end
End if
' -- Output the contents of the Recordset to variable
objRS.MoveFirst
Do While Not objRS.EOF
' -- output the contents
Session("P1")= objRS.Fields(0)
' -- move to the next record
objRS.MoveNext
Loop
'Close connections
objRS.Close
set objRS = Nothing
objConn.Close
set objConn = Nothing
' Write links
if Session("P1") then
response.write "Platform Two
"
Response.Write strInclude
Else
response.write "Click here to upgrade to Platform One!
"
End if
End Function
But 've now solved it :) My function queries the database to see what level of acces each user should have, it then is basically an if statement as I mentioned before to check to see what should be outputted. The function also reads the version.txt files to output the current software versions below the download link.
So this is the code I call.
Function Pl1()
Session("P1") = 0
Session("ST") = 0
'Declare variable to hold the content of the version page
Dim strInclude
strInclude = getFileContents("updates/P1ver.txt")
Dim strConn ' Our Connection string to access the database
' -- Create objects
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
' Open the database connection object.
objConn.Open "driver={Microsoft Access Driver (*.mdb)}; dbq=" & Server.MapPath(MDB_URL) & "; uid=admin; pwd="
' ------Query database for P1
strSQL = "SELECT ID1 FROM " & USERS_TABLE & " WHERE (UID='" & Session("uid") & "');"
' Run Query
Set objRS = objConn.Execute(strSQL)
'check for records
if (objRS.BOF and objRS.EOF) then
response.write "No records found"
response.end
End if
' -- Output the contents of the Recordset to variable
objRS.MoveFirst
Do While Not objRS.EOF
' -- output the contents
Session("P1")= objRS.Fields(0)
' -- move to the next record
objRS.MoveNext
Loop
'Close connections
objRS.Close
set objRS = Nothing
objConn.Close
set objConn = Nothing
' Write links
if Session("P1") then
response.write "Platform Two
"
Response.Write strInclude
Else
response.write "Click here to upgrade to Platform One!
"
End if
End Function
Tuesday, 30 March 2010
User specific download.
Ok so i'm not a web designer but I have be handed the company's website to look after, it's crap and I'm working on a new one but in the mean time I still have to maintain what we have.
I needed a user specific download page stating three or four different download options, with the ones they can't access greyed out. To do this I intend on adding an extra column to the _private database which states which they can and can't access and then using this asp code
<%If Session("id")="XXX" Then
Server.Execute("yes.asp")
Else%>
!
<%End If%>
I just need to decided on exectuing the code from another file or including it as a txt and then replace the id for what ever column I like, or something to that effect.
I know this isn't a) the best or b) the most secure method but thats what i'm using for the time being until I can actually learn .asp
I needed a user specific download page stating three or four different download options, with the ones they can't access greyed out. To do this I intend on adding an extra column to the _private database which states which they can and can't access and then using this asp code
<%If Session("id")="XXX" Then
Server.Execute("yes.asp")
Else%>
!
<%End If%>
I just need to decided on exectuing the code from another file or including it as a txt and then replace the id for what ever column I like, or something to that effect.
I know this isn't a) the best or b) the most secure method but thats what i'm using for the time being until I can actually learn .asp
Browser renderer.
This let me render sites to see how fools running IE6 would see it.
http://ipinfo.info/netrenderer/
I will be filling this blog with junk over the next few days while I get started.
PA
http://ipinfo.info/netrenderer/
I will be filling this blog with junk over the next few days while I get started.
PA
dbar.
http://xsellize.com/threads/89864-Release-ONLY-NO-discussion-dBar-Theme-and-Mods-IV-as-of-02-22-10
I found this, and am now playing with it.
I found this, and am now playing with it.
Blog 1.
Ok so i'm going to fill this blog with things I find, use or enjoy. It's more of a scrap book for me than anything else.
PA
PA
Subscribe to:
Posts (Atom)