Mam problem ze skryptem PSnews a mianowcie robie wsyzstko tak jak w readme a wygląda on tak :

Hi and welcome to PSnews - The Free Content Management System

Well, straight on with it, first things first, upload every single file in the zip file to your host or server, then browse to http://www.yoursite.com/PSnews_Login.asp

Login using this information:

Username: admin
Password: admin

Once logged in, create a new member for yourself with full access (ie. tick all the boxes) then Log Out and log back in using the new member information you just created. You can now delete the admin member. Once you've done this, goto News and add a new news article. Ok, done all that ? - Now onto how to incorporate PSnews into your site. PLEASE backup any files you alter (either PSnews or your own site files!).

At the bottom of this text file is a bog standard web page which we will use as an example. If you open up your existing news page, there are two lines you need to insert, these are:

<!--#INCLUDE FILE="PSnews_StartNews.asp"-->

and

<!--#INCLUDE FILE="PSnews_EndNews.asp"-->

Now where exactly you insert them is up to you. What you have to bear in mind is that anything contained within those two lines is looped a certain amount of times. The amount of times it gets looped depends on what value you have given strShowHowManyNewsPosts in the PSnews_Config.asp file.

Using the example below, you will see that everything within those two lines added gets looped x amount of times, therefore creating a new html table for each news item.

You will get a better idea of how this loop works by uploading all the files in this zip file and going to http://www.yoursite.com/PSnews_Site1.asp then viewing the source code for the page.

Ok, now it gets a little tricker. You now need to define in your webpage exactly where you'd like each field from the database to be displayed.

It's not too tricky, as the variable names are self explanetory (sort of).

What you have is a set of variables. Each variable contains some information relating to the news post, taken from the database. For example:



I gdy chcę wejść do PSnews_LogIn.asp to zamias okna logowania mam cos takiego :



<%@ LANGUAGE=VBScript %>
<% Option Explicit %>

<%
' Check to see if the user is logged in, if they are, redirect them immeditately to PSnews_admin.asp '
If Session("LoggedIn") = "1" Then
Response.Redirect "PSnews_Admin.asp"
End If
%>

<% ' Load the PSnews global settings ' %>
<!--#INCLUDE FILE="PSnews_config.asp"-->

<% ' Load the MD5 encryption algorhytm ' %>
<!--#INCLUDE FILE="PSnews_sha256enc.asp"-->

<%
' If not logged in, check for a cookie and see if we can log them in automatically '
If Request.Cookies("psnews")("MemberNickName") <> "" And Request.Cookies("psnews")("MemberPassword") <> "" Then
%>

<% ' Get the database path and open the connection to it ' %>
<!--#INCLUDE FILE="PSnews_set_and_open_database.asp"-->

<%
SQL = "SELECT * FROM tblMembers WHERE fldMemberNickName = '" & Request.Cookies("psnews")("MemberNickName") & "'"
Set RSuser = Conn.Execute (SQL)
If Not RSuser.BOF And Not RSuser.EOF Then
Session("MemberPasswordInDB") = RSuser("fldMemberPassword")
If Session("MemberPasswordInDB") = Request.Cookies("psnews")("MemberPassword") Then
%><!--#INCLUDE FILE="PSnews_PerformLogin.inc"--><%
Conn.Close
Response.Redirect "PSnews_Admin.asp"
Else
Conn.Close
End If
Else
Conn.Close
End If
End If
%>

<% ' Check to see if the username and password boxes have been filled in, if not, present user with login form ' %>
<% If Request.Form("Username") = "" Or Request.Form("Password") = "" Then %>

<% ' Start the HTML ' %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>PSnews - <%=strPSnewsVersion%> - Administration - Log In</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="PSnews">
<meta name="description" content="PSnews - Easy website news administration">
<meta name="keywords" content="PSnews, news, administration, members">
<meta name="owner" content="Rich Kavanagh">
<meta name="author" content="rich@pingspike.com">
<link rel="stylesheet" href="PSnews_stylesheet.css" type="text/css">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td height="106">
<table width="50%" border="0" cellspacing="0" cellpadding="0">

<tr>
<td><img src="PSnews_img_top.png" width="771" height="117" alt=""></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="32%">
<!--#INCLUDE FILE="PSnews_menu.inc"-->
</td>
<td width="68%" valign="top">
<table width="100%" border="0" cellspacing="5" cellpadding="5">
<tr>
<td class="main">
<center>
<br><span class="heading">PSnews - <%=strPSnewsVersion%> - Administration - Log In</span>
<br><br><br><br><br><br>
<form name="login" action="<%=Request.ServerVariables("SCRIPT_NAME")%>" method="post">
<table border="0">
<tr>
<td colspan="2" align="center" class="headingblue">Member Login<br><br></td>
</tr>
<tr>
<td class="main">Username:</td>
<td align="left"><input class="mainblue" type="text" name="Username" size="12" maxlength="30"></td>
</tr>
<tr>
<td class="main">Password:</td>
<td align="left"><input class="mainblue" type="password" name="Password" size="12" maxlength="30"></td>
</tr>
<tr>
<td colspan="2" align="right"><input class="main" type="submit" value="Login"></td>
</tr>
</table>
</form>
</center>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

<% ' Otherwise, the form has been filled in, so now check the username and passwords are correct ' %>
<% Else %>

<% ' Get the database path and open the connection to it ' %>
<!--#INCLUDE FILE="PSnews_set_and_open_database.asp"-->
<%
' Setup the SQL Query to get all user information for the Username given on the form '
SQL = "SELECT * FROM tblMembers WHERE fldMemberNickName = '" & Request.Form("Username") & "'"

' Send the SQL to the database '
Set RSuser = Conn.Execute (SQL)

' Loop until end of username list, comparing the password in the form against the password in the database '
If Not RSuser.BOF And Not RSuser.EOF Then
Session("MemberPasswordInDB") = RSuser("fldMemberPassword")

' Check to make sure the password is correct '
If Session("MemberPasswordInDB") = sha256("" & Request.Form("Password")) Then
%><!--#INCLUDE FILE="PSnews_PerformLogin.inc"--><%

' Otherwise, password is wrong, redirect them to PSnews_login.asp '
Else
Session("LoggedIn") = "0"
Response.Redirect "PSnews_LogIn.asp"
End If

' Otherwise username doesnt exist, redirect them to PSnews_login.asp '
Else
Session("LoggedIn") = "0"
Response.Redirect "PSnews_LogIn.asp"
End If

' Close the connection to the database '
Conn.Close
%>

<% ' Wrapup the first IF statement (the one that checks the login form) in the page ' %>
<% End If %>