Quantcast
Channel: ASPRunner forums
Viewing all 2520 articles
Browse latest View live

ASPRunner OneTimePassword

$
0
0
Hi
Can we use ASPRunner with OneTimePassword? Are you planning to add a function for this kind of 2FA?

Reading JSON array and parsing to database

$
0
0
Hi - I have downloaded and read the Euro 2016 example and get that...nearly..

My problem is - how can send a JSON GET request that returns a variable number of arrays...i.e.

{"tracking_info": [{"TrackingEventDate": "01-oct-2016", "TrackingEventDescription": "Delivered", "TrackingEventAdditionalInformation": "SELBY SERVICE CENTRE", "TrackingEventTime": "14:07:01"}, {"TrackingEventDate": "01-oct-2016", "TrackingEventDescription": "Out for delivery", "TrackingEventAdditionalInformation": "SELBY SERVICE CENTRE", "TrackingEventTime": "09:03:00"}, {"TrackingEventDate": "01-oct-2016", "TrackingEventDescription": "Arrived At Depot", "TrackingEventAdditionalInformation": "SELBY SERVICE CENTRE", "TrackingEventTime": "07:00:00"}, {"TrackingEventDate": "30-sep-2016", "TrackingEventDescription": "Departed Depot", "TrackingEventAdditionalInformation": "HATFIELD TERMINAL", "TrackingEventTime": "19:12:56"}, {"TrackingEventDate": "30-sep-2016", "TrackingEventDescription": "Arrived At Depot", "TrackingEventAdditionalInformation": "HATFIELD TERMINAL", "TrackingEventTime": "19:09:45"}, {"TrackingEventDate": "30-sep-2016", "TrackingEventDescription": "Parcel Length Check", "TrackingEventAdditionalInformation": "HATFIELD TERMINAL", "TrackingEventTime": "19:09:44"}, {"TrackingEventDate": "29-Sep-2016", "TrackingEventDescription": "Order Generated", "TrackingEventAdditionalInformation": "NURSERY", "TrackingEventTime": "00:00:00"}, {"TrackingEventDate": "28-sep-2016", "TrackingEventDescription": "Parcel data received awaiting coll.", "TrackingEventAdditionalInformation": "JERSEY C/I SERVICE CENTRE", "TrackingEventTime": "00:00:00"}], "parcel_info": {"inwardPostcode": "9JU", "name": "Mr Chris Brown", "despatch_date": "<type 'datetime.datetime'>", "address1": "46 Chatsworth Crescent", "clientid": "JERSEY PLANTS DIRECT", "logo_link": "#http://www.jerseyplantsdirect.com/", "reference1": "RED003X", "reference2": "7410381", "clientnumber": "101", "outwardPostcode": "DN5", "logo": "./JC_Logo_HR_small.jpg", "postcodefiller_url": "+", "imgurl": "http://tracking.yodel.co.uk/wrd/run/WT_XPOD_IMAGE_PW.getImageRequest2?PclNo=JJD0002251823443285&UserName=9137629&UserPassword=abc123", "description": ""}}

This gives me a Tracking_info array of 8 items - each with four lines in each

But for another search I might have a Tracking_info array of 4 or 2 or even 10?

Any ideas how to approach?

Thanks

[SOLVED] How to change colors for cells on grid and bootstrap

$
0
0
Hi,

Using bootstrap I need to color-code cells in the list views, according to values found.

Using layouts I have it working with the code below on the "List Page: after record processed".


$strTest="";
$strTest=$data["Archive_Status"];
$x="1";

if ($strTest == "Active") {
$record["Archive_Status_style"]=$record["Archive_Status_style"]."style='background:#33cc00 '"; // 'This is GREEN color
}
elseif ($strTest == "Not Being Used") {
$record["Archive_Status_style"]=$record["Archive_Status_style"]."style='background:#ff6600 '"; // 'This is ORANGE color
}
elseif ($strTest == "Banned") {
$record["Archive_Status_style"]=$record["Archive_Status_style"]."style='background:#322f30 '"; // 'This is a BLACK color
}
elseif ($strTest == "Deleted") {
$record["Archive_Status_style"]=$record["Archive_Status_style"]."style='background:#6b5858 '"; // 'This is a darker PURPLE color
}
else {
$record["Archive_Status_style"]=$record["Archive_Status_style"]."style='background:#569fb3 '"; // 'This is BLUE color
}

Been trying to find how to do the same with the bootstrap themes and didnt find any relevant information, exception being this next link that shares how do something similar after an inline edit/add, https://xlinesoft.com/phprunner/docs/how_to_control_inline_add_edit_functionality_from_script.htm.

Using the example in the link above I noticed that it mentions a new object "field", which I didnt see in the layouts, only now on the bootstrap themes. How can I get to this "field" in whatever view, i.e. add/edit/list?

