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


PHP inlink函数代码示例

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


在下文中一共展示了inlink函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: logout

 /**
  * SSO logout.
  * 
  * @param  string $type 
  * @access public
  * @return void
  */
 public function logout($type = 'notify')
 {
     if ($type != 'return') {
         $code = $this->config->sso->code;
         $userIP = $this->server->remote_addr;
         $token = $this->get->token;
         $key = $this->config->sso->key;
         $auth = md5($code . $userIP . $token . $key);
         $callback = urlencode($common->getSysURL() . inlink('logout', "type=return"));
         $location = $this->config->sso->addr;
         if (strpos($location, '&') !== false) {
             $location = rtrim($location, '&') . "&token={$token}&auth={$auth}&userIP={$userIP}&callback={$callback}";
         } else {
             $location = rtrim($location, '?') . "?token={$token}&auth={$auth}&userIP={$userIP}&callback={$callback}";
         }
         $this->locate($location);
     }
     if ($this->get->status == 'success') {
         session_destroy();
         setcookie('za', false);
         setcookie('zp', false);
         $this->locate($this->createLink('user', 'login'));
     }
     $this->locate($this->createLink('user', 'logout'));
 }
开发者ID:heeeello,项目名称:zentaopms,代码行数:32,代码来源:control.php

示例2: edit

 /**
  * Edit a refund.
  * 
  * @param  int    $refundID 
  * @access public
  * @return void
  */
 public function edit($refundID)
 {
     $refund = $this->refund->getByID($refundID);
     $this->checkPriv($refund, 'edit');
     if ($_POST) {
         $changes = $this->refund->update($refundID);
         if (dao::isError()) {
             $this->send(array('result' => 'fail', 'message' => dao::getError()));
         }
         $files = $this->loadModel('file')->saveUpload('refund', $refundID);
         if (!empty($changes) or $files) {
             $fileAction = '';
             if ($files) {
                 $fileAction = $this->lang->addFiles . join(',', $files);
             }
             $actionID = $this->loadModel('action')->create('refund', $refundID, 'Edited', $fileAction);
             if ($changes) {
                 $this->action->logHistory($actionID, $changes);
             }
         }
         $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "refundID={$refundID}")));
     }
     $this->view->currencyList = $this->loadModel('common', 'sys')->getCurrencyList();
     $this->view->currencySign = $this->loadModel('common', 'sys')->getCurrencySign();
     $this->view->categories = $this->refund->getCategoryPairs();
     $this->view->refund = $refund;
     $this->view->users = $this->loadModel('user')->getPairs('noclosed,nodeleted');
     $this->display();
 }
开发者ID:leowh,项目名称:colla,代码行数:36,代码来源:control.php

示例3: edit

 /**
  * Edit a build.
  * 
  * @param  int    $buildID 
  * @access public
  * @return void
  */
 public function edit($buildID)
 {
     if (!empty($_POST)) {
         $changes = $this->build->update($buildID);
         if (dao::isError()) {
             die(js::error(dao::getError()));
         }
         if ($changes) {
             $actionID = $this->loadModel('action')->create('build', $buildID, 'edited');
             $this->action->logHistory($actionID, $changes);
         }
         die(js::locate(inlink('view', "buildID={$buildID}"), 'parent'));
     }
     $this->loadModel('story');
     $this->loadModel('bug');
     $this->loadModel('project');
     /* Set menu. */
     $build = $this->build->getById((int) $buildID);
     $this->project->setMenu($this->project->getPairs(), $build->project);
     /* Get stories and bugs. */
     $orderBy = 'status_asc, stage_asc, id_desc';
     $stories = $this->story->getProjectStories($build->project, $orderBy);
     $bugs = $this->bug->getProjectBugs($build->project);
     /* Assign. */
     $this->view->title = $this->lang->build->edit;
     $this->view->position[] = $this->lang->build->edit;
     $this->view->products = $this->project->getProducts($build->project);
     $this->view->build = $build;
     $this->view->users = $this->loadModel('user')->getPairs('nodeleted', $build->builder);
     $this->view->stories = $stories;
     $this->view->bugs = $bugs;
     $this->view->orderBy = $orderBy;
     $this->display();
 }
