Jan 26

Display Name

ADSearch Name

International ISDN Number (Others)

internationalISDNNumber

accountExpires

accountExpires

accountNameHistory

accountNameHistory

aCSPolicyName

aCSPolicyName

adminCount

adminCount

altSecurityIdentities

altSecurityIdentities

Assistant

assistant

badPasswordTime

badPasswordTime

badPwdCount

badPwdCount

City

l

codePage

codePage

Comment

comment

Company

company

controlAccessRights

controlAccessRights

Country

co

Country Abbreviation

c

countryCode

countryCode

dBCSPwd

dBCSPwd

defaultClassStore

defaultClassStore

Department

department

desktopProfile

desktopProfile

destinationIndicator

destinationIndicator

Division

division

dynamicLDAPServer

dynamicLDAPServer

E-Mail Address

mail

E-Mail Address (Others)

otherMailbox

Employee ID

employeeID

Fax Number

facsimileTelephoneNumber

Fax Number (Others)

otherFacsimileTelephoneNumber

First Name

givenName

garbageCollPeriod

garbageCollPeriod

Generational Suffix

generationQualifier

groupMembershipSAM

groupMembershipSAM

groupPriority

groupPriority

groupsToIgnore

groupsToIgnore

Home Address

homePostalAddress

Home Drive

homeDrive

Home Folder

homeDirectory

Home Phone

homePhone

Home Phone (Others)

otherHomePhone

Initials

initials

International ISDN Number

primaryInternationalISDNNumber

IP Phone Number

ipPhone

IP Phone Number (Others)

otherIpPhone

Job Title

title

lastLogoff

lastLogoff

lastLogon

lastLogon

legacyExchangeDN

legacyExchangeDN

lmPwdHistory

lmPwdHistory

localeID

localeID

lockoutTime

lockoutTime

Logon Name

userPrincipalName

Logon Name (pre-Windows 2000)

sAMAccountName

Logon Workstations

userWorkstations

logonCount

logonCount

logonHours

logonHours

logonWorkstation

logonWorkstation

Manager

manager

maxStorage

maxStorage

mhsORAddress

mhsORAddress

Middle Name

middleName

Mobile Number

mobile

Mobile Number (Others)

otherMobile

mS-DS-CreatorSID

mS-DS-CreatorSID

mSMQDigests

mSMQDigests

mSMQDigestsMig

mSMQDigestsMig

mSMQSignCertificates

mSMQSignCertificates

mSMQSignCertificatesMig

mSMQSignCertificatesMig

msNPAllowDialin

msNPAllowDialin

msNPCallingStationID

msNPCallingStationID

msNPSavedCallingStationID

msNPSavedCallingStationID

msRADIUSCallbackNumber

msRADIUSCallbackNumber

msRADIUSFramedIPAddress

msRADIUSFramedIPAddress

msRADIUSFramedRoute

msRADIUSFramedRoute

msRADIUSServiceType

msRADIUSServiceType

msRASSavedCallbackNumber

msRASSavedCallbackNumber

msRASSavedFramedIPAddress

msRASSavedFramedIPAddress

msRASSavedFramedRoute

msRASSavedFramedRoute

Name

cn

networkAddress

networkAddress

Notes

info

ntPwdHistory

ntPwdHistory

nTSecurityDescriptor

nTSecurityDescriptor

o

o

objectSid

objectSid

Office Location

physicalDeliveryOfficeName

operatorCount

operatorCount

otherLoginWorkstations

otherLoginWorkstations

ou

ou

Pager Number

pager

Pager Number (Others)

otherPager

Phone Number (Others)

otherTelephone

Post Office Box

postOfficeBox

postalAddress

postalAddress

preferredDeliveryMethod

preferredDeliveryMethod

preferredOU

preferredOU

primaryGroupID

primaryGroupID

profilePath

profilePath

pwdLastSet

pwdLastSet

registeredAddress

registeredAddress

rid

rid

sAMAccountType

sAMAccountType

scriptPath

scriptPath

securityIdentifier

securityIdentifier

