Discussion on PDO Crud – Advanced PHP CRUD application (Form Builder & Database Management)

ddeveloper

ddeveloper supports this item

Supported

600 comments found.

Hi,

Is it possible to run a jquery/javascript inside a callback function? If not, how and where can I set that up? Can you give me an example please?

Hi,

You can run javascript/jQuery based triggers. Please check

http://pdocrud.com/documentation/#!/javascript_trigger

scroll down to javascript triggers section.

Thanks

Yup, found the triggers but where should I set that up?

Hi,

You can add this in your javascript code file. Thanks

Munckie91

Munckie91 Purchased

Hi ddeveloper,

I purchased this script today and have a question regarding the regular license. In an earlier thread I saw your reply to prema770:

“Hi,Yes it is open source and You can use this in as many as project as you want. But if you want to build some product using this script then you need to buy extended licence. Thanks.”

Does this mean that I am allowed to use my single license for multiple website domains, as long as it is free for the website users? If yes, can I just enter the same purchase code in both config.php files?

Thanks in advance for your reply.

Hi,

We are glad you liked it.

1. Yes, we know that there is one entry and we have checked complete code and found no issue. We constantly working on updates and checking code for possible vulnerability. As soon as we find it, we update here. Thanks for pointing out.

2. Yes, we haven’t added required callback functions. Login demo is just to show how code should be used to check login functionality. We will do one thing, we will mention it there also.

Thanks

Munckie91

Munckie91 Purchased

Thanks for your quick reply. Concerning point 1), I knew that the “Pharma Hack” is known for gaining access via Wordpress sites with vulnerable plugins. To help you finding the source I went through all files and checked the pdocrud.com website.

It appears that the source of the hack is a subdomain of the website where you host all demo files: pdocrud.com/wp-pdo-crud. This Wordpress based website contains multiple backdoors via vulnerable Wordpress plugins, and allows it to spread to demo files hosted on the same domain (pdocrud.com).

Even though the PDO CRUD package itself is secure, it will become vulnerable for further spread of this exploit once infected.

I would therefore recommend: 1) shutting down the wp-pdo-crud subdomain, 2) cleaning up the infected files pdocrud.sql and hide-column.php and 3) uploading the new version to CodeCanyon as soon as possible.

Thanks in advance, also on behalf of other users =)

Hi,

Sure, we will do the required things. Thanks for informing us :)

Hello, please i neeed custom <select> in search only 3 cols, not all. it is posible?

thank you Manuel

Hi,

Yes, you can set searchcolumns using setSearchCols function.

Thanks

Hello.

I have found a bug and kindly ask to be fixed. When using enqueueAction like this:

$action = array(“1”=>”0”, “0”=>”1”); $text = array(“1” => “Da”, “0”=>”Ne”); $pdocrud->enqueueActions($action, “switch”, $text, “enabled”, array());

And having option to display edit form in popup:

$pdocrud->formDisplayInPopup();

When clicking on field to change it it will not refresh the main table. Instead it will open a popup and display entire table inside it.

Please confirm this issue and let me know if you need any additional info.

Thank you and nest regards, Andrej

Hi,

Did you have a chance to check this? Can you repeat this bug and can provide a solution to it?

Thank you.

Hi,

can you share complete code as we have checked it and it seems working fine at our end.

Thanks

Hello.

I just sent you a message over profile email option. You can find entire project in shared ZIP together with Slovenian translation.

I kindly ask for you to check. Also opened I have a bug with external link in custom action button. You can find my test in commented lines inside index.php script.

Let me know if you need any other info from me.

Thank you once again.

Andrej

Hello.

If I use showing only specific columns using crudRemoveCol and formRemoveFields like so:

$pdocrud->crudRemoveCol(array("id", "zagnan", "koncan", "velikost", "cas", "bitrate", "ready"));
   $pdocrud->formRemoveFields(array("id", "zagnan", "koncan", "velikost", "cas", "bitrate", "ready"));

Then inlineEdit is not working correctly. They are displayed indented on column to the right. Please check image:

http://shrani.si/f/31/b3/MBEbPgm/2018-02-16-131330-unicas.png

Thank you.

Hello.

I can’t find crudCol() function in documentation:

Call to undefined method PDOCrud::crudCol()

Please be more specific.

Thank you.

I have tried this to show only specific columns in grid:

$pdocrud->crudTableCol(array(“ip”, “naziv”, “screen”, “url”, “enabled”));

And this to show only specific colums in form editor:

$pdocrud->formRemoveFields(array(“id”, “zagnan”, “koncan”, “velikost”, “cas”, “bitrate”, “ready”));

But result is the same. In page source I can see:

...

The second

is extra and not needed. If it helps.

OK. I have fixed this by checking the source. I made mistake of leaving one field out. Now it is OK.

Hello,

I have made Slovenian translation of all strings. As far as I can see, everything is translated expect in dropdown where you can select how many records per page are visible. Text All is not translated:

10 20 50 100 All <-

It should use value all from language string file.

I can send you Slovenian translation if you wish to include in next version.

Thank you and best regards, Andrej

Hi,