开发者ID:laiello,项目名称:zentaoms,代码行数:41,代码来源:control.php

示例4: request

 /**
  * Request the api.
  * 
  * @param  string $moduleName 
  * @param  string $methodName 
  * @param  string $action 
  * @access public
  * @return void
  */
 public function request($moduleName, $methodName, $action)
 {
     $host = common::getSysURL() . $this->config->webRoot;
     $param = '';
     if ($action == 'extendModel') {
         if (!isset($_POST['noparam'])) {
             foreach ($_POST as $key => $value) {
                 $param .= ',' . $key . '=' . $value;
             }
             $param = ltrim($param, ',');
         }
         $url = rtrim($host, '/') . inlink('getModel', "moduleName={$moduleName}&methodName={$methodName}&params={$param}", 'json');
         $url .= $this->config->requestType == "PATH_INFO" ? '?' : '&';
         $url .= $this->config->sessionVar . '=' . session_id();
     } else {
         if (!isset($_POST['noparam'])) {
             foreach ($_POST as $key => $value) {
                 $param .= '&' . $key . '=' . $value;
             }
             $param = ltrim($param, '&');
         }
         $url = rtrim($host, '/') . helper::createLink($moduleName, $methodName, $param, 'json');
         $url .= $this->config->requestType == "PATH_INFO" ? '?' : '&';
         $url .= $this->config->sessionVar . '=' . session_id();
     }
     /* Unlock session. After new request, restart session. */
     session_write_close();
     $content = file_get_contents($url);
     session_start();
     return array('url' => $url, 'content' => $content);
 }
开发者ID:caiwenhao,项目名称:zentao,代码行数:40,代码来源:model.php

示例5: upgradeLicense

 /**
  * Upgrade license when upgrade to 4.0.
  * 
  * @access public
  * @return void
  */
 public function upgradeLicense()
 {
     if ($this->get->agree) {
         $this->locate(inlink('backup'));
     }
     $this->view->license = file_get_contents($this->app->getBasePath() . '/doc/LICENSE');
     $this->display();
 }
开发者ID:jnan77,项目名称:chanzhieps,代码行数:14,代码来源:control.php

示例6: delete

 /**
  * Delete an address.
  * 
  * @param  int    $id 
  * @access public
  * @return void
  */
 public function delete($id)
 {
     $this->dao->delete()->from(TABLE_ADDRESS)->where('id')->eq($id)->andWhere('account')->eq($this->app->user->account)->exec();
     if (dao::isError()) {
         $this->send(array('result' => 'fail', 'message' => dao::getError()));
     }
     $this->send(array('result' => 'success', 'message' => $this->lang->deleteSuccess, 'locate' => inlink('browse')));
 }
开发者ID:peirancao,项目名称:chanzhieps,代码行数:15,代码来源:control.php

示例7: ignore

 /**
  * Ignore the admin entry warning.
  *
  * @access public
  * return void
  **/
 public function ignore()
 {
     $result = $this->loadModel('setting')->setItems('system.common.global', array('ignoreAdminEntry' => true));
     if ($result) {
         $this->send(array('result' => 'success', 'locate' => inlink('index')));
     }
     $this->send(array('result' => 'fail', 'message' => $this->lang->fail));
 }
开发者ID:jnan77,项目名称:chanzhieps,代码行数:14,代码来源:control.php

