passing values to a custom script in wordpress via url - wordpress

I m customizing cforms plugin in wordpress and i have added a report that fetch all records from database and display them in a table. This is how reports link look like.
http://localhost/er/wp-admin/admin.php?page=cforms/cforms-report.php
Now i want to make a link for each record in each row to delete a record. for this i have passed record's id to my script like this.
http://localhost/er/wp-admin/admin.php?page=cforms/cforms-report.php?id=12
Also tried this
http://localhost/er/wp-admin/admin.php?page=cforms/cforms-report.php/12
in both cases i get this on clicking delete link.
You do not have sufficient permissions to access this page.
Kindly tell me how can i GET values in my script from url.
Thanks

anyone looking forward to this kind of silly question can get help from this answer lols.. all you have to do is
http://localhost/er/wp-admin/admin.php?page=cforms/cforms-report.php&id=12
and you can get id in your script.. This was a very basic mistake and i could not figure out for hours.

Related

Index Specific entry located in connected database [IDOL Indexing server]

I have a problem. I have a database and the entries of it, indexes at a specific time in IDOL indexing server. The problem is that a speficic entry has not been indexed for reason. Is there any way to force index it? Ideally, for a URL action call. I know that DREREGENERATE may be what I want but I don't understand how to specify my entry ID.
Any ideas?
Thanks in advance.
Manually create the IDX for the entry and use DREADD action to add the entry to the IDOL content DB. Easily achievable using a python script and HTTP Post.
The following document shows the various parameters which can be used in DREADD action.
https://www.microfocus.com/documentation/idol/IDOL_12_2/Content_12.2_Documentation/Help/index.html#Index%20Actions/IndexData/_IX_DREADD.htm?Highlight=DREADD

Drupal Commerce order admin page, order id

I'm building a commerce site using Drupal Commerce. I've got it going very smoothly now but I've hit a dead end when I'm trying to create a module for handling shipping information and sending it to the shipping company for label printing.
The problem is, that I have created a new tab in an Order page,
admin/commerce/orders/order_id/printlabel
and I can access this page via a tab when I edit an order.
Now, I have no idea how I can pull the order_id number in the module. I have tried almost everything, entity_view, entity_metadata_wrapper, commerce_order.module API, but I have no idea how I can access the id and that is the key. When I get the ID, I can get the shipping information linked to it and I can send this data to the shipping company and save it.I also looked into the ways Commerce does things like combine Payment with Views but it seemed a bit too complicated for me to try so, I'm asking here. I can't get any answers on Drupal's own support forums.
Hope i got your question right.You created a custom menu admin/commerce/orders/*/printlabel where * is the order id of a particular order. You need the order id.
The simplest solution to it is getting it through the arguments or arg(). This is a function that drupal provides to get data from the arguments. For eg
if your url is www.xyz.com/admin/commerce/orders/0001/printlabel & you need order id i.e 0001 you can get it using arg(3).

Wordpress deleted file info "UPDATE wp_options SET option_value"

I am working on a forensics course, with which I have been looking into an attack on a blog server. I have found a number of deleted Wordpress files, and I have managed to figure out which ones contained blog posts.
The one file I cannot figure out contains information beginning with the following:
wordpress#UPDATE wp_options SET option_value = 'O:9:\"MagpieRSS\":19:{s:6:\"parser\";i:0;s:12:\"current_item\";a:0:{}s:5:\"items\";a:10:{i:0;a:9:{s:5:\"title\";s:37:\"India Vs Pakistan: Now Cyber Terror? \";s:6:\"author\";s:8:\"chinchak\";s:4:\"link\";s:59:\"http://feeds09.technorati.com/~r/trarticles/~3/sxlCqi2M9aE/\";s:4:\"guid\";s:74:\"http://technorati.com/politics/article/india-vs-pakistan-now-cyber-terror/\";s:11:\"description\";s:182:\"The India-Pakistan relations could very well be termed the greatest mystery ever of mankind.\";s:7:\"pubdate\";s:31:\"Tue, 21 Aug 2012 00:03:41 +0000\";s:8:\"category\";s:51:\"PoliticsAssam ViolenceCyber TerrorIndia Vs Pakistan\";s:10:\"feedburner\";a:1:{s:8:\"origlink\";s:74:\"http://technorati.com/politics/article/india-vs-pakistan-now-cyber-terror/\";}
It continues in this way for a while, but I haven't had too much luck trying to use Google to tell me what the "wp_options" means. It looks like someone was trying to spam the blog with commments but I can't be sure without a source which can confirm my view is correct. Can anybody help please?
The wp_option table stores key-value information in the columns option_name and option_value. When storing arrays they get serialized, to decode them you can use PHP's unserialize function. It looks like you're dealing with an SQL injection that tries to mess with Wordpress' user options. The purpose is not obvious, because they are rarely displayed. Just used internally. If there's a where clause somewhere in that SQL statement that tells you which option name it's trying to edit you could perhaps match it using this list:
http://codex.wordpress.org/Option_Reference

Beginning ASP.NET. using login name as sql parameter

Does anyone have some code or a link as to how to create the user login name as a parameter during a sql query in ASP.NET?
Basically I want to use the default membership structure with a new field ClubID, then I want to add a new table called aspnet_Clubs which contains things such as Club Name, stadium name, Balance etc etc... and then use a relationship between ClubID and a field in the aspnet_Clubs table to tie things together.
Then when each user logs in they should see the clubs information specific to their loginID.
I know the syntax to use for the query, its getting the loginname parameter and being able to use/assign it as part of the search that is causing me the problem.
In general it is not recommended to break the default schema of the aspnetdb where the Membership data is stored. It can bring you to unexpected consequences in the future.
I had a similar question a couple of days ago, please check it here, may be you will be able to adopt something from the discussion to your situation.

Search function in c#

I am trying to create a search page which searches the user given input against the meta data in the html files and shows the results accordingly, in short a simple search via metadata.
So far i have succeeded in getting the meta tags of the files. but unable to think any further how to get the relative comparison of the user given string and the meta data and sort the links according to the highest relevancy.
Any help would be great. Thanks in advance
Create search engine for site in asp .net c#

Resources