[YMCS/YDMP Free Trial Program]Yealink would like to offer Free Trial Program of Yealink device management service for our current eligible customers. You can see the details below.
https://www.yealink.com/ydmp-freetrial-2020


Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple PHP Phonebook
Author Message
jaykay Offline
Junior Member
**

Posts: 9
Joined: Feb 2015
Reputation: 0
Post: #31
RE: Simple PHP Phonebook
(03-02-2015 01:08 AM)jaykay Wrote:  
(02-28-2015 05:14 PM)WelshPaul Wrote:  
(02-28-2015 04:57 AM)jaykay Wrote:  
(02-28-2015 04:07 AM)WelshPaul Wrote:  I'm confused... Are you talking about updating the XMl file in phonebook script posted above? or your own XML file that your hosting on your web server?

If your on about the phonebook script I posted above you simply login and add, edit or delete the contact or contacts and click on Generate Remote Phonebook and the XML file is created or updated (if it exists already) automatically.


Thanks for the prompt reply. Maybe I just jumped in here without reading your post properly..... I've had a long day!
So can I bulk import contacts from a csv file to your script?
Will xampp do or do you recommend another program for the sql part.

Ah right I got you, no. I know, I know... All that hassle for a no lol

If you already have an XML or CSV file with a list there is no way to import that into the script above. It's a manual process but once listed in the phone book it's easy to export a CSV based on that phone book list for use on any device or a XML for use with an online phone book.

I should point out that this isn't really *my* script, I just added the ability to login/logout and made a few changes to the way it generates the files. It still needs some work so if anyone wants to build on it then go for it. Smile

Ah well, I might just create a new list anyway because the ability to automatically update the phonebook across all phones is worth the effort
OK. I am trying to set up the phonebook but am missing something. My knowledge of MySql wouldn't be too good.
I downloaded your files to my htdocs folder on webserver.
I have created a new database on sql and named it "yealink". I have then imported phonebook_sql.sql. I then create a new user with a password for that newly created db.
When I then browse to localhost/phonebook I get a login page but an error when entering any username or password.
Any ideas?


Attached File(s) Thumbnail(s)
   
03-02-2015 06:25 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
cptjack Offline
Member
***

Posts: 97
Joined: Jan 2014
Reputation: 8
Post: #32
RE: Simple PHP Phonebook
(03-02-2015 06:25 PM)jaykay Wrote:  Any ideas?

Did you change the server, username, password and database names in the following line of file data\datalogin.php:
PHP Code:
$con=mysqli_connect("localhost","root","password","phonebook"); 

If these are correct, please verify that you can logon with the commandline, using the parameters:
Code:
mysql -h <server> -u <username> -D <database> -p

Please use the reputation button below if you like this post.
03-03-2015 03:37 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
jaykay Offline
Junior Member
**

Posts: 9
Joined: Feb 2015
Reputation: 0
Post: #33
RE: Simple PHP Phonebook
(03-03-2015 03:37 AM)cptjack Wrote:  
(03-02-2015 06:25 PM)jaykay Wrote:  Any ideas?

Did you change the server, username, password and database names in the following line of file data\datalogin.php:
PHP Code:
$con=mysqli_connect("localhost","root","password","phonebook"); 

If these are correct, please verify that you can logon with the commandline, using the parameters:
Code:
mysql -h <server> -u <username> -D <database> -p
Hi cptjack
I made the change and that has pushed me on a little bit. It looks like I need to alter the login.php file also. I see there are a lot of entries in this file with regard to username and password. Do you know which line I have to enter my username/password details?
I now have this error:

Notice: Undefined variable: error in C:\xampp\htdocs\phonebook\phonebook\login.php on line 75

Many Thanks
JK
(This post was last modified: 03-03-2015 04:32 AM by jaykay.)
03-03-2015 04:08 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
cptjack Offline
Member
***

Posts: 97
Joined: Jan 2014
Reputation: 8
Post: #34
RE: Simple PHP Phonebook
That's a non critical error, you should be able to login with a user now. The username and password in login.php are checked against the user table in the 'yealink' database.

To avoid the error message, the $error variable needs to be declared at the top of the script are non-critical errors should be suppressed.

Please use the reputation button below if you like this post.
03-03-2015 05:04 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
jaykay Offline
Junior Member
**

Posts: 9
Joined: Feb 2015
Reputation: 0
Post: #35
RE: Simple PHP Phonebook
(03-03-2015 05:04 AM)cptjack Wrote:  That's a non critical error, you should be able to login with a user now. The username and password in login.php are checked against the user table in the 'yealink' database.

To avoid the error message, the $error variable needs to be declared at the top of the script are non-critical errors should be suppressed.

I have 2 users in the db. One is the default user/user. The other is custom test/test. When I use either username I get "incorrect password". When I use something random or root as username I get "incorrect username". So it looks like it is recognising the username user or test from the db but accepting the password.
03-03-2015 05:29 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
cptjack Offline
Member
***

Posts: 97
Joined: Jan 2014
Reputation: 8
Post: #36
RE: Simple PHP Phonebook
Make sure to md5() your passwords with:
Code:
update users set password=md5('user') where username='user';
update users set password=md5('test') where username='test';

This should give you the passwords 'ee11cbb19052e40b07aac0ca060c23ee' and '098f6bcd4621d373cade4e832627b4f6' respectively.

Please use the reputation button below if you like this post.
(This post was last modified: 03-04-2015 06:20 AM by cptjack.)
03-04-2015 06:17 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
jaykay Offline
Junior Member
**

Posts: 9
Joined: Feb 2015
Reputation: 0
Post: #37
RE: Simple PHP Phonebook
(03-04-2015 06:17 AM)cptjack Wrote:  Make sure to md5() your passwords with:
Code:
update users set password=md5('user') where username='user';
update users set password=md5('test') where username='test';

This should give you the passwords 'ee11cbb19052e40b07aac0ca060c23ee' and '098f6bcd4621d373cade4e832627b4f6' respectively.

Meant to post yesterday. I created a new db and imported the .sql file. I made changes as per afore mentioned and I can now browse to the db with user/user. Thanks for your help.
03-04-2015 08:46 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Remote Phonebook - Numbers Display Format On Phone Medryn 19 74,459 11-24-2023 02:28 AM
Last Post: shulem@theteklink.com
  yealink Phonebook Tool Oliaargau 8 42,087 06-28-2022 02:00 AM
Last Post: Beachnuttz
  Naming Phonenumbers in Remote-Phonebook t.kerkhoff 0 2,652 04-22-2022 10:37 PM
Last Post: t.kerkhoff
  Transfer to Remote Phonebook Minerva 5 20,339 10-22-2020 03:11 PM
Last Post: joe.carroll@managedinstalls.com
  Phonebook import on A T85 Dominik333 5 13,460 09-01-2020 11:29 AM
Last Post: Yisroel_MongoTEL
  Search Phonebook Prozper 2 8,231 11-13-2019 09:15 PM
Last Post: jolouis
  Phonebook Creation 64bit Rus 1 8,679 10-23-2019 08:29 PM
Last Post: dwooster
  Impossible to upload a csv to Phonebook Germain 8 20,702 09-07-2019 09:11 AM
Last Post: anksharmoli
  Phonebook generation tool dscope 2 21,646 07-24-2019 06:42 PM
Last Post: complex1
  Remote PhoneBook ftp aralmeida 2 10,677 05-17-2019 04:19 AM
Last Post: Denise558

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us   Yealink   Return to Top   Return to Content   Lite (Archive) Mode   RSS Syndication