示例8: lang

 /**
  * Set lang. 
  * 
  * @param  string    $module 
  * @param  string    $field 
  * @access public
  * @return void
  */
 public function lang($module, $field, $appName = '')
 {
     $clientLang = $this->app->getClientLang();
     if (empty($appName)) {
         $appName = $this->app->getAppName();
     }
     $this->app->loadLang($module, $appName);
     if ($module == 'user' and $field == 'roleList' and $appName == 'sys') {
         $this->lang->menuGroups->setting = 'user';
     }
     if (!empty($_POST)) {
         if ($module == 'common' and $field == 'currencyList') {
             $setting = fixer::input('post')->join('currency', ',')->setDefault('currency', '')->get();
             $this->setting->setItems('system.sys.setting', $setting);
             if (dao::isError()) {
                 $this->send(array('result' => 'fail', 'message' => dao::getError()));
             }
             $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('lang', "module={$module}&field={$field}&appName={$appName}")));
         }
         $lang = $_POST['lang'];
         $appendField = isset($this->config->setting->appendLang[$module][$field]) ? $this->config->setting->appendLang[$module][$field] : '';
         $this->setting->deleteItems("lang={$lang}&app={$appName}&module={$module}&section={$field}", $type = 'lang');
         if ($appendField) {
             $this->setting->deleteItems("lang={$lang}&app={$appName}&module={$module}&section={$appendField}", $type = 'lang');
         }
         foreach ($_POST['keys'] as $index => $key) {
             $value = $_POST['values'][$index];
             if (!$value or !$key) {
                 continue;
             }
             $system = $_POST['systems'][$index];
             $this->setting->setItem("{$lang}.{$appName}.{$module}.{$field}.{$key}.{$system}", $value, $type = 'lang');
             /* Save additional item. */
             if ($appendField) {
                 $this->setting->setItem("{$lang}.{$appName}.{$module}.{$appendField}.{$key}.{$system}", $_POST[$appendField][$index], $type = 'lang');
             }
         }
         if (dao::isError()) {
             $this->send(array('result' => 'fail', 'message' => dao::getError()));
         }
         $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('lang', "module={$module}&field={$field}&appName={$appName}")));
     }
     $dbFields = $this->setting->getItems("lang={$clientLang},all&app={$appName}&module={$module}&section={$field}", 'lang');
     $systemField = array();
     foreach ($dbFields as $dbField) {
         $systemField[$dbField->key] = $dbField->system;
     }
     $this->view->fieldList = $module == 'common' ? $this->lang->{$field} : $this->lang->{$module}->{$field};
     $this->view->module = $module;
     $this->view->field = $field;
     $this->view->clientLang = $clientLang;
     $this->view->systemField = $systemField;
     $this->view->appName = $appName;
     $this->display();
 }
开发者ID:leowh,项目名称:colla,代码行数:63,代码来源:control.php

示例9: confirm

 /**
  * Confirm the version.
  * 
  * @access public
  * @return void
  */
 public function confirm()
 {
     $this->view->title = $this->lang->upgrade->confirm;
     $this->view->position[] = $this->lang->upgrade->common;
     $this->view->confirm = $this->upgrade->getConfirm($this->post->fromVersion);
     $this->view->fromVersion = $this->post->fromVersion;
     /* When sql is empty then skip it. */
     if (empty($this->view->confirm)) {
         $this->locate(inlink('execute', "fromVersion={$this->post->fromVersion}"));
     }
     $this->display();
 }
开发者ID:fanscky,项目名称:HTPMS,代码行数:18,代码来源:control.php

示例10: db

 /**
  * Get schema of database.
  * 
  * @param  string $table 
  * @access public
  * @return void
  */
 public function db($table = '')
 {
     $this->view->title = $this->lang->dev->db;
     $this->view->position[] = html::a(inlink('api'), $this->lang->dev->common);
     $this->view->position[] = $this->lang->dev->db;
     $this->view->tables = $this->dev->getTables();
     $this->view->tab = 'db';
     $this->view->selectedTable = $table;
     $this->view->tab = 'db';
     $this->view->fields = $table ? $this->dev->getFields($table) : array();
     $this->display();
 }
开发者ID:caiwenhao,项目名称:zentao,代码行数:19,代码来源:control.php