I have checked. Search “all” is also added as correctly to translate. It should have worked.

Yes, please send Slovenian translation . We will add with your name in contribute also. Thanks

Not in search all. But in dropdown where you can select how many records to show per page (10, 20, 50, 100 or “All”). Check your function:

public function perPageRecords

There you can find:

array( "All", "All" )

Which is wrong. Correct would be:

array( "All", $this->getLangData("all") )

Please let me know your email so I can send you my Slovenian translation.

Hi,

You can send translation file on email using profile page. Ok. I understand now for “all”, I will do required changes.

Thanks

Hi,

1. I am trying to add custom action button that would open new URL with value from column record of current row (column name “screen”). But I always get only primary key value as parameter (just like in your demo example). My code:

$action = "http://custom_url.com/?screenname={col_name}"; $text = '<i class="fa fa-external-link" aria-hidden="true" />'; $attr = array("title" => "Restart"); $pdocrud->enqueueBtnActions("url", $action, "url", $text, "screen", $attr);

2. If I wish to add two action buttons I need to rename them (first parameter to enqueuBtnActions). But as soon as first parameter name is different than url redirection will not work.

I can see this bugs already being reported without any solution. Or maybe there is a workaround?

Please check and let me know.

Thank you.

Still waiting for any kind of comment regarding this.

Thank you.

Hi,

We will check it today and let you know. Thanks

kaigu

kaigu Purchased

hello, is it possible to Get current Date and Time when a button is clicked and store it in a variable, or maybe just echo it ... example , when i click save button or update button?

Hi,

You need to write callback function or you can use javascript events to achieve it.

Thanks

kaigu

kaigu Purchased

thanks…can you show me an example of how i can use javascript events with pdocrud… i dont seem to find it on the demo

Hi,

http://pdocrud.com/documentation/

Please check javascript triggers. Also, you can call event on button using their class or Id.

Thanks

I installed the wp-pdo crud plugin, and configured it to connect to my database. The resulting table is about 3 web pages wide, is there a way to limit the table to about 95% of the web page, and have the text in the various columns to wrap, if necessary? I don’t see any instructions on how to format the table columns. Thanks.

Thanks for the response. You can see the page here: https://blockchainola.com/index.php/testpage1/ I would like the text in the title, summary and author to wrap, where I could select the column name and set a max-width, and the text would wrap. I’ve been looking at the css, and the class for those columns are .pdocrud-row-column, but I can’t find those definitions anywhere in the .css files. I’m sure it’s not too hard to do this, just don’t want to waste more than a day figuring it out!

Ok, I figured out how to do this… I went into the /wp-pdocrud/script/skin directory, and in the advance.css, I changed the white-space:no-wrap; to the white-space:normal :

