本文整理汇总了PHP中object::getAll方法的典型用法代码示例。如果您正苦于以下问题:PHP object::getAll方法的具体用法?PHP object::getAll怎么用?PHP object::getAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类object
的用法示例。
在下文中一共展示了object::getAll方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: indexAction
public function indexAction()
{
//检查权限
$this->manager->checkMenuPermission($this->sign, Widget_Manager::MENU_PURVIEW_SELECT);
$LotoArr = $this->oLoto->getAll();
include $this->tpl('Loto_list');
}
示例2: indexAction
/**
* 浏览游戏列表
* @return unknown_type
*/
public function indexAction()
{
/**
* 记录日志
*/
$log = "游戏管理\n\nServerIp:\n" . $this->request->getServer('SERVER_ADDR') . "\n\nGET:\n" . var_export($_GET, true) . "\n\nPOST:\n" . var_export($_POST, true);
$this->oLogManager->push('log', $log);
//检查权限
$this->manager->checkMenuPermission($this->sign, Widget_Manager::MENU_PURVIEW_SELECT);
/**
* 游戏类型
* @var string
*/
$appType = intval($this->request->appType);
$oAppArr = array();
$oGameClaArr = $this->oClass->getAll();
if ($appType) {
$oAppArr = $this->oApp->getByClass($appType);
} else {
$oAppArr = $this->oApp->getAll();
}
if (is_array($oAppArr)) {
foreach ($oAppArr as $keyApp => $valApp) {
$oAppArr[$keyApp]['class_name'] = $valApp['ClassId'] ? $oGameClaArr[$valApp['ClassId']]['name'] : "未分类";
$oAppArr[$keyApp]['comment'] = json_decode($valApp['comment'], true);
}
}
include $this->tpl();
}
示例3: indexAction
public function indexAction()
{
//检查权限
$this->manager->checkMenuPermission($this->sign, Widget_Manager::MENU_PURVIEW_SELECT);
$SourceTypeArr = $this->oSourceType->getAll();
include $this->tpl('Config_Source_Type_list');
}
示例4: init
/**
* 初始化
* (non-PHPdoc)
* @see AbstractController#init()
*/
public function init()
{
parent::init();
$this->oResearch = new Config_Research();
$this->oQuestion = new Config_Research_Question();
$this->ResearchList = $this->oResearch->getAll();
$this->AnswerTypeList = array('text' => '字符串', 'radio' => '单选', 'checkbox' => "多选", 'textarea' => "文本框");
}
示例5: modifyAction
public function modifyAction()
{
//检查权限
$this->manager->checkMenuPermission($this->sign, Widget_Manager::MENU_PURVIEW_UPDATE);
$VideoId = intval($this->request->VideoId);
$Video = $this->oVideo->getRow($VideoId, '*');
$VideoTypeArr = $this->oVideoType->getAll();
include $this->tpl('Config_Video_Video_modify');
}
示例6: fnDBFetchCon
function fnDBFetchCon($strSql, $hdlConfDB)
{
$arrResult =& $this->hdlDb->getAll($strSql, DB_FETCHMODE_ASSOC);
if (DB::isError($arrResult)) {
print $arrResult->getDebugInfo() . "<br>";
die("Failed: " . $arrResult->getMessage() . "\n");
}
return $arrResult;
//return the result set
}
示例7: init
/**
* 初始化
* (non-PHPdoc)
* @see AbstractController#init()
*/
public function init()
{
parent::init();
$this->oArea = new Config_Area();
$this->Abroad = array(1 => '国内', 2 => '国外');
$totalArea = $this->oArea->getAll();
foreach ($totalArea as $AreaId => $value) {
$value['abroad'] = $this->Abroad[$value['is_abroad']];
$this->AreaList[$AreaId] = $value;
}
}
示例8: indexAction
/**
* 浏览邮箱后缀列表
* @return unknown_type
*/
public function indexAction()
{
/**
* 记录日志
*/
$log = "邮箱后缀管理\n\nServerIp:\n" . $this->request->getServer('SERVER_ADDR') . "\n\nGET:\n" . var_export($_GET, true) . "\n\nPOST:\n" . var_export($_POST, true);
$this->oLogManager->push('log', $log);
//检查权限
$this->manager->checkMenuPermission($this->sign, Widget_Manager::MENU_PURVIEW_SELECT);
$MailFixArr = $this->oMailFix->getAll();
include $this->tpl();
}
示例9: indexAction
public function indexAction()
{
$FaqTypeList = $this->oFaqType->getAll('name,FaqTypeId');
$FaqTypeId = $this->request->FaqTypeId ? abs(intval($this->request->FaqTypeId)) : 0;
//检查权限
$this->manager->checkMenuPermission($this->sign, Widget_Manager::MENU_PURVIEW_SELECT);
$FaqArr = $this->oFaq->getAll($FaqTypeId);
if ($FaqArr) {
foreach ($FaqArr as $FaqId => $FaqData) {
$FaqArr[$FaqId]['FaqTypeName'] = $FaqTypeList[$FaqData['FaqTypeId']]['name'];
}
}
include $this->tpl('Config_Faq_list');
}
示例10: getMultiy
/**
* 从一个表里查询出数据
* @param $table
* @param $fileds
* @param $where
* @param $primkey
* @param $key
* @return array
*/
protected function getMultiy($table, $fileds, $where)
{
$sql = "SELECT {$fileds} FROM {$table} " . $where;
$finally = array();
$rows = $this->slaveDB->getAll($sql, $primkey);
return $finally;
}
示例11: getListBox
/**
* Method to get a sorted list of nodes with indented spaces
* @return string
*/
function getListBox()
{
//create dropdown box
$dropdown = $this->newObject('dropdown', 'htmlelements');
$dropdown->name = 'sourceId';
//get the root id
$contextCode = $this->objDBContext->getContextCode();
if ($contextCode) {
$id = $this->objDBContext->getField('id', $contextCode);
} else {
$id = Null;
}
$rootnodeid = $this->objDBContext->getRootNodeId($id);
//get the list of nodes for the context
$nodesArr = $this->objDBContentNodes->getAll("WHERE tbl_context_parentnodes_id='{$rootnodeid}' ORDER BY sortindex");
//create a root node
$dropdown->addOption(NULL, '[ROOT]');
//add the nodes to the dropdown recursively
foreach ($nodesArr as $node) {
//start with the nodes that has no parent
if ($node['parent_Node'] == null) {
$text = $this->objDBContentNodes->getMenuText($node['id']);
if ($text == '') {
$text = $node['title'];
}
$dropdown->addOption($node['id'], $text);
$this->addNode($nodesArr, $node['id'], $dropdown, ' ');
}
}
return $dropdown->show();
}
示例12: getTree
/**
* Method to get a tree for sharing nodes
* @param string $contextId The Context Id
* @param string $mode The type of tree , either DHTML or Dropdown
* @return string
* @access public
*/
function getTree($contextId, $mode = NULL, $modeParams = NULL)
{
$icon = 'folder_up.gif';
$expandedIcon = 'folder-expanded.gif';
$link = '';
$rootnodeid = $this->objDBContext->getRootNodeId($contextId);
$rootlabel = '';
//Create a new menu
$menu = new treemenu();
$contentlink = $this->URI(array('action', 'contenthome'), $this->module);
//create base node
$basenode = new treenode(array('text' => $rootlabel, 'link' => $contentlink, 'icon' => 'base.gif', 'expandedIcon' => 'base.gif'));
$this->objDBContentNodes->resetTable();
$nodesArr = $this->objDBContentNodes->getAll("WHERE tbl_context_parentnodes_id='{$rootnodeid}'");
$this->objDBContentNodes->changeTable('tbl_context_nodes_has_tbl_context_page_content');
foreach ($nodesArr as $node) {
if ($node['parent_Node'] == null) {
$basenode->addItem($this->getChildNodes($nodesArr, $node['id'], stripslashes($this->shortenString($node['title']))));
}
}
$this->objDBContentNodes->resetTable();
$menu->addItem($basenode);
//$menu->addItem($this->recurTree($rootnodeid,$rootlabel));
// Create the presentation class
$treeMenu =& new dhtml($menu, array('images' => $this->objSkin->getSkinURL() . '/treeimages/imagesAlt2', 'defaultClass' => 'treeMenuDefault'));
if ($mode == 'listbox') {
$listBox =& new listbox($menu, array('linkTarget' => '_self', 'submitText' => $modeParams['submitText'], 'promoText' => $modeParams['promoText']));
return $listBox->getMenu();
}
return '<h5>' . $this->objDBContext->getTitle() . '</h5>' . $treeMenu->getMenu();
}
示例13: jsonListContext
/**
* Method to get a paginated
* list of courses
*
* @param unknown_type $start
* @param unknown_type $limit
* @return unknown
*/
public function jsonListContext($start = 0, $limit = 25)
{
$start = empty($start) ? 0 : $start;
$limit = empty($limit) ? 25 : $limit;
$contexts = $this->objDBContext->getAll("ORDER BY title limit " . $start . ", " . $limit);
$all = $this->objDBContext->getArray("SELECT count( id ) as cnt FROM tbl_context ORDER BY title");
$allCount = $all[0]['cnt'];
$contextCount = count($contexts);
$courses = array();
if ($contextCount > 0) {
foreach ($contexts as $context) {
$studentCount = "";
if (strtoupper($this->showStudentCount) == 'TRUE') {
$studentCount = ' (' . count($this->objUserContext->getContextStudents($context['contextcode'])) . ')';
}
$arr = array();
$arr['contextcode'] = $context['contextcode'];
$arr['title'] = htmlentities($context['title']) . $studentCount;
$arr['author'] = htmlentities($this->objUser->fullname($context['userid']));
$arr['datecreated'] = $context['datecreated'];
$arr['lastupdated'] = $context['updated'];
$arr['status'] = $context['status'];
$arr['expert'] = "";
$courses[] = $arr;
}
}
return json_encode(array('totalCount' => $allCount, 'courses' => $courses));
}
示例14: indexAction
public function indexAction()
{
$AppList = $this->oApp->getAll('name,AppId');
$AppId = $this->request->AppId ? abs(intval($this->request->AppId)) : 101;
//检查权限
$this->manager->checkMenuPermission($this->sign, Widget_Manager::MENU_PURVIEW_SELECT);
$InstMapArr = $this->oInstMap->getAll($AppId);
if ($InstMapArr) {
foreach ($InstMapArr as $App => $AppData) {
foreach ($AppData as $InstMapId => $InstMapData) {
$InstMapArr[$App][$InstMapId]['AppName'] = $AppList[$App]['name'];
}
}
}
include $this->tpl('Config_InstMap_list');
}
示例15: listUsers
function listUsers()
{
$err = $this->_prepare();
if ($err !== true) {
return PEAR::raiseError($err->getMessage(), $err->getCode());
}
$retVal = array();
// Find if db_fileds contains a *, i so assume all col are selected
if (strstr($this->options['db_fields'], '*')) {
$sql_from = "*";
} else {
$sql_from = $this->options['usernamecol'] . ", " . $this->options['passwordcol'] . $this->options['db_fields'];
}
$query = sprintf("SELECT %s FROM %s", $sql_from, $this->options['table']);
$res = $this->db->getAll($query, null, DB_FETCHMODE_ASSOC);
if (DB::isError($res)) {
return PEAR::raiseError($res->getMessage(), $res->getCode());
} else {
foreach ($res as $user) {
$user['username'] = $user[$this->options['usernamecol']];
$retVal[] = $user;
}
}
return $retVal;
}