本文整理汇总了PHP中zget函数的典型用法代码示例。如果您正苦于以下问题:PHP zget函数的具体用法?PHP zget怎么用?PHP zget使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zget函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get
function get($key)
{
$value = parent::get($key);
if (!is_null($value)) {
return $value;
}
if (EXTERNAL_CACHE_DEBUG) {
SugarCache::log('grabbing via zget(' . $this->_realKey($key) . ')');
}
return $this->_processGet($key, zget($this->_realKey($key)));
}
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:11,代码来源:SugarCache_sMash.php
示例2: dump
/**
* Dump db.
*
* @param string $fileName
* @param array $tables
* @access public
* @return object
*/
public function dump($fileName, $tables = array(), $fields = array(), $mode = 'data,schema', $condations = array(), $replaces = array())
{
/* Init the return. */
$return = new stdclass();
$return->result = true;
$return->error = '';
/* Get all tables in database. */
$allTables = array();
$stmt = $this->dbh->query('show tables');
while ($table = $stmt->fetch(PDO::FETCH_ASSOC)) {
$table = current($table);
$allTables[$table] = $table;
}
/* Dump all tables when tables is empty. */
if (empty($tables)) {
$tables = $allTables;
}
/* Check file. */
if (empty($fileName)) {
$return->result = false;
$return->error = 'Has not file';
return $return;
}
if (!is_writable(dirname($fileName))) {
$return->result = false;
$return->error = 'The directory is not writable';
return $return;
}
/* Open this file. */
$fp = fopen($fileName, 'w');
fwrite($fp, "SET NAMES utf8;\n");
foreach ($tables as $table) {
/* Check table exists. */
if (!isset($allTables[$table])) {
continue;
}
/* Create sql code. */
$backupSql = '';
if (strpos($mode, 'schema') !== false) {
$backupSql .= "DROP TABLE IF EXISTS `{$table}`;\n";
}
if (strpos($mode, 'schema') !== false) {
$backupSql .= $this->getSchemaSQL($table);
}
if (strpos($mode, 'data') !== false) {
$backupSql .= $this->getDataSQL($table, zget($condations, $table), zget($fields, $table), zget($replaces, $table));
}
/* Write sql code. */
fwrite($fp, $backupSql);
}
fclose($fp);
return $return;
}
开发者ID:eric0614,项目名称:chanzhieps,代码行数:61,代码来源:zdb.class.php
示例3: pages
/**
* Pages admin list.
*
* @access public
* @return void
*/
public function pages()
{
$template = $this->config->template->{$this->device}->name;
$theme = $this->config->template->{$this->device}->theme;
$this->block->loadTemplateLang($template);
$this->view->title = $this->lang->block->browseRegion;
$this->view->plans = $this->block->getPlans($template);
$this->view->plan = zget($this->config->layout, $template . '_' . $theme);
$this->view->template = $template;
$this->view->uiHeader = true;
$this->display();
}
开发者ID:eric0614,项目名称:chanzhieps,代码行数:18,代码来源:control.php
示例4: setSearchParams
/**
* Set search params to session.
*
* @param array $searchConfig
* @access public
* @return void
*/
public function setSearchParams($searchConfig)
{
$searchParams['module'] = $searchConfig['module'];
$searchParams['searchFields'] = json_encode($searchConfig['fields']);
$searchParams['fieldParams'] = json_encode($searchConfig['params']);
$searchParams['actionURL'] = $searchConfig['actionURL'];
$searchParams['style'] = zget($searchConfig, 'style', 'full');
$searchParams['queryID'] = isset($searchConfig['queryID']) ? $searchConfig['queryID'] : 0;
/* remove onlybody for url*/
$onlybodyParam = $this->config->requestType == 'GET' ? '&onlybody=yes' : '?onlybody=yes';
$searchParams['actionURL'] = str_replace($onlybodyParam, '', $searchParams['actionURL']);
$this->session->set('searchParams', $searchParams);
}
开发者ID:XMGmen,项目名称:zentao,代码行数:20,代码来源:model.php
示例5: index
/**
* Index page.
* @access public
* @return void
*/
public function index()
{
$community = zget($this->config->global, 'community');
if (!$community or $community == 'na') {
$this->view->bind = false;
$this->view->account = false;
$this->view->ignore = $community == 'na';
} else {
$this->view->bind = true;
$this->view->account = $community;
$this->view->ignore = false;
}
$this->app->loadLang('misc');
$this->view->title = $this->lang->admin->common;
$this->display();
}
开发者ID:laiello,项目名称:zentaoms,代码行数:21,代码来源:control.php
示例6: edit
/**
* Edit the mail config.
*
* @access public
* @return void
*/
public function edit()
{
if ($this->config->mail->turnon) {
$mailConfig = $this->config->mail->smtp;
$mailConfig->fromAddress = $this->config->mail->fromAddress;
$mailConfig->fromName = $this->config->mail->fromName;
$mailConfig->charset = zget($mailConfig, 'charset', 'utf-8');
} elseif ($this->session->mailConfig) {
$mailConfig = $this->session->mailConfig;
} else {
$this->locate(inlink('detect'));
}
$this->view->title = $this->lang->mail->common . $this->lang->colon . $this->lang->mail->edit;
$this->view->position[] = html::a(inlink('index'), $this->lang->mail->common);
$this->view->position[] = $this->lang->mail->edit;
$this->view->mailExist = $this->mail->mailExist();
$this->view->mailConfig = $mailConfig;
$this->display();
}
开发者ID:fanscky,项目名称:HTPMS,代码行数:25,代码来源:control.php
示例7: getList
/**
* Get list.
*
* @param string $objectType
* @param int $objectID
* @access public
* @return array
*/
public function getList($objectType, $objectID)
{
$addresses = $this->getByObject($objectType, $objectID);
if ($objectType == 'contact') {
$contact = $this->loadModel('contact')->getByID($objectID);
if (isset($contact->customer)) {
$addresses = array_merge($this->getByObject('customer', $contact->customer), $addresses);
}
}
/* Join area and location to fullLocation. */
$areaList = $this->loadModel('tree')->getOptionMenu('area');
foreach ($addresses as $address) {
$address->fullLocation = '';
if (isset($address->area)) {
$address->fullLocation .= str_replace('/', ' ', zget($areaList, $address->area));
}
$address->fullLocation .= ' ' . $address->location;
}
return $addresses;
}
开发者ID:leowh,项目名称:colla,代码行数:28,代码来源:model.php
示例8: zget
echo $todo->id;
?>
</td>
<td><?php
echo $todo->date == '2030-01-01' ? $lang->todo->periods['future'] : $todo->date;
?>
</td>
<td><?php
echo $lang->todo->typeList[$todo->type];
?>
</td>
<td><span class='<?php
echo 'pri' . zget($lang->todo->priList, $todo->pri, $todo->pri);
?>
'><?php
echo zget($lang->todo->priList, $todo->pri, $todo->pri);
?>
</span></td>
<td class='text-left'><?php
echo html::a($this->createLink('todo', 'view', "id={$todo->id}&from=my", '', true), $todo->name, '', "data-toggle='modal' data-type='iframe' data-title='" . $lang->todo->view . "' data-icon='check'");
?>
</td>
<td><?php
echo $todo->begin;
?>
</td>
<td><?php
echo $todo->end;
?>
</td>
<td class='<?php
开发者ID:XMGmen,项目名称:zentao,代码行数:31,代码来源:todo.html.php
示例9: zget
* @license ZPLV1.2 (http://zpl.pub/page/zplv12.html)
* @author Xiying Guan <[email protected]>
* @package order
* @version $Id$
* @link http://www.zentao.net
*/
include '../../common/view/header.modal.html.php';
?>
<table class='table table-form'>
<tr>
<th class='w-100px'><?php
echo $lang->order->express;
?>
</th>
<td><?php
echo zget($expressList, $order->express);
?>
</td>
</tr>
<tr>
<th class='w-100px'><?php
echo $lang->order->waybill;
?>
</th>
<td><?php
echo $order->waybill;
?>
</td>
</tr>
<tr>
<th class='w-100px'><?php
开发者ID:eric0614,项目名称:chanzhieps,代码行数:31,代码来源:deliveryinfo.html.php
示例10: zget
?>
<ul class='nav navbar-nav' id='navbarSwitcher'>
<li><a href='###'><i class='icon-chevron-sign-right icon-large'></i></a></li>
</ul>
<?php
echo commonModel::createManagerMenu();
?>
</div>
</nav>
<div class="clearfix row-main">
<?php
$moduleName = $this->moduleName;
?>
<?php
$menuGroup = zget($lang->menuGroups, $moduleName);
?>
<?php
if ($moduleName != 'ui' && $menuGroup != 'ui') {
?>
<?php
$moduleMenu = commonModel::createModuleMenu($this->moduleName);
?>
<?php
if ($moduleMenu or !empty($treeModuleMenu)) {
?>
<div class='col-md-2'>
<div class="leftmenu affix hiddden-xs hidden-sm">
<?php
if ($moduleMenu) {
echo $moduleMenu;
开发者ID:jnan77,项目名称:chanzhieps,代码行数:31,代码来源:header.admin.html.php
示例11: zget
if ($action->appName == 'sys') {
$action->appName = 'superadmin';
}
?>
<?php
if ($action->objectType == 'todo') {
$action->appName = 'dashboard';
}
?>
<tr class='text-center'>
<td class='text-left'><?php
echo $action->date;
?>
</td>
<td><?php
echo zget($users, $action->actor, $action->actor);
?>
</td>
<td><?php
echo $action->actionLabel;
?>
</td>
<td><?php
echo $lang->action->objectTypes[$action->objectType];
?>
</td>
<td><?php
echo $action->objectID;
?>
</td>
<td class='text-left'><?php
开发者ID:leowh,项目名称:colla,代码行数:31,代码来源:dynamic.html.php
示例12: zget
?>
</th>
<td>
<?php
echo html::input('key', zget($setting, 'key', ' '), "class='form-control'");
?>
</td>
</tr>
<tr>
<th><?php
echo $lang->site->yangcong->auth;
?>
</th>
<td>
<?php
echo html::input('auth', zget($setting, 'auth', ' '), "class='form-control'");
?>
</td>
</tr>
<tr>
<th></th> <td><?php
echo html::submitButton();
?>
</td>
</tr>
</table>
</form>
</div>
</div>
<?php
include '../../common/view/footer.admin.html.php';
开发者ID:qiaqiali,项目名称:chanzhieps,代码行数:31,代码来源:setyangcong.html.php
示例13: grantPriv
/**
* Create a comapny, set admin.
*
* @access public
* @return void
*/
public function grantPriv()
{
if ($this->post->password == '') {
die(js::error($this->lang->install->errorEmptyPassword));
}
/* Insert a company. */
$company = new stdclass();
$company->name = $this->post->company;
$company->admins = ",{$this->post->account},";
$this->dao->insert(TABLE_COMPANY)->data($company)->autoCheck()->batchCheck('name', 'notempty')->exec();
if (!dao::isError()) {
/* Set admin. */
$admin = new stdclass();
$admin->account = $this->post->account;
$admin->realname = $this->post->account;
$admin->password = md5($this->post->password);
$admin->gender = '';
$this->dao->insert(TABLE_USER)->data($admin)->check('account', 'notempty')->exec();
/* Update group name and desc on dafault lang. */
$groups = $this->dao->select('*')->from(TABLE_GROUP)->orderBy('id')->fetchAll();
foreach ($groups as $group) {
$data = zget($this->lang->install->groupList, $group->name, '');
if ($data) {
$this->dao->update(TABLE_GROUP)->data($data)->where('id')->eq($group->id)->exec();
}
}
}
}
开发者ID:XMGmen,项目名称:zentao,代码行数:34,代码来源:model.php
示例14: zget
<th><?php
echo $lang->project->QD;
?>
</th>
<td><?php
echo zget($users, $project->QD, $project->QD);
?>
</td>
</tr>
<tr>
<th><?php
echo $lang->project->RD;
?>
</th>
<td><?php
echo zget($users, $project->RD, $project->RD);
?>
</td>
</tr>
<tr>
<th><?php
echo $lang->project->products;
?>
</th>
<td>
<?php
foreach ($products as $productID => $productName) {
echo html::a($this->createLink('product', 'browse', "productID={$productID}"), $productName) . '<br />';
}
?>
</td>
开发者ID:fanscky,项目名称:HTPMS,代码行数:31,代码来源:view.html.php
示例15: login
//.........这里部分代码省略.........
$account = '';
$password = '';
if ($this->post->account) {
$account = $this->post->account;
}
if ($this->get->account) {
$account = $this->get->account;
}
if ($this->post->password) {
$password = $this->post->password;
}
if ($this->get->password) {
$password = $this->get->password;
}
if ($this->user->checkLocked($account)) {
$failReason = sprintf($this->lang->user->loginLocked, $this->config->user->lockMinutes);
if ($this->app->getViewType() == 'json') {
die(helper::removeUTF8Bom(json_encode(array('status' => 'failed', 'reason' => $failReason))));
}
die(js::error($failReason));
}
$user = $this->user->identify($account, $password);
if ($user) {
$this->user->cleanLocked($account);
/* Authorize him and save to session. */
$user->rights = $this->user->authorize($account);
$user->groups = $this->user->getGroups($account);
$this->session->set('user', $user);
$this->app->user = $this->session->user;
$this->loadModel('action')->create('user', $user->id, 'login');
/* Keep login. */
if ($this->post->keepLogin) {
$this->user->keepLogin($user);
}
/* Check password. */
if (isset($this->config->safe->mode) and $this->user->computePasswordStrength($password) < $this->config->safe->mode) {
echo js::alert($this->lang->user->weakPassword);
}
/* Go to the referer. */
if ($this->post->referer and strpos($this->post->referer, $loginLink) === false and strpos($this->post->referer, $denyLink) === false) {
if ($this->app->getViewType() == 'json') {
$data = $this->user->getDataInJSON($user);
die(helper::removeUTF8Bom(json_encode(array('status' => 'success') + $data)));
}
/* Get the module and method of the referer. */
if ($this->config->requestType == 'PATH_INFO') {
$path = substr($this->post->referer, strrpos($this->post->referer, '/') + 1);
$path = rtrim($path, '.html');
if (empty($path)) {
$path = $this->config->requestFix;
}
list($module, $method) = explode($this->config->requestFix, $path);
} else {
$url = html_entity_decode($this->post->referer);
$param = substr($url, strrpos($url, '?') + 1);
list($module, $method) = explode('&', $param);
$module = str_replace('m=', '', $module);
$method = str_replace('f=', '', $method);
}
if (common::hasPriv($module, $method)) {
die(js::locate($this->post->referer, 'parent'));
} else {
die(js::locate($this->createLink($this->config->default->module), 'parent'));
}
} else {
if ($this->app->getViewType() == 'json') {
$data = $this->user->getDataInJSON($user);
die(helper::removeUTF8Bom(json_encode(array('status' => 'success') + $data)));
}
die(js::locate($this->createLink($this->config->default->module), 'parent'));
}
} else {
$fails = $this->user->failPlus($account);
if ($this->app->getViewType() == 'json') {
die(helper::removeUTF8Bom(json_encode(array('status' => 'failed', 'reason' => $this->lang->user->loginFailed))));
}
$remainTimes = $this->config->user->failTimes - $fails;
if ($remainTimes <= 0) {
die(js::error(sprintf($this->lang->user->loginLocked, $this->config->user->lockMinutes)));
} else {
if ($remainTimes <= 3) {
die(js::error(sprintf($this->lang->user->lockWarning, $remainTimes)));
}
}
die(js::error($this->lang->user->loginFailed));
}
} else {
if (!empty($this->config->global->showDemoUsers)) {
$demoUsers = $this->user->getPairs('nodeleted, noletter, noempty, noclosed');
$this->view->demoUsers = $demoUsers;
}
$this->app->loadLang('misc');
$this->view->noGDLib = sprintf($this->lang->misc->noGDLib, common::getSysURL() . $this->config->webRoot);
$this->view->title = $this->lang->user->login;
$this->view->referer = $this->referer;
$this->view->s = zget($this->config->global, 'sn');
$this->view->keepLogin = $this->cookie->keepLogin ? $this->cookie->keepLogin : 'off';
$this->display();
}
}
开发者ID:heeeello,项目名称:zentaopms,代码行数:101,代码来源:control.php
示例16: zget
</h5>
<div class='chart-canvas'><canvas id='chart-<?php
echo $chartType;
?>
' width='<?php
echo $chartOption->width;
?>
' height='<?php
echo $chartOption->height;
?>
' data-responsive='true'></canvas></div>
</div>
</td>
<td style='width: 320px'>
<?php
$height = zget($lang->bug->report->{$chartType}, 'height', $lang->bug->report->options->height) . 'px';
?>
<div style="overflow:auto" class='table-wrapper'>
<table class='table table-condensed table-hover table-striped table-bordered table-chart' data-chart='<?php
echo $chartOption->type;
?>
' data-target='#chart-<?php
echo $chartType;
?>
' data-animation='false'>
<thead>
<tr>
<th class='chart-label' colspan='2'><?php
echo $lang->report->item;
?>
</th>
开发者ID:caiwenhao,项目名称:zentao,代码行数:31,代码来源:report.html.php
示例17: foreach
</div>
<div class='panel-body'>
<form method='post' id='ajaxForm' class='form-inline'>
<table class='table table-form'>
<?php
foreach ($lang->guarder->operationList->{$type} as $item => $operation) {
?>
<tr>
<th class='text-middle text-center w-100px'><?php
echo $operation;
?>
</th>
<td>
<div class='input-group'>
<?php
echo html::input("interval[{$item}]", zget($this->config->guarder->interval->{$type}, $item), "class='form-control'");
?>
<span class='input-group-addon'><?php
echo $lang->guarder->interval;
echo $lang->guarder->exceed;
?>
</span>
<?php
echo html::input("limits[interval][{$item}]", $this->config->guarder->limits->{$type}->interval->{$item}, "class='form-control'");
?>
<span class='input-group-addon'><?php
echo $lang->guarder->times . $lang->guarder->then . $lang->guarder->disable;
?>
</span>
<?php
echo html::select("punishment[interval][{$item}]", $lang->guarder->punishOptions, $this->config->guarder->punishment->{$type}->interval->{$item}, "class='form-control'");
开发者ID:hansen1416,项目名称:eastsoft,代码行数:31,代码来源:setfilter.html.php
示例18: getResults
/**
* Get results by runID or caseID
*
* @param int $runID
* @param int $caseID
* @access public
* @return array
*/
public function getResults($runID, $caseID = 0)
{
if ($caseID > 0) {
$results = $this->dao->select('*')->from(TABLE_TESTRESULT)->where('`case`')->eq($caseID)->orderBy('id desc')->fetchAll('id');
} else {
$results = $this->dao->select('*')->from(TABLE_TESTRESULT)->where('run')->eq($runID)->orderBy('id desc')->fetchAll('id');
}
if (!$results) {
return array();
}
$relatedVersions = array();
$runIdList = array();
foreach ($results as $result) {
$runIdList[$result->run] = $result->run;
$relatedVersions[] = $result->version;
$runCaseID = $result->case;
}
$relatedVersions = array_unique($relatedVersions);
$relatedSteps = $this->dao->select('*')->from(TABLE_CASESTEP)->where('`case`')->eq($runCaseID)->andWhere('version')->in($relatedVersions)->fetchAll();
$runs = $this->dao->select('t1.id,t2.build')->from(TABLE_TESTRUN)->alias('t1')->leftJoin(TABLE_TESTTASK)->alias('t2')->on('t1.task=t2.id')->where('t1.id')->in($runIdList)->fetchPairs();
foreach ($results as $resultID => $result) {
$result->stepResults = unserialize($result->stepResults);
$result->build = $result->run ? zget($runs, $result->run, 0) : 0;
$results[$resultID] = $result;
foreach ($relatedSteps as $key => $step) {
if ($result->version == $step->version) {
$result->stepResults[$step->id]['desc'] = $step->desc;
$result->stepResults[$step->id]['expect'] = $step->expect;
}
}
}
return $results;
}
开发者ID:Alfred-Lu,项目名称:zentaopms,代码行数:41,代码来源:model.php
示例19: getUserRoles
/**
* Get roles for some users.
*
* @param string $users
* @access public
* @return array
*/
public function getUserRoles($users)
{
$users = $this->dao->select('account, role')->from(TABLE_USER)->where('account')->in($users)->fetchPairs();
if (!$users) {
return array();
}
foreach ($users as $account => $role) {
$users[$account] = zget($this->lang->user->roleList, $role, $role);
}
return $users;
}
开发者ID:XMGmen,项目名称:zentao,代码行数:18,代码来源:model.php
示例20: getPieByType
/**
* Get pie chart data of one type.
*
* @param string $type
* @param int $begin
* @param int $end
* @access public
* @return array
*/
public function getPieByType($type, $begin, $end, $groupBy = 'item')
{
$charts = array();
$reports = $this->dao->select('*, sum(ip) as ip, sum(pv) as pv, sum(uv) as uv')->from(TABLE_STATREPORT)->where('type')->eq($type)->andWhere('timeType')->eq('day')->beginIf($begin != '')->andWhere('timeValue')->ge($begin)->fi()->beginIf($end != '')->andWhere('timeValue')->le($end)->fi()->groupBy($groupBy)->fetchAll($groupBy);
$colors = $this->config->stat->chartColors;
$this->loadModel('log');
$i = 0;
foreach ($reports as $item => $report) {
$color[$item] = isset($color[$item]) ? $color[$item] : $colors[$i];
$i++;
$pv = new stdclass();
$pv->value = $report->pv;
$pv->color = $color[$item];
$pv->label = zget($this->lang->stat->itemList, $item);
$uv = new stdclass();
$uv->value = $report->uv;
$uv->color = $color[$item];
$uv->label = zget($this->lang->stat->itemList, $item);
$ip = new stdclass();
$ip->value = $report->ip;
$ip->color = $color[$item];
$ip->label = zget($this->lang->stat->itemList, $item);
$charts['pv'][] = $pv;
$charts['uv'][] = $uv;
$charts['ip'][] = $ip;
}
return $charts;
}
开发者ID:wenyinos,项目名称:chanzhieps,代码行数:37,代码来源:model.php
注:本文中的zget函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论