Question:
How do I color code cells on screen using bootstrap? I need that when the page loads, it checks for values and colors individual row cells according to the values found.

PS. I attached an image that shares a working solution using the standard layouts.
Posted Image
Many thanks
Josh

ASPRunnerPro - specify port 587 for authenticated TLS email

$
0
0
This post is with regard to using an external email server to send emails.

In a previous post I see that:

"If you use port 465 TLS encryption will be turned on automatically. If you need to use it with another port you will have modify source or generated files"

My email provider requires TLS with port 587.

Which of the ASPRunnerPro files do I need to modify?

Regards

Roger Way

Blocking access to the login page after three unsuccessful login attempts

$
0
0
Blocking access to the login page after three unsuccessful login attempts

how do do it plz?

Delete image when deleting associated record

$
0
0
I have images stored in folder in one of my tables . I use multiupload 1 file so decode/encode JSON, option to store records. I noticed when I delete more than one record at a time it does not delete the image in the folder just the record. It actually changes the image name and remains. I do this on the list page just by selecting all records on the page say about 100 . Select all and delete . I go to folder and not only are they still there , the names are changed to default names as the source code would do without adding values/pairs to the photo name. delete associated record is checked. I am wondering if I have to decode/encode before delete also as there is a timestamp involved with the image name which I can't see would work. PHPRUNNER 8.0. build 24793


This is what the manual says - "Use the Delete file when associated record is deleted option to make sure that a file will be deleted when associated record is deleted from the database. This option is global and if enabled is applied to all tables and fields."



Any Ideas?

User Password Hash

$
0
0
Hello.

I have a requirement to implement database security in an application where the password is required to be hashed on entry and the application must verify the password hash against the hashed password stored in the database when the user attempts to log in.

What is the best way to implement hashing of the users password on entry and verifying the hash result when the user attempts to log into the application?

Thanks
Ray

Template

$
0
0
Hi I would like to ask you how to add other templates on phprunner, especially template with banner or flash.

thx.

How to

$
0
0
Hi, Plz I need your help how to Create relationship between too tabs ( 1,1) or (1,00) etc....

thx

Looking for a way to check SQL query result

$
0
0
Heiya people. Mind of i ask a bit of your time? Thanks.

Now, i need to check a result of CustomQuery which contain UPDATE command. Is it fail (no record updated), or success?
I think i need some function that will return 'number of affected rows'-like, with the parameter is the CustomQuery result.
I there is a function, it should works in all SQL command passed into CustomQuery, like SELECT, INSERT, DELETE, etc, etc.
Trying to search the forum for such method, still nothing.

By the way, there is such function in PHP which uses MySQL server: mysql_num_rows. I did try this function, which i rename
into db_num_rows (for i see function db_fetch_array which is very similiar with mysql_fetch_array), but this is the respond:

Fatal error: Call to undefined function db_num_rows() in ...

So, any idea? All input is very welcome.

Show data from master table on a Custom Field page

$
0
0

Goal: want to show data from master table on a Custom Field page
Action: insert the code pasted bellow inside PHPRunner, Editor screen, HTML Mode, in a new custom file called home.htm

The code:
<?php 
                       global $dal, $strTableName;
                        if ($_SESSION[$strTableName."_masterkey1"]) {
                            $tblOrders = $dal->Table("Events");
                            $rs = $tblOrders->Query("eventID=".$_SESSION[$strTableName."_masterkey1"],"");
                            
                            if ($data = db_fetch_array($rs)) {
                                echo '<A href="#"></A>
                                    <DIV class="event1 odd">
                                        <A href="#">
                                            <DIV class="event-icon"></DIV>
                                        </A>
                                        <DIV class="event-container">
                                            <A href="#">
                                                <H2 class="event-title">'.$data["Event_Name"].'</H2>
                                                <P class="date">'.$data["Start_Date"].'</P>
                                                <P class="event-desc">'.$data["Event_Description"].'</P>
                                            </A>
                                            <H2 class="event-info">
                                                <A href="#">More information</A>
                                            </H2>
                                        </DIV>
                                    </DIV>';
                            }
                        }
?>

Reaction:
  • The data is not being displayed
  • The php code is appearing in the view as text


////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Where can one see the problem? Here, in this link
Scrolling down to the section 'TODAY IN LAS CRUCES', there's a div with 'Las Cruces Events'. There, you'll see the PHP code showing in the view.


A number of things can go wrong in the code.
To make sure it's ok, one needs to:

A. Make sure all table and field names are correct (case-sensitive).
(they are correct)

B. Make sure that $_SESSION[$strTableName."_masterkey1"] variable is populated.
How do I do it?

