|
hello folks,
i am on a project using PHP and i need to retreive the currently logged-on windows user on a remote machine, how can i do this?
so all u code guru's out there could u pls help out.
thanx
there is always more than there is
socx d'buck
|
|
|
|
|
So....your running PHP on a windows box...and you need to determine who is logged in to the Windows machine?
Your not asking how to do PHP authentication?
Good question...
The PHP script when it runs might very well have the user which the script is running stored somewhere in the $_SERVER
Check that out...see if you can find anything on executing environment variables
_ENV["LOGNAME"] seems promising...
Cheers
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
I have a program that prints a little informative list to the web on request. Basically, I place some strings in a file that displays a banner and a few strings, then call the default browser to read it..
We are preparing to support asian languages so I created a unicode version of my app using the _UNICODE flag in my build). The web page created by the unicode version of the app is not readable to IE 6 or Mozilla 1.04.
It looks like the browser can't read the source code. Trying different browser settings changes the image presented, but does not fix the problem.
I did not expect the problem because I was thinking that XPis inherently Unicode and I am working with a saved file, not writing directly to the internert. Why can't the browser read my file? The same code works fine in the non-unicode build.
Can someone enlighten me on this?
Judith Bello
|
|
|
|
|
I figured it out. The problem was that I wasn't counting the length of the writes properly.
Judith Bello
|
|
|
|
|
Hi All,
Can anybody help me to print the content of table, which contains the search result on my asp.net webpage?. I am using C# as a programming language for my asp.net web applications.
Thanks in advance…
Mahantesh
Mahantesh V H
India
|
|
|
|
|
hi there,
u can use javascript to print ur web page
try with: window.print
Th@nh: VN
|
|
|
|
|
hey all i'm trying to set up a very simple intranet web.. thingy.
its just for peer evaluation paper work
right now i got a login.php that asks for username/pass which posts to login2.php which does authentication.
how do i set it up so that that user doesnt need to go through another logon screen, at least till they close their browser?
this is my login.php:
<?php
if (! isset($_SESSION['UIDn']))
{ echo '<html>';
echo '<body>';
echo '<h4>Evaluation Login</h4>';
echo '<form action="login2.php" method="post">';
echo '<p>User Name: <input name="uname" type="text" /></p>';
echo '<p>Password: <input name="pword" type="password" /></p> ';
echo '<input type="submit" value="Log in" />';
echo '</form>';
}
else
{ echo '<html>';
echo "<meta http-equiv='refresh' content='0;URL=http://roy/peereval/todo.php'>";
echo '<body>';
}
?>
</body>
</html>
=============
but it is always dropping into the if =( even after i validate on login2.php
<?php
session_start();
$UIDn=0;
$_SESSION['UIDn'] = $UIDn;
echo "<html><body>";
$uname = $_POST['uname'];
$pword = $_POST['pword'];
...
$UIDn = odbc_result($thingy,1);
?>
</body>
</html>
could any one point me in the right direction?
|
|
|
|
|
What you want is function called (for example) is_user_logged_in() that you put in the top of every page that requires a logged in user.
Next you make the LogIn screen / form / whatever verify the user credentials entered and set a cookie on successful log in. Thats what the above function checks for.
If you set the lifetime of the cookie to 0 (zero) it will be deleted when the user closes the browser.
HTH
|
|
|
|
|
Hi Friends,
I am trying to authenticate my site's user from Active directory through LDAP,
But the problem is I don't have any idea of how to do this, earlier the users were being authenticated by the code which access a global domain using an anonymus user a/c, through LDAP. Now I need to change it to Active directory. I m not getting how should I achieve it.
Please help ... How should I start..?
Thanks
Nitin
Nitin Kumar Gupta
System Executive
NIIT Technologies
India
|
|
|
|
|
|
Thanks- Colin, but I need to do it in ASP 3.0, please help me in that...
Actually my requirement is to convert code to authenticate users from LDAP server to siteminder (Acitve Directory) written in asp.
Thanks
Nitin
Nitin Kumar Gupta
System Executive
NIIT Technologies
India
|
|
|
|
|
Hi All,
Iam deleveloping a web solution where I want to either hide the cursor or move to any point of my choice. can anybody help me out in this using javascript, ASP.Net(c#,vb.net)
Regards
Enigma
|
|
|
|
|
I think it can't be by asp cuz you cann't control the server state.
|
|
|
|
|
|
Hi,
So can let me know is there any way I can hide the mouse cursor or fix it to any predefined x, y coordinates on the screen using JavaScript.
Regards
Enigma
|
|
|
|
|
|
I've spent quite some time developing a table component which makes output like this:
<div style="width: 100%; overflow: scroll;">
<table>
<tr>
<td style="width: 100px;"> Column 1 </td>
<td style="width: 100px;"> Column 2 </td>
<td style="width: 100px;"> Column 3 </td>
</tr>
</table>
</div>
The idea is that the table will take up as much space as it can, and have scrollbars when column widths overflow container size.
It works great when added directly in the body tag, but if I put it inside a td tag, IE suddenly allows the div and table to expand, even if the parenting table and td are also set to 100% width. I'm too lazy to look it up, but it doesn't make sense, and it works in Mozilla so it must be a bug in IE.
Whatever it is, I need to make it function, so does anybody know a workaround?
"God doesn't play dice" - Albert Einstein
"God not only plays dice, He sometimes throws the dices where they cannot be seen" - Niels Bohr
|
|
|
|
|
Hi Jan,
In the style of the parent table, you simply set the table-layout property to fixed :
<TABLE width="100%" style="TABLE-LAYOUT: fixed; WIDTH: 100%" ...>
|
|
|
|
|
Thanks!
It's working perfectly.
"God doesn't play dice" - Albert Einstein
"God not only plays dice, He sometimes throws the dices where they cannot be seen" - Niels Bohr
|
|
|
|
|
Hi I am developing a site using ASP. I have made an ASP file DBOperations.asp in which i perform all the functions related to database(ie Open/ Close Connection, Insert/Update/Delete etc). I want to make function to which i pass sql query and it returns the Recordset.
Plz if u know abt it or have same sort of file do send me.
Thnx in advance Prayers after reply
|
|
|
|
|
If you post the source where you run the query, I am sure someone will show you how to wrap it up in a function. There are different ways to get recordsets and there are different types of recordsets. For example, if you want a recordset to read only, you would want a forward, read-only, disconnected recordset...
If you google, you will find all kinds of articles that would explain what recordset would work best in a given scenario.
|
|
|
|
|
I would like to save my website on a CD for easy viewing for people not connected to the Internet.
Is it possible in some way to view a ASP website from a CD?
Best regards!!
|
|
|
|
|
xaphod wrote:
Is it possible in some way to view a ASP website from a CD?
No. The ASP pages must be processed by IIS or some other ASP enabled webserver before the output is delivered to the browser. I'd believe that the number of people running a webserver and not being connected is quite limited
"God doesn't play dice" - Albert Einstein
"God not only plays dice, He sometimes throws the dices where they cannot be seen" - Niels Bohr
|
|
|
|
|
Hello All,
Here is my problem:
I have a datagrid enclosed with a DIV. The DIV tag has its overflow style property set to auto. When the number of results in the grid exceeds the height of the tag, the tag creates a scrollable region for the results.
This works just fine in many of the IE browsers I have been testing with.
The bug:
On some browsers (so far confined to laptops only?!!?), when the results exceed the height of the tag and IE creates the scrollable region, a large white gap appears on the screen where the DIV tag and its results should be, and pushes the datagrid html down the screen. Refreshing the browser fixes this problem.
Fixes:
I have seen various postings on line to fix this solution, such as setting a background image for the BODY to force the browser to draw the layers differently, to use a SPAN tag, but none of them have worked.
Any thoughts?
Thanks in advance!!
sprout
|
|
|
|
|
i developed a websit and i used a user controle for home page. when i redirct the user to login page follwing error displays
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The virtual path '/HomePage.ascx' maps to another application, which is not allowed.
Source Error:
Line 1: <%@ Register TagPrefix="uc1" TagName="HomePage" Src="../HomePage.ascx" %>
Line 2: <%@ Page language="c#" Codebehind="login.aspx.cs" AutoEventWireup="false" Inherits="Site.Administration.Users._default" %>
Line 3: <%@ Register TagPrefix="uc2" TagName="HomePage" Src="HomePage.ascx" %>
Source File: C:\Projects\Site\login.aspx Line: 1
can anybody help me in this regard...
|
|
|
|