Welcome Guest, Not a member yet? Register   Sign In
Get Macadress and forms with 4 buttons
#1

[eluser]Unknown[/eluser]
Hi everyone,

Im new with CI, but i hope everyone understand my stupid questions.


I want make a webpage to be online on lan, and i need to get the macadress of every computer will acess the page.
First Question -> Is it possible to make with CI?

Second Question -> i will create a view with 4 buttons, this buttons will be responsible to make inserts or updates on database , i.e. ,

Button 1 (morning entry)| button 2 (morning exit)| Button 3 (afternoon entry)| button 4(afternoon exit)


The user on first time to acess the webpage only show the button 1 active and will make insert in database (if the hour less x, if bigger button 1,2 and 4 inactive and only 3 will be active) and other will be inactives ;
the second time only button 2 is active and other inactives (if button 1 was clicked and hour less x ...), this is a bit confusing to explain but the objective is to make a time clock in a webpage, and the button will be responsible to save the hour, and the one person only work afternoon the webpage dont show the morning entry and morning exit buttons).

I have this structure

Model
getdata.php (to get the data to make restrictions buttons in views)

Controller
site.php (to manipulate the data retrieved from model and make restrinction to pass view)


View
main.php (how to know what buttons to show?? return a array from controller with html code???)

Sorry the horrible english, i hope you understand)

Regards.
#2

[eluser]CroNiX[/eluser]
PHP (let alone, CI) doesn't have a way to directly access a mac address, only the IP. I've seen examples by executing a shell command via PHP to get the MAC, but that's OS dependent and will only work on a local network, which you say you are using.

Doesn't each machine have it's own IP address? It seems that would be easier.

I don't follow your 2nd question.




Theme © iAndrew 2016 - Forum software by © MyBB