473,395 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

i needed that at a perticular time only one user able to enter threw admin section.

kamill
71
i want to make a website that contains admin section and i needed that at a perticular time only one user can enter threw the admin section.. How can i achive this ( threw php)?
Jan 3 '07 #1
4 1335
subash
33
i want to make a website that contains admin section and i needed that at a perticular time only one user can enter threw the admin section.. How can i achive this ( threw php)?
Hi

I think - you need to restrict the admin logins. ie) At a time only one admin can view the admin section, Right?

In your user table add the columns called timein (time stamp) and stillin (enum).

When an user entered into the admin area - update the flag stillin as "Y" and put the current time. When logged out has happened make this flag as "N"

If the second user tries to enter admin area - check whether already an user is there (on comparing the stillin flag)

If the timein value is say more than 2 hours changed the stillin flag as "N" to any other user.

Just think this logic - There might be other logics too

Thanks

Subash
Jan 3 '07 #2
ronverdonk
4,258 Expert 4TB
What code have you developed until now? Please show it to us, so we can guide you towards the solution to your problem.

Ronald :cool:
Jan 4 '07 #3
kamill
71
i have done it..but it is working if i update table fields in logout script...but if admin user directly close the browser instead of logout. the field did not updated....how can i call a logout script with closing browser that contains updation query.. i allready posted this question(how can i call a logout script that contains updation query with closing browser?) in java script and technical fourm.
thanking u.... try for me with a different mind and logic..
yr kamill
Jan 4 '07 #4
acoder
16,027 Expert Mod 8TB
i have done it..but it is working if i update table fields in logout script...but if admin user directly close the browser instead of logout. the field did not updated....how can i call a logout script with closing browser that contains updation query.. i allready posted this question(how can i call a logout script that contains updation query with closing browser?) in java script and technical fourm.
thanking u.... try for me with a different mind and logic..
yr kamill
Use sessions instead of depending on user logging out. When the session ends or no longer exists, the fields can be updated. Set a time out of inactivity for sessions, say 20 minutes? you may have to change your fields and logic, e.g. store session id in the database and compare when user logs in. There are other possibilities.
Jan 4 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: *** HAWK | last post by:
I'm trying to make a music CD webpage (eg hmv.com) using ASP. I want it to follow these guidelines: All visitors should be able to obtain a list of 1 - all CDs in the database listed by A-Z by...
3
by: Robizzle | last post by:
I write a simple php script where I can post news to my website. There is an html page (makenews.html) that has forms for username (in this example it is 'admin'), password (in this example it is...
7
by: Dennis C. Drumm | last post by:
Can my program access the HKEY_LOCAL_MACHINE/Software section of the registry when being used by a user with restricted rights (not with admin rights)? If so, how? I have a program that...
1
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
2
by: Fox1977 | last post by:
Hi folks, Just wondering if anyone can help me out with this problem I'm having getting a particular .net web application to run on a windows 2003 r2 x64 platform running as a domain account. ...
1
by: mzheng | last post by:
Hi I'm newbie here. I'd like to know what the admin tool used in Linux to add an additional gid for a perticular user. thanks in advance
7
by: jim | last post by:
I need to have 2 simple barcode reader applications finished by midnight tonight. I have never written any barcode reader software and need any help that you may be able to offer. I do not know...
6
by: mattmao | last post by:
Hi all. There is a challenge question I encountered recently, which says: "In plain English, there are six different ways when you want to tell someone else about the current time: ...
7
hsn
by: hsn | last post by:
hello everyone i am working on a program which will run the cmd. that part is done. in my program in the Vista OS i can run the normal user cmd. what i need to do is to run the admin cmd so i could...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.