This topic is locked

Dashboard and calendar template

3/15/2017 4:37:39 AM
PHPRunner General questions
S
Sergej author

Dear all - i have something i am trying to achieve...would like to place calendar monthly list page on Dashboard - and it works fine - but when i add code snippet to have month/year selector - it transfers me from dashboard to regular claendar lisst pag. Is there any way to stay on the dashboard page and from there to see another month
i was using this code
$today = getDatePart( db2time( now() ) );

$days=$_SESSION["days"];

$mon=$_SESSION["mon"];

$yr=$_SESSION["yr"];
$selectDate = array($yr, $mon, $days, 0, 0, 0);

$yr1 = addyears($selectDate,-1);

$yr2 = addyears($selectDate,1);
$mon1 = addmonths($selectDate,-1);

$mon2 = addmonths($selectDate,1);
$todayYearFrom = addyears($today,-10);

$todayYearTo = addyears($today,10);

echo "<div class=calendar_navigation >";

if( $yr1[0] >= $todayYearFrom[0]){

echo "<a href=\"Kalendar_dashboard.php?mon=".$mon1[1]."&yr=".$mon1[0]."\"><img src=\"images/arrow-left.png\" alt=prev></a>&nbsp;";

}

echo "<select id=mselect onchange=\"window.location.href='Kalendar_dashboard.php?mon='+$('#mselect').val()+'&yr='+$('#yselect').val()\">";

for($i=1;$i<=12;$i++)

{

$s="";

if($i==$mon)

$s=" selected";

echo "<option style=\"color:#000;\" value=" . $i . " " . $s . ">" . getMonthNameByNumber ($i, "MMMM") . "</option>";

}

echo "</select>&nbsp;&nbsp;";
echo "<select id=yselect onchange=\"window.location.href='Kalendar_dashboard.php?mon='+$('#mselect').val()+'&yr='+$('#yselect').val()\">";

for($i=$todayYearFrom[0]; $i<=$todayYearTo[0]; $i++ )

{

$s="";

if($i==$yr)

$s=" selected";

echo "<option style=\"color:#000;\" value=" . $i . " " . $s . ">" . $i . "</option>";

}

echo "</select>";
if( $yr2[0] <= $todayYearTo[0]){

echo "&nbsp;<a href=\"Kalendar_dashboard.php?mon=".$mon2[1]."&yr=".$mon2[0]."\"><img src=\"images/arrow-right.png\" alt=next></a>";

}

echo "</div>";
i replaced only links from calmonthly_list.php - to Kalendar_dashboard php - which is the name of my dashboard...i understansd why this is not working but do not know how to access calmonthly_list page part on dashboard if this is possible.

HJB 3/15/2017

https://xlinesoft.com/livedemo/calendar/calmonthly_list.php
While I'm seeing the month/year selector on TOP LEFT, it seems

that the DASHBOARD was done under lower than PHPR v9.7 which owns

NEW features, among others the ability to add code snippets.

S
Sergej author 3/15/2017



https://xlinesoft.com/livedemo/calendar/calmonthly_list.php
While I'm seeing the month/year selector on TOP LEFT, it seems

that the DASHBOARD was done under lower than PHPR v9.7 which owns

NEW features, among others the ability to add code snippets.



Dear walk2fly - the example is regular list page - what i am trying to do is to include that exact page on dashboard an be able to examine the months within the dashboard - for now i managed only to examine current month and apply search on current month display but not on any other month

HJB 3/15/2017



Dear walk2fly - the example is regular list page - what i am trying to do is to include that exact page on dashboard an be able to examine the months within the dashboard - for now i managed only to examine current month and apply search on current month display but not on any other month


Citing ex https://xlinesoft.com/blog/2017/02/12/version-9-7-of-phprunner-asprunnerpro-and-asprunner-net/
2. Code snippets in dashboards
You can insert any sort of code snippet as dashboard element. This can be some code that displays current weather, calculates order totals, displays number of active users or even displays a Youtube video.
unquote
This at least to me practically means, one cannot only display a Youtube video inside the dashboard, but even a full list page named CALENDAR too, right?
View live demo for inspiration under: http://demo.asprunner.net/volinrok_yahoo_com/Version97Demo/Orders_dashboard_dashboard.php