.pdocrud-table-container .table tbody tr td { border-right: 1px solid #d5d5d5; white-space: normal; padding: 4px 10px; }

Apparently the td’s were inheriting the no-wrap from the .pdocrud-table-container style.

Hi,

Ok. great. You can also use “read more” feature to show lesser text and on click on “read more” , it will show complete text.

http://pdocrud.com/demo/pages/table-col-more-formatting

Thanks.

codelines

codelines Purchased

I use the following code to retrieve a password: <?php $pdocrud = new PDOCrud(); $message = "Aici aveti noua dvs. parola {password}"; $subject="Parola a fost refacuta cu succes"; $pdocrud->forgotPassword("email","password",array("info@mycompany.ro"),$subject,$message); $pdocrud->setLangData("login", "RECUPERARE PAROLA"); $pdocrud->buttonHide($buttonname="cancel"); echo $pdocrud->dbTable("users")->render("SELECTFORM"); ?> When I click the button on the top page, I display the following: {"message":"Nu sunt inregistrari","error":[],"data":[],"redirectionurl":""} and in the database something odd happens, the code replaces all the pasword fields from all users in the users table with a value “dn8LK5zR&U” – without encrypting with md5. User accounts naturally become all unusable. What am I wrong with? Thank you!
codelines

codelines Purchased

Sorry for completing. Mea culpa. The message that is generated at the top of the page: {"message":"Operatiune efectuata cu succes","error":[],"data":[{"id":"31","username":"vasile@email.com","email":"vasile@email.com","password":"c33367701511b4f6020ec61ded352059","cookie_id":"0","token":"0","userlevel":"1","created":"2018-02-17 20:52:02","lastlogin":"2018-02-17 20:52:02","lastip":null,"newsletter":"1","active":"1"}],"redirectionurl":""} The data displayed are those in the vasile@email.com database. But the script changes all the user data in the users table.

Hi,

I am not sure that I understood your issue as you informed above that it is resolved, can you please explain more.

Thanks

codelines

codelines Purchased

Not resolved. I was mistaken about the message that is displayed at the top of the password recovery page. So, I told you in the database the script changes all the passwords of the enrolled users, which is not good. The code used in the password recovery page is above.

Good morning. I have buy your product. Please, I possible have an example page where all work with your Table? Or possible have a video where I possible see start one project and implementation?

Thank you.

Roberto Infanti

Hi,

Please try to play with demo first. There is folder named demo inside the folder you downloaded. This will explain you correct code. In your code, you have included the pdocrud.php. This must be file directly inside the script folder so it must be require_once(“script/pdocrud.php”);

Please check documentation also.

pdocrud.com/documentation

If you have any more questions, please feel free to ask

Thanks

Hello I ve just bought your PDOCRUD script and I ve got one little pb. I ve got a list of products with an action button that go to a form for adding price for each products. This should work with a dynamic url that use the reference_code of the product selected to populate the reference_code input on the form. But I don’t see in your script how to add this value path into an url and populate a field from a $_GET value. Can you explain a little bit more? regards. Alexandre

Hi,

You can set the dynamic url and retrive that value using $_GET to set value of the form field on another page.

Please check below examples.

http://pdocrud.com/demo/pages/action-buttons

and

http://pdocrud.com/demo/pages/set-field-value

Thanks

Hello , this is what I did, I used the action button parameter. I set the “col name” as parameter like your example but instead of using my col name it show me the number of the row : http://iskalp4.ovh/trade/pages/index the first redirect link should be : /trade/pages/ajout_prix?id=GOOPIX32AR Here is my code : $pdocrud = new PDOCrud(); $action = “ajout_prix?id={Ref produit}”; $text = ‘’; $attr = array(“title”=>”Redirect URL”); $pdocrud->enqueueBtnActions(“url”, $action, “url”,$text,”Ajouter un prix”, $attr); echo $pdocrud->dbTable(“trade_produit”)->render();

Thanks for your answer. Regards. Alexandre

zhathy

zhathy Purchased

Hi ddeveloper,

I use tableColUsingDatasource to populate foreign key references in my main table. It is rendered OK on display but export functions only show the ID, not the referenced value. How could it be done properly, please?

Thanks

zhathy

zhathy Purchased

Sorry, just another quick one: setSearchCols does not seem to work, all fields are still displayed in the dropdown regardless its settings. Could it be fixed, please? Or – alternatively – is there any way search for referenced values in a JOIN-ed table, not IDs? Like when you have a UserID column in your main table which is a foreign key to a User dictionary table from where I display the Login column instead of UserID. However when I search for it, I need to specify the UserID instead of the Login. Is there any way to circumwent it?

Thanks.

bump?

codelines

codelines Purchased

Hi again, How can I add / modify a field whose value should be encrypted with md5 in a table using echo $ pdocrud-> dbTable (“users”) -> render () I mention that I have set a beforelAddUpdate function that I defined: function beforeAddUpdate ($ data, $ obj) {      $ data [“password”] = md5 ($ data [“password”]);      return $ data; }

But it does not work.

codelines

codelines Purchased

I found out how to do it in the documentation provided: http://pdocrud.com/documentation/#!/javascript_trigger

Scroll down to Add callback functions and More callback functiona example. Thank you!

Hi,

The callback function should also work but there are multiple ways to do same thing so great you find your answer. Thanks

Thanks a lot :)

kaigu

kaigu Purchased

hello… i qot a few questions i would like to know..

1. is it possible to create other folder where i can send some uploaded pictures to, (apart from the current upload file)

2. is it possible to use pdo crud in such a way that an admin uploads documents , then a user can only view and download documents like ( pdf, docx ,excel)

http://www.pdocrud.com/demo/pages/action-buttons.php in this example, can i put an altenative button (switch buttons) like this http://www.bootstraptoggle.com/
kaigu

kaigu Purchased

i am getting this kind of error when i try to enter data.

SQLSTATE42000: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘head,`Financial`,`Budget`) VALUES (‘http://localhost/prac/script/uploads/1519197' at line 1

what could be causing the error ?

also, there is this error every time i try to delete an object using pdocrud … a popup appears …(prevent this page from creating additional dialogs )

kaigu

kaigu Purchased

is there an example on how to use $pdocrud->setSearchCols

Hi

Please share your code so that we can check. Thanks

HI, i have an issue with the action buttons, its showing to me the below error : Notice: Undefined index: i in /home/XXXXXX/script/classes/templates/bootstrap/template-table.php

Hi,

It gives this type of error when parameters are not correct. please check your parameters (array data specially).

Thanks

RULLYOKTO

RULLYOKTO Purchased

I have install PHPCrud, but there is error notifitcation on the top of page “Warning: count(): Parameter must be an array or an object that implements Countable “

Can you help me? I use PHP 7.2.2

Hi,

Can you please share your code. It works with php version 7.2.2. So we need to understand your code to check the issue.

Thanks

Hi, where can we write our business logic ? i mean its directly binded with the tables then how can we write our business logic to perform some calculation.

Hi,

There are various functions available to format the data before display, Please check demo. Apart from this you can use callback function to modify data before display in table to apply business logic.

Thanks

Hi, just wondering if there is any feature that we can actually keep the table status after we search for some value?

For example, I have acc1, acc2 ,acc3 and my data on the screen is having WHERE account = acc1 before I search for something, but the script will ignore the WHERE statement after I search for something.

Hi,

This issue is already resolved. Please use the latest version of script. Thanks

by
by
by
by
by
by