servicePrincipalName

servicePrincipalName

showInAddressBook

showInAddressBook

sIDHistory

sIDHistory

State/Province

st

street

street

Street Address

streetAddress

supplementalCredentials

supplementalCredentials

Telephone Number

telephoneNumber

teletexTerminalIdentifier

teletexTerminalIdentifier

Telex Number

primaryTelexNumber

Telex Number (Others)

telexNumber

terminalServer

terminalServer

textEncodedORAddress

textEncodedORAddress

thumbnailLogo

thumbnailLogo

thumbnailPhoto

thumbnailPhoto

Title

personalTitle

tokenGroups

tokenGroups

tokenGroupsGlobalAndUniversal

tokenGroupsGlobalAndUniversal

tokenGroupsNoGCAcceptable

tokenGroupsNoGCAcceptable

unicodePwd

unicodePwd

userAccountControl

userAccountControl

userCert

userCert

userCertificate

userCertificate

userParameters

userParameters

userSharedFolder

userSharedFolder

userSharedFolderOther

userSharedFolderOther

userSMIMECertificate

userSMIMECertificate

x121Address

x121Address

ZIP/Postal Code

postalCode

written by Kramfutten

Oct 16

I forbindelse med et lille projekt jeg har gang i, har jeg sat mig for at kode et lille rating system, som man ser på diverse sider såsom youtube mf.
Og da de fleste der er derude er lavet i php, tænkte jeg oh well.. hvorfor ikke lave sådan et lign. system bare i asp classic, så mig kode kode kode osv vuuuullaaa så er den i vinkel.

Hvis der er andre derude som sidder og tænker, hvordan hulen man laver dette, vil jeg dele det :)

Dette er hvad du skal bruge.
2 filer ( index.asp og update.asp )
1 database med 1 tabel ( underordnet om det er en accessdb eller mysql, mssql mf. )
1 billede ( alt_star.gif )
Og så skal det ellers liiiige i ovnen i ca. 45 min ved 37 grader, og vupti et stk rating system er klart.

index.asp :

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
<%
Set Conn    = Server.CreateObject("ADODB.Connection")
Set FileOBJ = Server.CreateObject("Scripting.FileSystemObject")
FilePath = "d:/xxxxxxxxx/databaserating.mdb"
 
If FileOBJ.FileExists(FilePath) Then
 conStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&filepath&";"
 Conn.Open conStr
End If
 
SQL = "SELECT * FROM Rating WHERE id=1"
Set RS = Conn.Execute(SQL)
 
result = ROUND(RS("voteValue") / RS("voteTotal"),1)
%>
<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"&gt;
http://www.w3.org/1999/xhtml"
 
<!--
  /*             styles for the star rater                */
 .star-rating{
  list-style:none;
  margin: 0px;
  padding:0px;
  width: 125px;
  height: 25px;
  position: relative;
  overflow:hidden;
  background: url(alt_star.gif) top left repeat-x;
 }
 .star-rating li{
  padding:0px;
  margin:0px;
  /*\*/
  float: left;
  /* */
 }
 .star-rating li a{
  display:block;
  width:25px;
  height: 25px;
  line-height:25px;
  text-decoration: none;
  text-indent: -9000px;
  z-index: 20;
  position: absolute;
  padding: 0px;
  overflow:hidden;
 }
 .star-rating li a:hover{
  background: url(alt_star.gif) left bottom;
  z-index: 2;
  left: 0px;
  border:none;
 }
 .star-rating a.one-star{
  left: 0px;
 }
 .star-rating a.one-star:hover{
  width:25px;
 }
 .star-rating a.two-stars{
  left:25px;
 }
 .star-rating a.two-stars:hover{
  width: 50px;
 }
 .star-rating a.three-stars{
  left: 50px;
 }
 .star-rating a.three-stars:hover{
  width: 75px;
 }
 .star-rating a.four-stars{
  left: 75px;
 }
 .star-rating a.four-stars:hover{
  width: 100px;
 }
 .star-rating a.five-stars{
  left: 100px;
 }
 .star-rating a.five-stars:hover{
  width: 125px;
 }
 .star-rating li.current-rating{
  background: url(alt_star.gif) left center;
  position: absolute;
  height: 25px;
  display: block;
  text-indent: -9000px;
  z-index: 1;
 }
 
 /* remove halo effect in firefox   */
 a:active{
  outline: none;
 }
