* convert to unix format.

This commit is contained in:
wangchunsheng
2012-02-21 07:22:58 +00:00
parent f1dfdf6ea0
commit 65e19fa8a8
389 changed files with 55211 additions and 55211 deletions
+50 -50
View File
@@ -1,50 +1,50 @@
<?php
/**
* The control file of api of ZenTaoPMS.
*
* @copyright Copyright 2009-2012 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package api
* @version $Id$
* @link http://www.zentao.net
*/
class api extends control
{
/**
* Return session to the client.
*
* @access public
* @return void
*/
public function getSessionID()
{
$this->session->set('rand', mt_rand(0, 10000));
$this->view->sessionName = session_name();
$this->view->sessionID = session_id();
$this->view->rand = $this->session->rand;
$this->display();
}
/**
* Execute a module's model's method, return the result.
*
* @param string $moduleName
* @param string $methodName
* @param string $params param1=value1,param2=value2, don't use & to join them.
* @access public
* @return string
*/
public function getModel($moduleName, $methodName, $params = '')
{
parse_str(str_replace(',', '&', $params), $params);
$module = $this->loadModel($moduleName);
$result = call_user_func_array(array(&$module, $methodName), $params);
if(dao::isError()) die(json_encode(dao::getError()));
$output['status'] = $result ? 'success' : 'fail';
$output['data'] = json_encode($result);
$output['md5'] = md5($output['data']);
$this->output = json_encode($output);
die($this->output);
}
}
<?php
/**
* The control file of api of ZenTaoPMS.
*
* @copyright Copyright 2009-2012 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package api
* @version $Id$
* @link http://www.zentao.net
*/
class api extends control
{
/**
* Return session to the client.
*
* @access public
* @return void
*/
public function getSessionID()
{
$this->session->set('rand', mt_rand(0, 10000));
$this->view->sessionName = session_name();
$this->view->sessionID = session_id();
$this->view->rand = $this->session->rand;
$this->display();
}
/**
* Execute a module's model's method, return the result.
*
* @param string $moduleName
* @param string $methodName
* @param string $params param1=value1,param2=value2, don't use & to join them.
* @access public
* @return string
*/
public function getModel($moduleName, $methodName, $params = '')
{
parse_str(str_replace(',', '&', $params), $params);
$module = $this->loadModel($moduleName);
$result = call_user_func_array(array(&$module, $methodName), $params);
if(dao::isError()) die(json_encode(dao::getError()));
$output['status'] = $result ? 'success' : 'fail';
$output['data'] = json_encode($result);
$output['md5'] = md5($output['data']);
$this->output = json_encode($output);
die($this->output);
}
}
+13 -13
View File
@@ -1,13 +1,13 @@
<?php
/**
* The api module English file of ZenTaoPMS.
*
* @copyright Copyright 2009-2012 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package api
* @version $Id: English.php 824 2010-05-02 15:32:06Z wwccss $
* @link http://www.zentao.net
*/
$lang->api->common = 'API';
$lang->api->getModel = 'Super Model API';
<?php
/**
* The api module English file of ZenTaoPMS.
*
* @copyright Copyright 2009-2012 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package api
* @version $Id: English.php 824 2010-05-02 15:32:06Z wwccss $
* @link http://www.zentao.net
*/
$lang->api->common = 'API';
$lang->api->getModel = 'Super Model API';
+13 -13
View File
@@ -1,13 +1,13 @@
<?php
/**
* The api module zh-cn file of ZenTaoPMS.
*
* @copyright Copyright 2009-2012 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package api
* @version $Id$
* @link http://www.zentao.net
*/
$lang->api->common = 'API接口';
$lang->api->getModel = '超级model调用接口';
<?php
/**
* The api module zh-cn file of ZenTaoPMS.
*
* @copyright Copyright 2009-2012 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package api
* @version $Id$
* @link http://www.zentao.net
*/
$lang->api->common = 'API接口';
$lang->api->getModel = '超级model调用接口';
+13 -13
View File
@@ -1,13 +1,13 @@
<?php
/**
* The api module zh-tw file of ZenTaoPMS.
*
* @copyright Copyright 2009-2012 青島易軟天創網絡科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package api
* @version $Id: zh-tw.php 2568 2012-02-09 06:56:35Z shiyangyangwork@yahoo.cn $
* @link http://www.zentao.net
*/
$lang->api->common = 'API介面';
$lang->api->getModel = '超級model調用介面';
<?php
/**
* The api module zh-tw file of ZenTaoPMS.
*
* @copyright Copyright 2009-2012 青島易軟天創網絡科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package api
* @version $Id: zh-tw.php 2568 2012-02-09 06:56:35Z shiyangyangwork@yahoo.cn $
* @link http://www.zentao.net
*/
$lang->api->common = 'API介面';
$lang->api->getModel = '超級model調用介面';
+15 -15
View File
@@ -1,15 +1,15 @@
<?php
/**
* The model file of api module of ZenTaoCMS.
*
* @copyright Copyright 2009-2012 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package api
* @version $Id$
* @link http://www.zentao.net
*/
class apiModel extends model
{
}
<?php
/**
* The model file of api module of ZenTaoCMS.
*
* @copyright Copyright 2009-2012 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package api
* @version $Id$
* @link http://www.zentao.net
*/
class apiModel extends model
{
}