Php binary Tree In Mlm Software - mlm

Iam developing Mlm Software in Procedural Php-7,Now Strucked With Generation Of Bianary Tree (Parent,Left And Right Children Nodes).So Please Help Me,
I Have An Admin With Username 10000 So Admin May Add New Users And Every User Can Add Many Sub Users So That I Need To Construct genealogy Tree .
I Have Database Table Structre Like This
[Table Structure]
And I need To Generate Tree Like This

If you were using LARAVEL there's a package you can use.
https://github.com/lazychaser/laravel-nestedset
And a video to describe the use
https://youtu.be/9PEjGW2EvRI
I'm also building an mlm site the problem I have is how to visualize the binary tree

Related

Best way to save objects in database

The Story:
I’m trying to develop a big application in PHP. The main problem is that I have to deal with the objects and I need to apply CRUD operations. Ex: Suppose we have class diagram (Compiler):
Project { name:string, statements:list …}
Statement{ type:string }
IfStatement exend Statement { condition:Exp, …}
…
The question (What is the best design for ERD or database)
as I know I’ve two solutions:
Serialize the main object and save it in the DB
Make a table for each class in the class diagram and linking by foreign keys
Note: I’ve read about ORM but I think it’s similar to 1st solution
Serializing your objects in your database is in my opinion not a good solution.
You must be able to find and edit each object properties in your database.
It requires a simple logic structure, with relations and keys.
This way you'll be able to build a CRUD Admin Dashboard, read and edit all your data in a logical and reliable way.
MySQL Workbench is a real good starting point, it communicates with PhpMyAdmin, you can use it to build your database and create shemas.
Then if you're looking for a professional CRUD Generator I suggest this one: https://www.phpcrudgenerator.com/
[Disclaimer: I'm the author]
It can build your CRUD admin dashboard in a very simple way within a few minutes, and comes with many advanced features.
The Admin dashboard generated by the CRUD Generator is powered with Bootstrap 4, jQuery, PHP objects and TWIG templates.

Need to Create Form that saves data to DB and PDF to a directory

The title says it all. I need to create a form that the user fills in and on submit, I want the data to go to a database and a PDF to a directory on the server.
I don't think AngularJS can do all of these things, can it? I'm very new to programming -- trying to crossover from HTML/CSS/JS to more in-depth projects.
Can anyone please suggest the best course for this? What language for the form, writing to the DB and generating a PDF? I can do the rest of the research and build it out once I have some direction.
How would you go about achieving this?
Thanks!
Ugh. I forgot to mention that PHP is not an option. Is there another way?
All you need is to apply the paradigm Client / Server.
With angular.js you can build the client software for handling the form but this is not necessary...
With a single script php you can generate the page with the form and handling the incoming data.
You can use a standard relational database like mysql for storing it and, about the pdf, take a look here

How to integrate a PACS server (DCM4CHE) with personal database

Hi i am a newbie to programming. I have 100 or so CT scans stored on a PACS (dcm4che). I am trying to link all patients to a teaching file database (simple django application) which will have teaching points on each case. Can someone direct me to a tutorial or a brief direction to what sort of programming will integrate the two? i do realise the generic nature of the question. I have 20 days to work on this so am willing to start from scratch
Thanks
I would recommend against anything specific as diving into dcm4che. Instead if you would like to use standard API, you should use the QIDO-RS/WADO API provided by dcm4chee.
One of the main author did also document how to install such instance here
I would suggest to bind yiur django app or project to the appropriate dcm4chee databese. Since you have all priviliges just create a new table within dcm4chee database which has a simple foreign key column named SOPinstanceUid. In this column you just store the SOPinstanceUId of your preferred images. Then of course you can additionally provide all columns you need for your teaching problem.
You can of course also create a seperate database and bind your django app to both databases and use the SOPInstance uid also as main key to establish the relationship between dcm4chee db and teaching db.
Within your django app you can then of course manage your teaching table or db and query the filenames of the images which you have selected for teaching.The key of this relationship is the SOPInstanceUID of the dicom image.
This approach just needs some expertise in SQL, some knowledge of the preconfigured database and of course django and DICOM.

Drupal working with external db

Hi i want to build up a site which is connected to external db.
This data store around 10000 products (ex. toys and each toy have few attributes). I am able to implement it to module how ever what would be the best direction to go ?
My thought was to build custom node module which will create node for each position but this give me plant of nodes. ( I never had chance to deal with bigger db)
What would be better solution?
Thanks for all ideas.
Your choice is to use Migrate module. With this module you can extend the custom module, to convert all the 10,000 Data in to nodes in Drupal system.
Trust me Migrate can handle more than 10,000 data. Actually it is not a Bigger DB.

1 data, many applications

I have a forum with >400 registered users. It's powered by vBulletin-4.0.4. I want to build up several websites with kohana-3.1, but keep existing forum users too. I will use seperate databases for each application (I want to keep apps as independent as possible).
So my solution is:
step 1. create special app users.mydomain.com where each user can register and update their details (birthdate/email/password). This app will catch all changes and write them to forum database and application databases.
step 2. modify default auth module to handle forum authentication. vBulletin uses algorithm: $hash=MD5(MD5($password)+$salt) for pass hashing.
Am I in the right direction? Is it OK?
Someone has already done this: Kohana vBulletin Bridge. You will need to contact the author of the module as the source code is no longer online. It wont be too difficult to upgrade it to 3 if you get it.
I haven't used vBulletin so I can't give you much advice on the subject, but you're right about the hashing algorithm. You'll also need to make sure your session is read and written as they are in vBulletin.
A quick search of vBulletin SSO to get you started.

Resources