Research lead me to this: http://php.net/manual/en/function.empty.php

C. Make sure the query returns data.
Where can this be done using PHPRunner?

How to do it:
Add the following statement there, copy the SQL and execute it manually against your database to see if any data is there and there are no errors:

echo "select * from events where eventID=".$_SESSION[$strTableName."_masterkey1"];



Thanks in advance for all the help reaching the goal
Tiago Peres


PHPRunner Enterprise 9.6

How to populate data into custom php page

$
0
0
Have been looking for day on how to populate data from PHPRunner onto customer php pages.

There is no documentation explaining how to use the data from PHPRunner and load it onto external pages, using the bootstrap styling.

In short, the project is a PHPRunner project where all the admin and logged in users are able to do whatever tasks, this is working fine.

The issue is with the views for the guest users, where those pages are constructed outside PHPRunner and need to load data from PHPRunner onto selected areas of the page.

Have wasted a few days trying to get it work, to no avail. Without any documentation its guess game.

Can anyone send any example where you populated data from PHPRunner onto external pages?

Your response will be highly appreciated.

Database wrappers

$
0
0
Hi, where can I find a list of database wrappers that are available for PHP Runner MySQL statements? To remove quotes/apostrophes etc.

PHPR 8.0 and 9.6 side by side

$
0
0
Hello,

is it possible to install PPHR 8.0 and 9.6 side by side on Win 7 64 bit?

Thanks in advance.

Peter

Multi-step pages: duplicating buttons

$
0
0
What is the easiest way to duplicate the buttons from the LAST page of a multi-step page form so that the save button, etc. are on all pages?

Thanks!

How to auto reload listpage

$
0
0
Is there any better option to reload list page for specific time period , im using this script bellow, is it possible to just reload grid/table part

    <script type="text/javascript">
       setTimeout(function(){
        location = ''
        },30000)
    </script>

Import large number

$
0
0
Hi.

I have a xlsx with a column that store a number, the import works fine, but i have an event BeforeImport like that:

	
$sql = "select * from table where bigvalue = '".$rawvalues["bignumber"]."'";
$rsExistsData = db_query($strData ,$conn);
$data = db_fetch_array($rsExistsData );

if($data){
 do something;
}


but i realized that the select not found nothing, then i did a test setting a message log:
$message = $rawvalues["bignumber"];
return false;

the imported value is 769201650040066 and it is stored correctly but when i get the $rawvalue is 7.6920165004025E+14 and the condition based in the query fails.

My question is how to take the correct value?

Thanks !

PS:I'm using phprunner 8.1

How to disable Sliders in dashboard elements?

$
0
0
Screenshot in Firefox, no sliders in dashboard element

Posted Imagefree upload


Screenshot in Chrome and Opera, there are sliders on each dashboard elements

Posted Imagefree upload


How to disable Sliders in dashboard elements? I want to display dashboards such as in firefox (first screenshot).

Passing value as a parameter from column into Event

$
0
0
HELLO Everyone :)

i am trying to create an email notification event and the email recipient to be captured from the record added ( for example Field/Column name is "STAFF_EMAIL" )


Add page ( After record added ) event
Action : Send Simple email

dim tmpDict
set tmpDict = CreateObject("Scripting.Dictionary")
tmpDict("to")="test@test.com" <---------------------------- need to insert a parameter ( contains Email value ) captured from the new record added
tmpDict("subject")="Sample subject"
tmpDict("body")="Hello there" & vbcrlf & "Best regards"
set attachments = CreateObject("Scripting.Dictionary")
'attachments(0) = getabspath("files/1.jpg")
'attachments(1) = getabspath("files/2.jpg")
set tmpDict("attachments") = attachments
set ret=runner_mail(tmpDict)
if not ret("mailed") then
response.write ret("message")
end if

Passing value as a parameter from column into Event

$
0
0
HELLO Everyone :)


This is a re-post after using a wrong thread section


i am trying to create an email notification event and the email recipient to be captured from the record added ( for example Field/Column name is "STAFF_EMAIL" )


Add page ( After record added ) event
Action : Send Simple email

dim tmpDict
set tmpDict = CreateObject("Scripting.Dictionary")
tmpDict("to")="test@test.com" <---------------------------- need to insert a parameter ( contains Email value ) captured from the new record added
tmpDict("subject")="Sample subject"
tmpDict("body")="Hello there" & vbcrlf & "Best regards"
set attachments = CreateObject("Scripting.Dictionary")
'attachments(0) = getabspath("files/1.jpg")
'attachments(1) = getabspath("files/2.jpg")
set tmpDict("attachments") = attachments
set ret=runner_mail(tmpDict)
if not ret("mailed") then
response.write ret("message")
end if
Viewing all 2520 articles
Browse latest View live