本文整理汇总了PHP中Doo::loadClass方法的典型用法代码示例。如果您正苦于以下问题:PHP Doo::loadClass方法的具体用法?PHP Doo::loadClass怎么用?PHP Doo::loadClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doo
的用法示例。
在下文中一共展示了Doo::loadClass方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: flexi
public function flexi()
{
Doo::loadClass('SDPAPI');
Doo::loadClass('User');
$this->sdapi = new SDPAPI();
$this->dbuser = new User();
$xml = new SimpleXMLElement($HTTP_RAW_POST_DATA);
$type = $xml->sms['type'];
$sender = $xml->sms->source->address->number;
$receiver = $xml->sms->destination->address->number;
$incoming = html_entity_decode($xml->sms->ud);
//body message
$generater_voucher = md5($sender + time());
$generator_voucher = substr($generater_voucher, strlen($generater_voucher) - 5, 5);
$dataIn = array('sender' => $sender, 'receiver' => $receiver, 'incoming' => $incoming, 'type' => $type);
$this->dbuser->set_flexi_log('in', json_encode($dataIn));
switch (strtolower($incoming)) {
case 'free':
$sid = 'SDPCHG000';
$desc = 'Registrasi';
$pass = md5($sender);
$password = substr($pass, strlen($pass) - 5, 5);
$msg = "Login anda {$sender} dan password {$password}, anda dapat mengganti password melalui website useetv.com";
break;
case 'svodtest':
case 'ppv':
$sid = 'SDPCHG035';
if ($incoming == 'ppvtest') {
$sid = 'SDPCHG000';
}
$desc = 'Pembelian paket ppv';
$msg = "Kode voucher anda adalah {$generator_voucher} berlaku 2 hari setelah diaktifkan";
break;
case 'svodtest':
case 'svod':
$sid = 'SDPCHG100';
if ($incoming == 'svodtest') {
$sid = 'SDPCHG000';
}
$desc = 'Pembelian paket svod';
$msg = "Kode voucher anda adalah {$generator_voucher} berlaku 30 hari setelah diaktifkan";
break;
case 'promotest':
case 'promo':
$sid = 'SDPCHG035';
if ($incoming == 'promotest') {
$sid = 'SDPCHG000';
}
$desc = 'Pembelian paket promo';
$msg = "Kode voucher anda adalah {$generator_voucher} berlaku 30 hari setelah diaktifkan";
break;
default:
$sid = 'SDPCHG000';
break;
}
$dataOut = array('sender' => $sender, 'receiver' => $receiver, 'incoming' => $incoming, 'type' => $type, 'sid' => $sid, 'desc' => $desc, 'msg' => $msg);
$this->sdapi->sendsms($sender, $sid, $msg, $desc);
$this->dbuser->set_flexi_log('out', json_encode($dataOut));
//var_dump($xml);
}
示例2: get_token
function get_token()
{
Doo::loadClass('Tsel');
$tsel = new Tsel();
if (isset($_GET['debug'])) {
if ($_GET['debug'] == "token") {
echo $this->token_url;
}
}
$token = @file_get_contents($this->token_url);
$out = array('result' => false, 'token' => $token, 'msg' => 'token failed');
if ($token != '-1') {
$out = array('result' => true, 'token' => $token, 'msg' => 'success');
$param = array('ip_addr' => $_GET['ip_addr'], 'clip_code' => $_GET['clip_code'], 'content_code' => $_GET['content_code'], 'programid' => $this->programid, 'vod_id' => $_GET['vod_id'], 'content_id' => $_GET['content_id'], 'zte' => $_GET['zte'], 'fp' => $_GET['fp']);
$data = array('token' => $token, 'param' => json_encode($param));
$tsel->set_token($data);
}
if (isset($_GET['zte'])) {
if ($_GET['zte'] == "1") {
echo $token;
}
} else {
echo json_encode($out);
}
exit;
}
示例3: ulogin
public function ulogin()
{
Doo::loadClass('General');
$ulib = new General();
$dbapi = $this->dbapi;
$data = $this->conf_data;
$data['limit'] = $this->limit;
$start = $this->start;
$start_date = $this->start_date;
$end_date = $this->end_date;
$gsearch = $this->gsearch;
$data['gdtto'] = $this->gdtto;
$data['gdtform'] = $this->gdtform;
$data['u_region'] = $ulib->getRegion();
//var_dump($data['u_region']);
if ($_GET['userProvider']) {
$qutype = " AND user_id in (SELECT user_id FROM ioss_cs_subscriber WHERE type = '" . (int) $_GET['userProvider'] . "')";
if ($_REQUEST['speedyRegional']) {
$tempSpeedyReg = explode(';', $_REQUEST['speedyRegional']);
$impSpeedyReg = implode("','", $tempSpeedyReg);
$qutype = " AND user_id in (SELECT user_id FROM ioss_cs_subscriber WHERE id in (SELECT subscriber_id FROM ott_business_account WHERE left( bill_account,2) in ('{$impSpeedyReg}') AND bill_account_type=1 ))";
if ($_REQUEST['speedySubRegional']) {
$qregional = " AND user_id in (SELECT user_id FROM ioss_cs_subscriber WHERE id in (SELECT subscriber_id FROM ott_business_account WHERE left( bill_account,5) in ('{$_REQUEST['speedySubRegional']}') AND bill_account_type=1 )) ";
}
}
}
if ($gsearch) {
$qsearch = " AND ( user_id LIKE '%{$gsearch}%' ) ";
}
$qfilter = " AND unix_timestamp(created_time) >= " . strtotime($start_date) . " AND unix_timestamp(created_time) <= " . strtotime($end_date) . " ";
$qwhere = "1=1 {$qsearch} {$qfilter} {$qutype} ";
$data['content_data'] = $dbapi->get_user_login('user_id, created_time', $qwhere, $start, $data['limit']);
$data['total'] = $dbapi->get_total_from_query_aaa2();
if ($_REQUEST['print'] == 'excel') {
DooTextHelper::download_send_headers('users_login_' . date("Ymd") . ".csv");
echo DooTextHelper::array2csv($data['content_data']);
exit;
}
$data['graph'] = $dbapi->get_graph_login($_GET['userProvider'], $_REQUEST['speedyRegional'], $_REQUEST['speedySubRegional'], $start_date, $end_date);
$data['filter_action'] = 'user/login';
$data['content_view'] = 'content/list_user_login.php';
$data['table_row_option'] = array(20, 100, 500, 1000, 10000);
$data['label'] = 'Login';
$this->view()->renderc(Doo::conf()->language . '/t3', $data);
}
示例4: _down
public function _down()
{
$dir = Lua::get('dir');
$path = $this->cache . $dir . '/';
if (file_exists($path)) {
$zipname = $path . $dir . '.zip';
if (!file_exists($zipname)) {
Doo::loadClass('Zip');
new Zip($path, $zipname);
}
header('Content-type: application/octet-stream');
header('Content-Length: ' . filesize($zipname));
header("Content-Disposition: attachment; filename={$dir}.zip");
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
ob_clean();
flush();
readfile($zipname);
unlink($zipname);
}
}
示例5: devices
function devices()
{
$this->init();
$data = $this->conf_data;
/* $this->conf_data['css'] = array('index.css','ui-lightness/jquery-ui-1.8.21.custom.css');
$this->conf_data['js'] = array('common.js','jquery.min.js','jquery-ui-1.8.21.custom.min.js','raphael-min.js','popup.js','analytics2.js');
$this->conf_data['content_view'] = 'content/devices.php';
$data = $this->conf_data;
Doo::loadClass('Movie');
$mv = new Movie();
$data['content_data_graph'] = $mv->get_devices_graph();
$data['content_data'] = $mv->get_devices(); */
$data['title'] = 'UseeTV - Devices';
$data['content_view'] = 'content/new_devices.php';
if (!$this->start) {
$this->start = 0;
}
$data['limit'] = $this->limit;
$data['gdtto'] = $this->gdtto;
$data['gdtform'] = $this->gdtform;
Doo::loadClass('GA');
$ga = new GA();
$data['content_data'] = $ga->get_devices_bydate($this->start_date, $this->end_date, $this->start, $data['limit']);
$data['graph'] = $ga->get_devices_graph($this->start_date, $this->end_date);
$data['filter_action'] = 'devices';
$data['table_row_option'] = array(20, 100, 500, 1000, 10000);
$data['label'] = 'devices';
$data['filter_tipe'] = false;
$this->view()->renderc(Doo::conf()->language . '/t3', $data);
}
示例6: index
<?php
Doo::loadClass('Session');
class EventosController extends Session
{
function index()
{
session_start();
if (Session::siExisteSesion()) {
Doo::loadModel('CtEventos');
$this->data['eventos'] = Doo::db()->find('CtEventos');
$this->data['slug'] = 'eventos';
Doo::loadModel('CtEncuesta');
$enActivas = new CtEncuesta();
$enActivas->activa = 1;
$this->data['encuestas_activas'] = $enActivas->count();
$this->renderc('admin/evento-ver-todos', $this->data);
} else {
header('location:' . Doo::conf()->APP_URL . 'ionadmin/login?error=1');
}
}
function agregar()
{
session_start();
if (Session::siExisteSesion()) {
if (isset($_POST) && !empty($_POST)) {
if (isset($_POST['nombre']) && isset($_POST['fecha']) && isset($_POST['hora']) && isset($_POST['presentador']) && isset($_POST['detalles'])) {
Doo::loadModel('CtEventos');
$evento = new CtEventos();
$evento->nombre = strip_tags(addslashes($_POST['nombre']));
$evento->fecha = strip_tags(addslashes($_POST['fecha']));
示例7: classes
/**
* short hand of Doo::loadClass()
* @param string $class_name
* @param bool $createObj
* @return mixed If $createObj is True, it returns the created Object
*/
public function classes($class_name, $createObj = false)
{
return Doo::loadClass($class_name, $createObj);
}
示例8: _getLoginFormConfig
/**
* 取得表单配置
* @param boolean $isInsert 1 是插入表单配置,0 是修改表单
* @param array $data 修改表单时传入数组
* @return array
*/
protected function _getLoginFormConfig($isInsert = true)
{
Doo::loadClass('DataExt');
$dataExt = new DataExt();
$insertForm = array('method' => 'post', 'renderFormat' => 'html', 'action' => '', 'attributes' => array('id' => 'js-form', 'class' => 'form-horizontal'), 'elements' => array('errors' => array('display', array('div' => false, 'label-hide' => true, 'content' => '<div id="js-form-errors" class=""></div><div style="clear:both"></div>')), 'name' => array('text', array('label' => '登陆码', 'attributes' => array('class' => "m-wrap small"), 'value' => '')), 'saveAndReutrn' => array('button', array('div' => false, 'left' => '<div class="form-actions js-submitButton">', 'label' => '<i class="icon-arrow-left"></i>提交', 'attributes' => array('class' => "btn blue"), 'value' => 1))));
return $insertForm;
}
示例9: UserSession
<?php
Doo::loadClass('UserSession');
$usession = new UserSession();
$username = $usession->uget('username');
?>
<h1>Results on <?php
echo $data['gdtform'];
?>
to <?php
echo $data['gdtto'];
?>
</h1>
<div class="list_wrapper">
<?/*<h1>User List</h1>*/ ?>
<?php
if (!$_REQUEST['print']) {
?>
<div class="row-fluid">
<?php
require_once "filter.php";
?>
<div class="span11 widget white" onTablet="span10" onDesktop="span11" style="margin-top:20px;">
<div id="stats-chart3" style="height:282px" ></div>
</div>
<div id="dialog" title="User Registration Trendings"></div>
<div class="clear"></div>
</div>
<div class="clear"></div>
<?php
}
示例10: GA
<?php
Doo::loadClass('UserSession');
Doo::loadClass('GA');
$ga = new GA();
$usession = new UserSession();
$username = $usession->uget('username');
?>
<div class="list_wrapper">
<?/*<h1>User List</h1>*/ ?>
<content>
<?php
$pg_link = $_GET['page'] ? '&page=' . $_GET['page'] : '';
$sch_link = $_GET['search'] ? '&search=' . $_GET['search'] : '';
$utype_link = $_GET['userProvider'] ? '&userProvider=' . $_GET['userProvider'] : '';
$uregional_link = $_GET['speedyRegional'] ? '&speedyRegional=' . $_GET['speedyRegional'] : '';
?>
<?php
if (!$_REQUEST['print'] && false) {
?>
<div style="margin:5px;">
<form class="navbar-search pull-right" action="<?php
echo DOO::conf()->SUBFOLDER . $data['filter_action'];
?>
" method="POST" >
<input type="text" class="search-query" placeholder="Search" value="<?php
echo $_GET['search'] ? $_GET['search'] : '';
?>
" name="search" autocomplete="off">
</form>
<div class="clear"></div>
示例11: getCustomerInfoDetail
function getCustomerInfoDetail()
{
$username = null;
$password = null;
// mod_php
if (isset($_SERVER['PHP_AUTH_USER'])) {
$username = $_SERVER['PHP_AUTH_USER'];
$password = $_SERVER['PHP_AUTH_PW'];
// most other servers
} elseif (isset($_SERVER['HTTP_AUTHORIZATION'])) {
if (strpos(strtolower($_SERVER['HTTP_AUTHORIZATION']), 'basic') === 0) {
list($username, $password) = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
}
}
if ($username != "useetv" && $password != "t3lk0mus33tv") {
unset($username);
}
if (is_null($username)) {
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
}
header('Content-type: application/json');
$resourceNumber = $_REQUEST['resourceNumber'];
Doo::loadClass('SDPAPI');
$sdpapi = new SDPAPI();
echo json_encode($sdpapi->getCustomerInfoDetail($resourceNumber));
}
示例12: str_replace
$config['SUBFOLDER'] = str_replace($_SERVER['DOCUMENT_ROOT'], '', str_replace('\\', '/', $config['SITE_PATH']));
if (strpos($config['SUBFOLDER'], '/') !== 0) {
$config['SUBFOLDER'] = '/' . $config['SUBFOLDER'];
}
$config['APP_URL'] = 'http://' . $_SERVER['HTTP_HOST'] . $config['SUBFOLDER'];
$config['DEBUG_ENABLED'] = FALSE;
$config['ERROR_404_ROUTE'] = '/404.htm';
$config['AUTOROUTE'] = true;
require_once $config['BASE_PATH'] . 'Doo.php';
require_once $config['BASE_PATH'] . 'app/DooConfig.php';
include PROJECT_ROOT . 'config/route.php';
if (file_exists(PROJECT_ROOT . 'config/db.php')) {
require_once PROJECT_ROOT . 'config/db.php';
} else {
require_once LUA_ROOT . ADMIN_ROOT . '/config/db.php';
}
if (file_exists(PROJECT_ROOT . 'config/acl.php')) {
require_once PROJECT_ROOT . 'config/acl.php';
} else {
require_once LUA_ROOT . ADMIN_ROOT . '/config/acl.php';
}
Doo::acl()->rules = $acl;
Doo::acl()->defaultFailedRoute = '/' . SYSNAME . '/401.htm';
Doo::conf()->set($config);
require_once $config['BASE_PATH'] . 'diagnostic/debug.php';
Doo::db()->setDb($dbconfig, $config['APP_MODE']);
Doo::db()->sql_tracking = true;
Doo::app()->route = $route;
Doo::loadClass('Lua', false, ADMIN_ROOT);
ob_start();
Doo::app()->run();
示例13: indexKoreanpackage
public function indexKoreanpackage()
{
Doo::loadHelper('DooPager');
Doo::loadClass('Movie');
$mv = new Movie();
$data = $this->conf_data;
$data['title'] = 'UseeTV - Korean Packet';
$data['content_view'] = 'content/new_svod.php';
if (!$this->start) {
$this->start = 0;
}
$data['limit'] = $this->limit;
$data['gdtto'] = $this->gdtto;
$data['gdtform'] = $this->gdtform;
$data['content_data'] = $mv->get_korean_register($_GET['userProvider'], $_REQUEST['speedyRegional'], $_REQUEST['speedySubRegional'], $this->start_date, $this->end_date, $this->start, $data['limit'], $this->ord, $this->gsearch);
if ($_REQUEST['print'] == 'excel') {
DooTextHelper::download_send_headers('koreanpackage_' . date("Ymd") . ".csv");
echo DooTextHelper::array2csv($data['content_data']);
exit;
}
$data['total'] = $mv->get_total_from_query();
$data['graph'] = $mv->get_graph_korean_register($_GET['userProvider'], $_REQUEST['speedyRegional'], $_REQUEST['speedySubRegional'], $this->start_date, $this->end_date);
$data['filter_action'] = 'koreanpackage';
$data['table_row_option'] = array(20, 100, 500, 1000, 10000);
$data['label'] = 'KOREAN PACKAGE';
$this->view()->renderc(Doo::conf()->language . '/t3', $data);
}
示例14: Movie
<?php
Doo::loadClass('Movie');
$mv = new Movie();
?>
<div class="list_wrapper">
<?/*<h1>User List</h1>*/ ?>
<content>
<?php
$pg_link = $_GET['page'] ? '&page=' . $_GET['page'] : '';
$sch_link = $_GET['search'] ? '&search=' . $_GET['search'] : '';
$utype_link = $_GET['userProvider'] ? '&userProvider=' . $_GET['userProvider'] : '';
$uregional_link = $_GET['speedyRegional'] ? '&speedyRegional=' . $_GET['speedyRegional'] : '';
?>
<?php
if (!$_REQUEST['print']) {
?>
<div style="margin:5px;">
<form class="navbar-search pull-right" action="<?php
echo DOO::conf()->SUBFOLDER . $data['filter_action'];
?>
" method="POST" >
<input type="text" class="search-query" placeholder="Search" value="<?php
echo $_GET['search'] ? $_GET['search'] : '';
?>
" name="search" autocomplete="off">
</form>
<div class="clear"></div>
</div>
<?php
}
示例15: mod
public function mod()
{
$id = (int) $this->getUrlVar('id');
Doo::loadClassAt('Role', 'default');
$role = new role();
$data = $role->get_one($id);
if (empty($data)) {
$this->alert('没有找到数据');
return;
}
if ($this->isAjax() && $_POST) {
$v = Doo::loadHelper('DooValidator', true);
$success = true;
$errors = array();
//D($postData);
$rules = array('name' => array(array('required', "请填写角色名"), array('minlength', 2, "角色名最少长度不允许少于2个字节"), array('maxlength', 12, "角色名最大长度不允许大于12个字节")), 'perm' => array(array('required', "请勾选角色权限")));
// 验证数据
if ($errors = $v->validate($_POST, $rules)) {
$success = false;
}
// 插入角色数据
if ($success) {
$role = Doo::loadClass('Role', true);
$_POST['id'] = $id;
list($success, $errors) = array_values($role->update($_POST));
}
// 处理返回路径
if ($success) {
if (isset($_POST['saveAndReutrn'])) {
$errors = RoleController::$dataTableUrl;
} else {
if (isset($_POST['saveAndSee'])) {
$errors = RoleController::$modUrl . $errors;
} else {
$errors = RoleController::$addUrl;
}
}
}
$this->ajaxFormResult($success, $errors);
} else {
Doo::loadClassAt('html/DooFormExt', 'default');
Doo::loadClassAt('Menu', 'default');
$menu = new Menu(DBproxy::getManage());
$perms = $role->get_role_perm($id);
$menus = $menu->get_menu_formlists($perms);
// 引入树状css
array_push($this->_includeCssFileList, 'css/tree.css');
$form = new DooFormExt(array('method' => 'post', 'renderFormat' => 'html', 'action' => '', 'attributes' => array('id' => 'js-form', 'class' => 'form-horizontal'), 'elements' => array('errors' => array('display', array('div' => false, 'label' => false, 'content' => '<div id="js-form-errors" class=""></div><div style="clear:both"></div>')), 'name' => array('text', array('label' => '角色名', 'attributes' => array('class' => "m-wrap"), 'value' => $data[0]['name'])), 'menus' => array('display', array('label' => '菜单', 'content' => '<div style="width:800px;height:500px;overflow-y:auto;" class="tree-wrapper">' . $menus . '</div>')), 'saveAndReutrn' => array('button', array('div' => false, 'left' => '<div class="form-actions js-submitButton">', 'label' => '<i class="icon-arrow-left"></i>保存&返回', 'attributes' => array('class' => "btn blue"), 'value' => 1)), 'saveAndSee' => array('button', array('div' => false, 'left' => ' ', 'label' => '保存&查看<i class="icon-arrow-right"></i>', 'attributes' => array('class' => "btn blue"), 'value' => 1)), 'cancelAndReturn' => array('display', array('div' => false, 'left' => ' ', 'right' => '</div>', 'content' => '<a class="btn" href="' . RoleController::$dataTableUrl . '"><i class="icon-arrow-left"></i>取消&返回</a>')))));
$this->contentlayoutRender($form->render());
}
}