mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
issue 2662 widgets
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12261 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5219a360c6
commit
4d8733156b
5 changed files with 1810 additions and 1600 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -1,41 +1,42 @@
|
|||
<?php
|
||||
/**
|
||||
* @class counter_status
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @version 0.1
|
||||
* @brief Display counter status by using data in the counter module
|
||||
**/
|
||||
/**
|
||||
* @class counter_status
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @version 0.1
|
||||
* @brief Display counter status by using data in the counter module
|
||||
*/
|
||||
class counter_status extends WidgetHandler
|
||||
{
|
||||
/**
|
||||
* @brief Widget execution
|
||||
* Get extra_vars declared in ./widgets/widget/conf/info.xml as arguments
|
||||
* After generating the result, do not print but return it.
|
||||
*/
|
||||
function proc($args)
|
||||
{
|
||||
// Get status of the accumulated, yesterday's, today's counts
|
||||
$oCounterModel = &getModel('counter');
|
||||
|
||||
class counter_status extends WidgetHandler {
|
||||
|
||||
/**
|
||||
* @brief Widget execution
|
||||
* Get extra_vars declared in ./widgets/widget/conf/info.xml as arguments
|
||||
* After generating the result, do not print but return it.
|
||||
**/
|
||||
function proc($args) {
|
||||
// Get status of the accumulated, yesterday's, today's counts
|
||||
$oCounterModel = &getModel('counter');
|
||||
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$output = $oCounterModel->getStatus(array('00000000', date('Ymd', time()-60*60*24), date('Ymd')), $site_module_info->site_srl);
|
||||
if(count($output))
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$output = $oCounterModel->getStatus(array('00000000', date('Ymd', time()-60*60*24), date('Ymd')), $site_module_info->site_srl);
|
||||
if(count($output))
|
||||
{
|
||||
foreach($output as $key => $val)
|
||||
{
|
||||
foreach($output as $key => $val)
|
||||
{
|
||||
if(!$key) Context::set('total_counter', $val);
|
||||
elseif($key == date("Ymd")) Context::set('today_counter', $val);
|
||||
else Context::set('yesterday_counter', $val);
|
||||
}
|
||||
if(!$key) Context::set('total_counter', $val);
|
||||
elseif($key == date("Ymd")) Context::set('today_counter', $val);
|
||||
else Context::set('yesterday_counter', $val);
|
||||
}
|
||||
// Set a path of the template skin (values of skin, colorset settings)
|
||||
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
||||
Context::set('colorset', $args->colorset);
|
||||
// Specify a template file
|
||||
$tpl_file = 'counter_status';
|
||||
// Compile a template
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
}
|
||||
?>
|
||||
}
|
||||
// Set a path of the template skin (values of skin, colorset settings)
|
||||
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
||||
Context::set('colorset', $args->colorset);
|
||||
// Specify a template file
|
||||
$tpl_file = 'counter_status';
|
||||
// Compile a template
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
}
|
||||
/* End of file counter_status.class.php */
|
||||
/* Location: ./widgets/counter_status/counter_status.class.php */
|
||||
|
|
|
|||
|
|
@ -1,29 +1,30 @@
|
|||
<?php
|
||||
/**
|
||||
* @class language_select
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief Language selector
|
||||
* @version 0.1
|
||||
**/
|
||||
/**
|
||||
* @class language_select
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief Language selector
|
||||
* @version 0.1
|
||||
*/
|
||||
class language_select extends WidgetHandler
|
||||
{
|
||||
/**
|
||||
* @brief Widget execution
|
||||
*
|
||||
* Get extra_vars declared in ./widgets/widget/conf/info.xml as arguments
|
||||
* After generating the result, do not print but return it.
|
||||
*/
|
||||
function proc($args)
|
||||
{
|
||||
// Set a path of the template skin (values of skin, colorset settings)
|
||||
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
||||
$tpl_file = 'language_select';
|
||||
|
||||
class language_select extends WidgetHandler {
|
||||
Context::set('colorset', $args->colorset);
|
||||
|
||||
/**
|
||||
* @brief Widget execution
|
||||
*
|
||||
* Get extra_vars declared in ./widgets/widget/conf/info.xml as arguments
|
||||
* After generating the result, do not print but return it.
|
||||
**/
|
||||
function proc($args) {
|
||||
// Set a path of the template skin (values of skin, colorset settings)
|
||||
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
||||
$tpl_file = 'language_select';
|
||||
|
||||
Context::set('colorset', $args->colorset);
|
||||
|
||||
// Compile a template
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
}
|
||||
?>
|
||||
// Compile a template
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
}
|
||||
/* End of file language_select.class.php */
|
||||
/* Location: ./widgets/language_select/language_select.class.php */
|
||||
|
|
|
|||
|
|
@ -1,46 +1,45 @@
|
|||
<?php
|
||||
/**
|
||||
* @class login_info
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @version 0.1
|
||||
* @brief Widget to display log-in form
|
||||
*
|
||||
* $Pre-configured by using $logged_info
|
||||
**/
|
||||
/**
|
||||
* @class login_info
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @version 0.1
|
||||
* @brief Widget to display log-in form
|
||||
*
|
||||
* $Pre-configured by using $logged_info
|
||||
*/
|
||||
class login_info extends WidgetHandler
|
||||
{
|
||||
/**
|
||||
* @brief Widget execution
|
||||
* Get extra_vars declared in ./widgets/widget/conf/info.xml as arguments
|
||||
* After generating the result, do not print but return it.
|
||||
*/
|
||||
function proc($args)
|
||||
{
|
||||
// Set a path of the template skin (values of skin, colorset settings)
|
||||
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
||||
Context::set('colorset', $args->colorset);
|
||||
// Specify a template file
|
||||
if(Context::get('is_logged')) $tpl_file = 'login_info';
|
||||
else $tpl_file = 'login_form';
|
||||
// Get the member configuration
|
||||
$oModuleModel = &getModel('module');
|
||||
$this->member_config = $oModuleModel->getModuleConfig('member');
|
||||
Context::set('member_config', $this->member_config);
|
||||
|
||||
class login_info extends WidgetHandler {
|
||||
// Set a flag to check if the https connection is made when using SSL and create https url
|
||||
$ssl_mode = false;
|
||||
$useSsl = Context::getSslStatus();
|
||||
if($useSsl != 'none')
|
||||
{
|
||||
if(preg_match('/^https:\/\//i', Context::getRequestUri())) $ssl_mode = true;
|
||||
}
|
||||
Context::set('ssl_mode',$ssl_mode);
|
||||
|
||||
/**
|
||||
* @brief Widget execution
|
||||
* Get extra_vars declared in ./widgets/widget/conf/info.xml as arguments
|
||||
* After generating the result, do not print but return it.
|
||||
**/
|
||||
function proc($args) {
|
||||
// Set a path of the template skin (values of skin, colorset settings)
|
||||
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
||||
Context::set('colorset', $args->colorset);
|
||||
// Specify a template file
|
||||
if(Context::get('is_logged')) $tpl_file = 'login_info';
|
||||
else $tpl_file = 'login_form';
|
||||
// Get the member configuration
|
||||
$oModuleModel = &getModel('module');
|
||||
$this->member_config = $oModuleModel->getModuleConfig('member');
|
||||
Context::set('member_config', $this->member_config);
|
||||
|
||||
// Set a flag to check if the https connection is made when using SSL and create https url
|
||||
$ssl_mode = false;
|
||||
$useSsl = Context::getSslStatus();
|
||||
if($useSsl != 'none')
|
||||
{
|
||||
if(preg_match('/^https:\/\//i', Context::getRequestUri())) $ssl_mode = true;
|
||||
}
|
||||
Context::set('ssl_mode',$ssl_mode);
|
||||
|
||||
// Compile a template
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
// Compile a template
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
}
|
||||
/* End of file login_info.class.php */
|
||||
/* Location: ./widgets/login_info/login_info.class.php */
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue