Neurochirurgie minim invazivă
"Primum non nocere" este ideea ce a deschis drumul medicinei spre minim invaziv. Avansul tehnologic extraordinar din ultimele decenii a permis dezvoltarea tuturor domeniilor medicinei. Microscopul operator, neuronavigația, tehnicile anestezice avansate permit intervenții chirurgicale tot mai precise, tot mai sigure. Neurochirurgia minim invazivă, sau prin "gaura cheii", oferă pacienților posibilitatea de a se opera cu riscuri minime, fie ele neurologice, infecțioase, medicale sau estetice. www.neurohope.ro |
Dialpad login system -conectare la DB
Last Updated: Aug 29 2018 08:13, Started by
adi_master
, Aug 27 2018 22:30
·
0
#1
Posted 27 August 2018 - 22:30
Va salut stimati forumisti,
Am cumaparat recent un script de logare :https://codecanyon.n...-system/4588159 Conceptul este super dar problema este ca pot folosi doar un cod si un link de redirect. Pt a folosii mai multe coduri si link-uri aferente trebuie conectat la DB.Suport de la vanzator nu am asa ca incerc aici sa ma luminez. Un cumparator la scriptu-lui a fost foarte amabil si mi-a raspuns la e-mail: eu: hi there, Can you help me with a answer? Is about a script that you buy from Crodev(DialPAD).Can you use more then a code with your script?I mean ,if you have 5 users every one has a code and a redirect url?If yes,how did you do that?Unfortunately i have no answer and no support from Crodev the developer. Thanks in advance. Adrian el: You have to store each code to a database which should be bound with users id, codes tables should have an assign link for redirect, then whenever a user inserts a code, he will be redirected to the assigned link. as simple as that. Hope that helps. Cheers, Daca poate cineva sa-mi explice exact ce anume a vrut sa spuna.Si cum anume pot face asta. In Documentatia script-ului am codul de conectare la MySQL insa nu am si un model de DB pe care pot sa-l import in MySQL. // Make a MySQL Connection mysql_connect("localhost", "your_mysql_username", "mysql_password") or die(mysql_error()); mysql_select_db("mysql_table_name") or die(mysql_error()); // Retrieve all the data from the "example" table $result = mysql_query("SELECT * FROM example") or die(mysql_error()); // store the record of the "example" table into $row $row = mysql_fetch_array( $result ); // Print out the contents of the entry $pass = $row['password']; //If the tables column named "password"Va multumesc pt orice indrumare. Edited by adi_master, 27 August 2018 - 22:32. |
#2
Posted 28 August 2018 - 08:59
Nu sunt expert in chestii ce astea asa ca imi dau cu parerea. Din cate vad eu nu se specifica un format anume pentru baza de date, un nume, tabele, campuri, etc. deci ce ai de facut e sa pui MySQL sa adaugi o baza de date cu un tabel si in tabel sa ai 4 - 5 campuri sau cate vrei / de cate e nevoie si apoi sa modifici codul sa foloseasca acea baza de date. Acum cod nu pot sa iti dau ca si exemplu ca sunt totally noob in php.
|
#3
Posted 28 August 2018 - 09:36
Eu ti-am recomandat (poate printre rinduri, nu direct) sa nu dai banii aiurea: https://forum.softpe...n-and-redirect/
Bine ca a fost ieftin. Este evident ca nu te pricepi si, la fel de evident, ca aici nu primesti sfaturi utile (ehe, nu mai e ce era odata softpedia...) Ti-a raspuns si in mail ca e simplu - dar nu pentru tine - pentru cineva care se pricepe. Deci, apeleaza direct la cineva care se pricepe. |
#4
Posted 28 August 2018 - 09:56
adi_master, on 27 august 2018 - 22:30, said:
el: You have to store each code to a database which should be bound with users id, codes tables should have an assign link for redirect, then whenever a user inserts a code, he will be redirected to the assigned link. as simple as that. Hope that helps. Practic iti spune sa creezi o tabela amarata, vai de steaua ei, in care sa pui urmatoarele amarate de coloane: user_id, code, redirect_link Quote
face asta. In Documentatia script-ului am codul de conectare la MySQL insa nu am si un model de DB pe care pot sa-l import in MySQL. // Make a MySQL Connection mysql_connect("localhost", "your_mysql_username", "mysql_password") or die(mysql_error()); mysql_select_db("mysql_table_name") or die(mysql_error()); // Retrieve all the data from the "example" table $result = mysql_query("SELECT * FROM example") or die(mysql_error()); // store the record of the "example" table into $row $row = mysql_fetch_array( $result ); // Print out the contents of the entry $pass = $row['password']; //If the tables column named "password"Va multumesc pt orice indrumare. Amaratul script de mai sus , iti colecteaza toate valorile de pe coloana "password"(care cred ca in limbajul vostru care dati bani pe orice se numeste "code") Cum naiba sa dai bani pe tampenia asta ? |
#5
Posted 28 August 2018 - 10:29
uite aici codul echivalent gratis:
$nume_user = "Gigel"; $parola_user = "1234"; $server = "localhost"; $nume_baza_de_date = "baza_mea_de_date"; $nume_tabela = "tabela_mea_importanta"; $interogare_sql = "SELECT user_id, code, redirect_link from " . $nume_tabela mysql_connect($server, $nume_user, $parola_user) or die(mysql_error()); mysql_select_db($nume_baza_de_date) or die(mysql_error()); $result = mysql_query($interogare_sql) or die(mysql_error()); $row = mysql_fetch_array( $result ); $coloana_user_id = $row['user_id']; $coloana_code = $row['code']; $coloana_redirect_link = $row['redirect_link']; //adevarata printare a coloanelor si valorilor while($row = mysql_fetch_assoc($result)) { foreach ($row as $col => $val) { echo $col." = ".$val."<br>"; } } Tabela "tabela_mea_importanta" trebuie sa fie creata in baza de date, "baza_mea_de_date" pe serverul mysql local si userul Gigel cu parola 1234 trebuie sa fie creat pe acel server.De asemeni userul Gigel trebuie sa aiba permisiunile de read/write asupra bazei de date "baza_mea_de_date". Ca sa-ti ruleze scripturile trebuie sa ai instalat local serverul mysql si php. Daca esti pe windows, atunci foloseste software bundleul WAMP:http://ampps.com/wamp Daca esti pe linux atunci foloseste LAMP: https://www.linode.c...n-ubuntu-18-04/ Edited by CrocodiluMereuVesel, 28 August 2018 - 10:39. |
#6
Posted 28 August 2018 - 10:45
PS: cred ca ar fi mai bine sa pui aici tot proiectul tau inclusiv si scripturile pe care ai dat alti bani pe care le folosesti si sa ne spui ce doresti sa realizezi ?
|
#7
Posted 28 August 2018 - 13:51
trollerul_de_serviciu, on 28 august 2018 - 09:36, said:
Eu ti-am recomandat (poate printre rinduri, nu direct) sa nu dai banii aiurea: https://forum.softpe...n-and-redirect/ Bine ca a fost ieftin. Este evident ca nu te pricepi si, la fel de evident, ca aici nu primesti sfaturi utile (ehe, nu mai e ce era odata softpedia...) Ti-a raspuns si in mail ca e simplu - dar nu pentru tine - pentru cineva care se pricepe. Deci, apeleaza direct la cineva care se pricepe. CrocodiluMereuVesel, on 28 august 2018 - 10:29, said:
uite aici codul echivalent gratis: $nume_user = "Gigel"; $parola_user = "1234"; $server = "localhost"; $nume_baza_de_date = "baza_mea_de_date"; $nume_tabela = "tabela_mea_importanta"; $interogare_sql = "SELECT user_id, code, redirect_link from " . $nume_tabela mysql_connect($server, $nume_user, $parola_user) or die(mysql_error()); mysql_select_db($nume_baza_de_date) or die(mysql_error()); $result = mysql_query($interogare_sql) or die(mysql_error()); $row = mysql_fetch_array( $result ); $coloana_user_id = $row['user_id']; $coloana_code = $row['code']; $coloana_redirect_link = $row['redirect_link']; //adevarata printare a coloanelor si valorilor while($row = mysql_fetch_assoc($result)) { foreach ($row as $col => $val) { echo $col." = ".$val."<br>"; } } Tabela "tabela_mea_importanta" trebuie sa fie creata in baza de date, "baza_mea_de_date" pe serverul mysql local si userul Gigel cu parola 1234 trebuie sa fie creat pe acel server.De asemeni userul Gigel trebuie sa aiba permisiunile de read/write asupra bazei de date "baza_mea_de_date". Ca sa-ti ruleze scripturile trebuie sa ai instalat local serverul mysql si php. Daca esti pe windows, atunci foloseste software bundleul WAMP:http://ampps.com/wamp Daca esti pe linux atunci foloseste LAMP: https://www.linode.c...n-ubuntu-18-04/ Scriptul care l-am cumparat face autentificarea si redirect in php prin AJAX.Dar corespunzator documentatiei poti conecta scriptul in sine la DB.Asta imi trebuie. Tabela aia banala de care vb tu:user_id, code, redirect_link este exact cea ce vreau insa nu stiu sa o construiec.De aceea imi trebuie o dummy.sql pe care sa o pot importa in DB. Sunt noob in domeniu de aceea caut un sistem de logare si redirect usor de folosit perfect pe telefoane.(l-am gasit dar m-am impotmolit pe drum). Daca te pricepi si poti sa faci o tabela in aceea formula pt a putea fii importata ar fii super. In documentatie scrie: D.) PHP Code Explanation (check.php) This file is called by ajax. This file will return "ok" if the entered PIN equal to variable "$pass". The password can be changed manual or you can make to retrive the password from a database.Also you can now allow to redirect to a specified URL by change the variable "$url_redirect" and set the variable "$redirect" to true. session_start(); $redirect = false; // Set this to true if you want a redirect $url_redirect = 'http://www.google.com'; // Set here your url for redirect on successful authorization.Leave blank if dont need a redirection! $pass = "1234"; $msg; if(isset($_POST['btn_go'])) { if($_SESSION['count'] >= 3) { $msg['msg'] = "max_count"; } else { $pwd = trim($_POST['pwd']); if($pwd == $pass) { $_SESSION['count'] = 0; $_SESSION['user_auth'] = 1; $msg['msg'] = "ok"; if($redirect) { $msg['redirect'] = 1; $msg['url'] = $url_redirect; } } else { $_SESSION['count'] = $_SESSION['count'] + 1; $msg['msg'] = "wrong"; } } echo json_encode($msg); } else { echo "wrong"; }To get your password from a MySQL database, you need three informations : - MySQL username - MySQL password - MySQL table name If you have all this then we can start. Here is the code that you need to import into check.php, between "session_start();" and "if(isset($_POST['btn_go'])) ...". So the complete code must look like : session_start(); // Make a MySQL Connection mysql_connect("localhost", "your_mysql_username", "mysql_password") or die(mysql_error()); mysql_select_db("mysql_table_name") or die(mysql_error()); // Retrieve all the data from the "example" table $result = mysql_query("SELECT * FROM example") or die(mysql_error()); // store the record of the "example" table into $row $row = mysql_fetch_array( $result ); // Print out the contents of the entry $pass = $row['password']; //If the tables column named "password" $redirect = false; // Set this to true if you want a redirect $url_redirect = 'http://www.google.com'; // Set here your url for redirect on successful authorization.Leave blank if dont need a redirection! $msg; if(isset($_POST['btn_go'])) { if($_SESSION['count'] >= 3) { $msg['msg'] = "max_count"; } else { $pwd = trim($_POST['pwd']); if($pwd == $pass) { $_SESSION['count'] = 0; $_SESSION['user_auth'] = 1; $msg['msg'] = "ok"; if($redirect) { $msg['redirect'] = 1; $msg['url'] = $url_redirect; } } else { $_SESSION['count'] = $_SESSION['count'] + 1; $msg['msg'] = "wrong"; } } echo json_encode($msg); } else { echo "wrong"; }Va multumesc la toti pt interventii. trollerul_de_serviciu, on 28 august 2018 - 09:36, said:
(ehe, nu mai e ce era odata softpedia...) Eram moderator si simteam nevoia de a impartasii cunostintele pe care le-am acumulat. Baga un ochi poate te apuci de lucru https://forum.softpe...hithe-bricolaj/ Edited by adi_master, 28 August 2018 - 13:43. |
#8
Posted 28 August 2018 - 23:07
adi_master, on 28 august 2018 - 13:51, said:
e vb de conceptul de PIN in loc de username si parola,este altceva.Acel cod este(presupun)un cod standard de conectare la DB. PIN-ul e pentru a autentifica ca utilizatorul este cine spune ca este. Nu pentru a te conecta la baza de date. adi_master, on 28 august 2018 - 13:51, said:
Tabela aia banala de care vb tu:user_id, code, redirect_link este exact cea ce vreau insa nu stiu sa o construiec.De aceea imi trebuie o dummy.sql pe care sa o pot importa in DB. - te conectezi la MySQL: mysql -u root -p- creezi baza de date pe care o vei folosi: CREATE DATABASE myTestAppDatabase;- creezi tabelul / tabelele necesare altfel spus ce tabele vrei sa contina baza de date: USE myTestAppDatabase; CREATE TABLE users(id INTEGER NOT NULL AUTOINCREMENT UNIQUE, username STRING(20) NOT NULL UNIQUE, firstName STRING(20) DEFAULT "", lastName STRING(20) DEFAULT "", registeredDate TIMEDATE NOT NULL, url STRING NOT NULL, PRIMARY(id));Dupa cum am spus mai sus, nu sunt de meserie asa ca ceva sigur am gresit in sintaxa de mai sus. Comanda de mai sus, a doua, iti adauga un tabel numit users in baza de date myTestAppDatabase. Tabelul are campurile, id, username, firstName, lastName, registeredDate si url. id este cheie primara in tabel. - adaugi in tabel useri: INSERT INTO users(username, firstName, lastName, registeredDate, url) VALUES ('user1', 'firstName_user1', 'lastName_user1', '2014-02-12', '/gibberish/user1/'); INSERT INTO users(username, firstName, lastName, registeredDate, url) VALUES ('user2', 'firstName_user2', 'lastName_user2', '2014-05-28', '/gibberish/user2/'); INSERT INTO users(username, firstName, lastName, registeredDate, url) VALUES ('user3', 'firstName_user3', 'lastName_user3', '2018-03-13', '/gibberish/user3/'); . . . INSERT INTO users(username, firstName, lastName, registeredDate, url) VALUES ('userN', 'firstName_userN', 'lastName_userN', '2018-08-28', '/gibberish/userN/');- adaugi user-ul care e folosit in mod transparent sa accesezi baza de date: CREATE USER 'superuser_myTestAppDatabase' IDENTIFIED BY 'superuser_myTestAppDatabase_password';- acorzi privilegii user-ului de mai sus asupra bazei de date: GRANT ALL PRIVILEGES ON myTestAppDatabase.* TO 'superuser_myTestAppDatabase'@'localhost'; FLUSH PRIVILEGES; Pentru inceput te intereseaza tot mai putin inserarea in baza de date a utilizatorilor. Inserarea se face din script cand ai un user care se inregistreaza pe site. Dupa ce completeaza umn formular si apasa butonul magic de inregistrare faci verificarile necesare apoi daca este totul okay inserezi in baza de date informatiile folosind comanda de mai sus inlocuind vazlorile din paranteza de dupa VALUES cu variabilele asociate in script. Apoi vezi mai sus bucata de cod postata de CrocodiluMereuVesel ca sa vezi cum te conectezi la baza de date, inlocuind valorile lui cu ale tale. Exemplu: $dbUserName = "superuser_myTestAppDatabase"; $dbPassword = "superuser_myTestAppDatabase_password"; $dbServer = "localhost"; $dbName = "myTestAppDatabase"; $dbTableName = "users"; $querrySQL = "SELECT username, url from " . $dbTableName." WHERE username LIKE '"; mysql_connect($dbServer, $dbUserName, $dbPassword) or die(mysql_error()); mysql_select_db($dbName) or die(mysql_error()); if(array_key_exists("username", $_REQUEST)) { $key = $_REQUEST["username"]; } $result = mysql_query("{$querrySQL}{$key}'") or die(mysql_error()); if(mysql_num_rows($result) > 0) { echo "Authenticating user."; } else { echo "Access denied!"; }Acum partea de PIN / soft token nu stiu sa iti zic cum se face ca nu am experienta cu asa ceva. Ideea este sa verifici ca PIN-ul introdus este valid si este generat de token-ul asociat cu utilizatorul care incearca sa se autentifice. Apoi daca autentificarea se face cu succes redirectionezi user-ul la: http(s)://www.domeniu.tld/$urlE mai bine sa iti raspunda cineva cu experienta in SQL / PHP / devel. Experienta mea cu cele 2, SQL + PHP, e pe la genunchiul broastei. Un noob e de 1000 de ori mai experimentat in ele decat mine. Edited by MembruAnonim, 28 August 2018 - 23:21. |
#9
Posted 29 August 2018 - 08:13
Hehe, ai platit ceva pentru developerul ala roman ?!
Ai dat gres cu unul (roman) si ai platit un strain (maybe?).... da' tot degeaba. Daca vroiai sa platesti din prima, ori plateai roman, lalivrare, ori apelai la vreun site freelance. Cum au spus toti pina acum, ce vrei tu este extrem de simplu pentru cineva care stie nitel PHP. Doar ca tu, pentru ca stii nitica programare (sau asa iti inchipui), complici treaba foarte mult si aiurea. Am mai intilnit destule cazuri din astea: se pricepe careva nitel la vreun domeniu si incearca sa explice el cum vrea facut ceva. Bineinteles, iese ceva foarte complicat, alambicat si intortocheat. In realitate, chestia se rezolva foarte simplu. Si eu am fost moderator odata.... |
Anunturi
▶ 0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users