示例11: test

 public function test()
 {
     $pubuConfig = $this->pubu->getConfig();
     $this->view->position[] = html::a(inlink('index'), $this->lang->pubu->common);
     $this->view->position[] = '测试';
     $ping = $this->pubu->sendNotification($pubuConfig->webhook, array('type' => 'ping', "data" => array("hello" => "zentao")));
     $this->view->ping = $ping;
     if (is_string($ping)) {
         echo js::alert($ping);
         die(js::locate('back'));
     }
     $this->display();
 }
开发者ID:pubuim,项目名称:pubuim-zentao-plugin,代码行数:13,代码来源:control.php

示例12: index

 /**
  * index page of project module.
  * 
  * @param  string $status 
  * @access public
  * @return void
  */
 public function index($status = 'involved', $recTotal = 0, $recPerPage = 10, $pageID = 1)
 {
     $this->app->loadClass('pager', $static = true);
     $pager = new pager($recTotal, $recPerPage, $pageID);
     if (empty($this->projects)) {
         $this->locate(inlink('create'));
     }
     $this->view->title = $this->lang->project->common;
     $this->view->status = $status;
     $this->view->projects = $this->project->getList($status, $pager);
     $this->view->users = $this->loadModel('user')->getPairs('noclosed');
     $this->view->pager = $pager;
     $this->display();
 }
开发者ID:leowh,项目名称:colla,代码行数:21,代码来源:control.php

示例13: buildIndex

 /**
  * Build All index. 
  * 
  * @access public
  * @return void
  */
 public function buildIndex($type = 'article', $lastID = '')
 {
     if (helper::isAjaxRequest()) {
         $result = $this->search->buildAllIndex($type, $lastID);
         if (dao::isError()) {
             $this->send(array('result' => 'fail', 'message' => dao::getError()));
         }
         if (isset($result['finished']) and $result['finished']) {
             $this->send(array('result' => 'finished', 'message' => $this->lang->search->buildSuccessfully));
         } else {
             $this->send(array('result' => 'unfinished', 'message' => sprintf($this->lang->search->buildResult, $result['count']), 'next' => inlink('buildIndex', "type={$result['type']}&lastID={$result['lastID']}")));
         }
     }
     $this->view->title = $this->lang->search->buildIndex;
     $this->display();
 }
开发者ID:peirancao,项目名称:chanzhieps,代码行数:22,代码来源:control.php

示例14: bind

 /**
  * Bind zentao.
  * 
  * @access public
  * @return void
  */
 public function bind()
 {
     if ($_POST) {
         $response = $this->admin->bindByAPI();
         if ($response == 'success') {
             $this->loadModel('setting')->setItem('system.common.global.community', $this->post->account);
             echo js::alert($this->lang->admin->bind->success);
             die(js::locate(inlink('index'), 'parent'));
         }
         die($response);
     }
     $this->view->title = $this->lang->admin->bind->caption;
     $this->view->position[] = $this->lang->admin->bind->caption;
     $this->view->sn = $this->config->global->sn;
     $this->display();
 }
开发者ID:fanscky,项目名称:HTPMS,代码行数:22,代码来源:control.php

示例15: buyScore

 /**
  * Buy score use money.
  * 
  * @access public
  * @return void
  */
 public function buyScore()
 {
     if ($this->app->user->account == 'guest') {
         $this->locate($this->createLink('user', 'login'));
     }
     if ($_POST) {
         if ($this->post->amount < $this->config->score->buyScore->minAmount) {
             $this->send(array('result' => 'fail', 'message' => sprintf($this->lang->score->errorAmount, $this->config->score->buyScore->minAmount)));
         }
         $orderID = $this->score->saveOrder();
         if (!$orderID) {
             $this->send(array('result' => 'fail', 'message' => dao::getError()));
         }
         $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('payOrder', "orderID={$orderID}")));
     }
     $this->display();
 }
开发者ID:hansen1416,项目名称:eastsoft,代码行数:23,代码来源:control.php


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