-->
<h3>Rating:</h3>
<ul class="star-rating">
	<li><a href="update.asp?rating=1&amp;imgID=&lt;%=RS(">" title='1 star out of 5' class='one-star'&gt;</a></li>
	<li><a href="update.asp?rating=2&amp;imgID=&lt;%=RS(">" title='2 stars out of 5' class='two-stars'&gt;</a></li>
	<li><a href="update.asp?rating=3&amp;imgID=&lt;%=RS(">" title='3 stars out of 5' class='three-stars'&gt;</a></li>
	<li><a href="update.asp?rating=4&amp;imgID=&lt;%=RS(">" title='4 stars out of 5' class='four-stars'&gt;</a></li>
	<li><a href="update.asp?rating=5&amp;imgID=&lt;%=RS(">" title='5 stars out of 5' class='five-stars'&gt;5</a></li>
</ul>
&lt;%=result%&gt;/5 Stjerner. baseret på &lt;%=RS("voteTotal")%&gt; ratings

Update.asp :

&lt;%
Set Conn    = Server.CreateObject("ADODB.Connection")
Set FileOBJ = Server.CreateObject("Scripting.FileSystemObject")
FilePath = "d:/xxxxxx/databaserating.mdb"
 
If FileOBJ.FileExists(FilePath) Then
 conStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&amp;filepath&amp;";"
 Conn.Open conStr
End If
 
SQLupdate = "UPDATE rating SET voteTotal=voteTotal+1,voteValue=voteValue+"&amp;Request.QueryString("rating")&amp;" WHERE id="&amp;request.QueryString("imgID")
Conn.Execute(SQLupdate)
 
'response.Write("rating ikke tom")
 
Response.Redirect("index.asp")
%&gt;

Sådan skal din Database se ud :

id - primær nøgle - autonummerering
voteTotal - tal
voteValue - tal

Har du nogle spørgsmål til dette lille rating system så bare fyre afsted med nogle kommentarer.
Denne kan sagtens udvides, sådan at der f.eks. er tjek på om der divideres med 0, kun muligt at vote én gang ifa. f.eks. cookies – ipadresse

written by Kramfutten

Oct 01

En af mine kammerater, stod og havde brug for at køre et scheduleret job på hans server, som henter data fra en accessdb.
Hvilket lyder rimelig nemt, dog problemet er bare at han har ikke en IIS til tilrådighed eller andre muligheder for at køre noget automatiseret SQL.. så derfor fik han lige lidt hjælp :) løsningen er at bruge VBscripting som køre hurtigt og smertefrit..

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
dim temp
temp = Main
dim conn
 
Function Main()
 
Set Conn = CreateObject("ADODB.Connection")
Mdb = "orgDiagram.mdb"
Conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" &amp; Mdb &amp; ";"
 
DoIt
 
conn.Close
Set conn = Nothing
 
End Function
 
Sub DoIt
dim sql
dim rsOpg
 
MsgBox "Er kramfutten på isen ?"
 
Set rsOpg = CreateObject("ADODB.Recordset")
rsOpg.CursorType = 2 ' adOpenDynamic
rsOpg.CursorLocation = 3 ' adUseClient
rsOpg.LockType = 3 ' adLockOptimistic
rsOpg.Open "select * from members where userID=1", conn
 
Do while Not rsOpg.EOF
msgBox("Titel: "&amp;rsopg("Titel"))
rsOpg.MoveNext
Loop
 
rsOpg.Close
Set rsOpg = Nothing
 
End Sub

Ovenstående vil også virke over et netværk, man ændre bare variablen MDB til UNC stien hvor ens mdb fil er placeret..

written by Kramfutten