[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7382]
From: |
Erik Holm-Larsen |
Subject: |
[Fmsystem-commits] [7382] |
Date: |
Thu, 16 Jun 2011 06:27:20 +0000 |
Revision: 7382
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7382
Author: erikhl
Date: 2011-06-16 06:27:19 +0000 (Thu, 16 Jun 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php
trunk/activitycalendarfrontend/index.php
Added Paths:
-----------
trunk/activitycalendarfrontend/templates/base/activity_tmp.xml
Modified: trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php
===================================================================
--- trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php 2011-06-15
13:20:45 UTC (rev 7381)
+++ trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php 2011-06-16
06:27:19 UTC (rev 7382)
@@ -42,6 +42,7 @@
$GLOBALS['phpgw_info']['flags']['noframework'] = true;
$this->render('activity.php', $data);
+ //self::render_template('activity_tmp',
array('activity' => $activity, 'frontend'=>'true'));
}
function edit()
Modified: trunk/activitycalendarfrontend/index.php
===================================================================
--- trunk/activitycalendarfrontend/index.php 2011-06-15 13:20:45 UTC (rev
7381)
+++ trunk/activitycalendarfrontend/index.php 2011-06-16 06:27:19 UTC (rev
7382)
@@ -2,9 +2,80 @@
$GLOBALS['phpgw_info']['flags'] = array(
'noheader' => true,
'nonavbar' => true,
- 'currentapp' => 'activitycalendarfrontend'
+ 'currentapp' => 'login'
);
+
+ $GLOBALS['phpgw_info']['flags']['session_name'] =
'activitycalendarfrontendsession';
+ //$GLOBALS['phpgw_remote_user_fallback'] = 'sql';
+ include_once('../header.inc.php');
- include_once('../header.inc.php');
+ // Make sure we're always logged in
+ if (!phpgw::get_var(session_name()) ||
!$GLOBALS['phpgw']->session->verify())
+ {
+ $login = "bookingguest";
+ $passwd = "bkbooking";
+ $_POST['submitit'] = "";
- $GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction' =>
'activitycalendarfrontend.uiactivity.index'));
+ $GLOBALS['sessionid'] =
$GLOBALS['phpgw']->session->create($login, $passwd);
+ if(!$GLOBALS['sessionid'])
+ {
+ $lang_denied = lang('Anonymous access not correctly
configured');
+ if($GLOBALS['phpgw']->session->reason)
+ {
+ $lang_denied =
$GLOBALS['phpgw']->session->reason;
+ }
+ echo <<<HTML
+ <div class="error">$lang_denied</div>
+HTML;
+ $GLOBALS['phpgw']->common->phpgw_exit(True);
+ }
+ }
+ $GLOBALS['phpgw_info']['flags']['currentapp'] =
'activitycalendarfrontend';
+ $GLOBALS['phpgw_info']['flags']['noframework'] = true;
+
+ if (isset($_GET['menuaction']))
+ {
+ //list($app,$class,$method) = explode('.',$_GET['menuaction']);
+ $GLOBALS['phpgw']->redirect_link('/index.php',$_GET);
+ }
+ else
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction' =>
'activitycalendarfrontend.uiactivity.index'));
+ //$app = 'activitycalendarfrontend';
+ //$class = 'uiactivity';
+ //$method = 'index';
+ }
+ /*
+ $GLOBALS[$class] = CreateObject("{$app}.{$class}");
+
+ $invalid_data = false; //FIXME consider whether this should be computed
as in the main index.php
+ if ( !$invalid_data
+ && is_object($GLOBALS[$class])
+ && isset($GLOBALS[$class]->public_functions)
+ && is_array($GLOBALS[$class]->public_functions)
+ && isset($GLOBALS[$class]->public_functions[$method])
+ && $GLOBALS[$class]->public_functions[$method] )
+
+ {
+ if ( phpgw::get_var('X-Requested-With', 'string', 'SERVER') ==
'XMLHttpRequest'
+ // deprecated
+ || phpgw::get_var('phpgw_return_as', 'string', 'GET')
== 'json' )
+ {
+ // comply with RFC 4627
+ header('Content-Type: application/json');
+ $return_data = $GLOBALS[$class]->$method();
+ echo json_encode($return_data);
+ $GLOBALS['phpgw_info']['flags']['nofooter'] = true;
+ $GLOBALS['phpgw']->common->phpgw_exit();
+ }
+ else
+ {
+ $GLOBALS[$class]->$method();
+ $GLOBALS['phpgw']->common->phpgw_footer();
+ }
+ }*/
+
+
+// include_once('../header.inc.php');
+
+
Added: trunk/activitycalendarfrontend/templates/base/activity_tmp.xml
===================================================================
--- trunk/activitycalendarfrontend/templates/base/activity_tmp.xml
(rev 0)
+++ trunk/activitycalendarfrontend/templates/base/activity_tmp.xml
2011-06-16 06:27:19 UTC (rev 7382)
@@ -0,0 +1,9 @@
+<xsl:template match="activity" xmlns:php="http://php.net/xsl">
+tester
+</xsl:template>
+
+<xsl:template match="contract">
+ <xsl:copy-of select="."/>
+
+</xsl:template>
+
Property changes on:
trunk/activitycalendarfrontend/templates/base/activity_tmp.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7382],
Erik Holm-Larsen <=