本文整理汇总了PHP中inlink函数的典型用法代码示例。如果您正苦于以下问题:PHP inlink函数的具体用法?PHP inlink怎么用?PHP inlink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了inlink函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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}¶ms={$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}§ion={$field}", $type = 'lang');
if ($appendField) {
$this->setting->deleteItems("lang={$lang}&app={$appName}&module={$module}§ion={$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}§ion={$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
示例16: save
public function save()
{
if (!empty($_POST)) {
$this->config->ldap->host = $this->post->ldapHost;
$this->config->ldap->version = $this->post->ldapVersion;
$this->config->ldap->bindDN = $this->post->ldapBindDN;
$this->config->ldap->bindPWD = $this->post->ldapPassword;
$this->config->ldap->baseDN = $this->post->ldapBaseDN;
$this->config->ldap->searchFilter = $this->post->ldapFilter;
$this->config->ldap->uid = $this->post->ldapAttr;
$this->config->ldap->mail = $this->post->ldapMail;
// 此处我们把配置写入配置文件
$ldapConfig = "<?php \n" . "\$config->ldap = new stdclass();\n" . "\$config->ldap->host = '{$this->post->ldapHost}';\n" . "\$config->ldap->version = '{$this->post->ldapVersion}';\n" . "\$config->ldap->bindDN = '{$this->post->ldapBindDN}';\n" . "\$config->ldap->bindPWD = '{$this->post->ldapPassword}';\n" . "\$config->ldap->baseDN = '{$this->post->ldapBaseDN}';\n" . "\$config->ldap->searchFilter = '{$this->post->ldapFilter}';\n" . "\$config->ldap->uid = '{$this->post->ldapAttr}';\n" . "\$config->ldap->mail = '{$this->post->ldapMail}';\n" . "\$config->ldap->name = '{$this->post->ldapName}';\n";
$file = fopen("config.php", "w") or die("Unable to open file!");
fwrite($file, $ldapConfig);
fclose($file);
$this->locate(inlink('setting'));
}
}
开发者ID:TigerLau1985,项目名称:ZenTao_LDAP,代码行数:19,代码来源:control.php
示例17: setBasic
/**
* set site basic info.
*
* @access public
* @return void
*/
public function setBasic()
{
$allowedTags = $this->app->user->admin == 'super' ? $this->config->allowedTags->admin : $this->config->allowedTags->front;
if (!empty($_POST)) {
$setting = fixer::input('post')->stripTags('meta', $allowedTags)->stripTags('tongji', $allowedTags)->join('modules', ',')->remove('allowedFiles')->setDefault('modules', '')->stripTags('pauseTip', $allowedTags)->remove('uid,lang,cn2tw,defaultLang,requestType')->get();
if (strpos($setting->modules, 'shop') !== false && strpos($setting->modules, 'user') === false) {
$setting->modules = 'user,' . $setting->modules;
}
if ($setting->modules == 'initial') {
unset($setting->modules);
}
$result = $this->loadModel('setting')->setItems('system.common.site', $setting);
if (!$result) {
$this->send(array('result' => 'fail', 'message' => $this->lang->fail));
}
/* Set global settings. */
$globalSetting = new stdclass();
if ($this->post->lang) {
$globalSetting->lang = join(',', $this->post->lang);
$globalSetting->cn2tw = join('', $this->post->cn2tw);
$globalSetting->defaultLang = $this->post->defaultLang;
}
if ($this->post->requestType) {
$globalSetting->requestType = $this->post->requestType;
}
$result = $this->loadModel('setting')->setItems('system.common.site', $globalSetting, 'all');
if (!$result) {
$this->send(array('result' => 'fail', 'message' => $this->lang->fail));
}
/* Switch to desktop device if mobile template closed. */
if ($setting->mobileTemplate == 'close') {
$this->session->set('device', 'desktop');
}
$this->send(array('result' => 'success', 'message' => $this->lang->setSuccess, 'locate' => inlink('setbasic')));
}
$this->view->title = $this->lang->site->common;
$this->display();
}
开发者ID:easysoft,项目名称:chanzhi_extension,代码行数:44,代码来源:setbasic.php
示例18: 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()));
}
$files = $this->loadModel('file')->saveUpload('build', $buildID);
if ($changes or $files) {
$fileAction = '';
if (!empty($files)) {
$fileAction = $this->lang->addFiles . join(',', $files) . "\n";
}
$actionID = $this->loadModel('action')->create('build', $buildID, 'Edited', $fileAction);
if (!empty($changes)) {
$this->action->logHistory($actionID, $changes);
}
}
die(js::locate(inlink('view', "buildID={$buildID}"), 'parent'));
}
$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';
/* Assign. */
$project = $this->loadModel('project')->getById($build->project);
$this->view->title = $project->name . $this->lang->colon . $this->lang->build->edit;
$this->view->position[] = html::a($this->createLink('project', 'task', "projectID={$build->project}"), $project->name);
$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->orderBy = $orderBy;
$this->display();
}
开发者ID:fanscky,项目名称:HTPMS,代码行数:44,代码来源:control.php
示例19: setUpload
/**
* Set upload configures.
*
* @access public
* @return void
*/
public function setUpload()
{
if (!empty($_POST)) {
$setting = fixer::input('post')->remove('allowedFiles')->setDefault('allowUpload', '0')->get();
$dangers = explode(',', $this->config->file->dangers);
$allowedFiles = trim(strtolower($this->post->allowedFiles), ',');
$allowedFiles = str_replace($dangers, '', $allowedFiles);
$allowedFiles = seo::unify($allowedFiles, ',');
$allowedFiles = ',' . $allowedFiles . ',';
$fileConfig = array('allowed' => $allowedFiles);
$this->loadModel('setting')->setItems('system.common.file', $fileConfig);
$result = $this->loadModel('setting')->setItems('system.common.site', $setting);
$cache = $this->loadModel('cache')->createConfigCache();
if (!$cache) {
$this->send(array('result' => 'fail', 'message' => sprintf($this->lang->error->noWritable, $this->app->getTmpRoot() . 'cache')));
}
if ($result) {
$this->send(array('result' => 'success', 'message' => $this->lang->setSuccess, 'locate' => inlink('setupload')));
}
$this->send(array('result' => 'fail', 'message' => $this->lang->fail));
}
$this->view->title = $this->lang->site->setBasic;
$this->display();
}
开发者ID:mustafakarali,项目名称:b2c-1,代码行数:30,代码来源:control.php
示例20: edit
public function edit($projectID)
{
// echo "edit";
if (!empty($_POST)) {
$changes = $this->project->update($projectID);
$this->project->updateProducts($projectID);
if (dao::isError()) {
die(js::error(dao::getError()));
}
if ($changes) {
$actionID = $this->loadModel('action')->create('project', $projectID, 'edited');
$this->action->logHistory($actionID, $changes);
}
if (isonlybody()) {
die(js::closeModal('parent.parent'));
}
die(js::locate(inlink('view', "projectID={$projectID}"), 'parent'));
}
/* Judge a private todo or not, If private, die. */
/* Set menu. */
$this->project->setMenu($this->projects, $projectID);
$projects = array('' => '') + $this->projects;
$project = $this->project->getById($projectID);
$managers = $this->project->getDefaultManagers($projectID);
if ($project->private and $this->app->user->account != $project->account) {
die('private');
}
/* Remove current project from the projects. */
unset($projects[$projectID]);
$title = $this->lang->project->edit . $this->lang->colon . $project->name;
$position[] = html::a($browseProjectLink, $project->name);
$position[] = $this->lang->project->edit;
$allProducts = $this->loadModel('product')->getPairs('noclosed|nocode');
$linkedProducts = $this->project->getProducts($project->id);
$allProducts += $linkedProducts;
$linkedProducts = join(',', array_keys($linkedProducts));
$this->view->title = $title;
$this->view->position = $position;
$this->view->projects = $projects;
$this->view->project = $project;
$this->view->poUsers = $this->loadModel('user')->getPairs('noclosed,nodeleted,pofirst', $project->PO);
$this->view->pmUsers = $this->user->getPairs('noclosed,nodeleted,pmfirst', $project->PM);
$this->view->qdUsers = $this->user->getPairs('noclosed,nodeleted,qdfirst', $project->QD);
$this->view->rdUsers = $this->user->getPairs('noclosed,nodeleted,devfirst', $project->RD);
$this->view->groups = $this->loadModel('group')->getPairs();
$this->view->allProducts = $allProducts;
$this->view->linkedProducts = $linkedProducts;
$this->display();
}
开发者ID:XMGmen,项目名称:zentao,代码行数:49,代码来源:control.php
注:本文中的inlink函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论