当前位置: 首页>>代码示例>>PHP>>正文


PHP zget函数代码示例

本文整理汇总了PHP中zget函数的典型用法代码示例。如果您正苦于以下问题:PHP zget函数的具体用法?PHP zget怎么用?PHP zget使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了zget函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 <guanxiying@xirangit.com>
 * @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


注:本文中的zget函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。