本文整理汇总了PHP中_taskLink函数的典型用法代码示例。如果您正苦于以下问题:PHP _taskLink函数的具体用法?PHP _taskLink怎么用?PHP _taskLink使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_taskLink函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: licenseDocumentForm
function licenseDocumentForm(&$links, &$paths, &$data, $inline = 0)
{
$action = _taskLink('license_result', JRequest::getInt('gid', 0), array('bid' => $data->id));
ob_start();
?>
<form action="<?php
echo DOCMAN_Compat::sefRelToAbs($action);
?>
" method="POST" enctype="multipart/form-data">
<input type="hidden" name="inline" value="<?php
echo $inline;
?>
" />
<input type="radio" name="agree" value="0" checked /><?php
echo _DML_DONT_AGREE;
?>
<input type="radio" name="agree" value="1" /><?php
echo _DML_AGREE;
?>
<br /><br />
<input name="submit" value="<?php
echo _DML_PROCEED;
?>
" type="submit" />
</form>
<?php
$html = ob_get_contents();
ob_end_clean();
return $html;
}
示例2: fetchMethodForm
function fetchMethodForm($uid, $step, $update = false)
{
global $task;
switch ($step) {
case 2:
$lists = array();
$lists['action'] = _taskLink($task, $uid, array('step' => $step + 1), false);
return HTML_DMUploadMethod::linkFileForm($lists);
break;
case 3:
$url = stripslashes(JRequest::getString('url', 'http://'));
$err = DMUploadMethod::linkFileProcess($uid, $step, $url);
if ($err['_error']) {
_returnTo($task, $err['_errmsg'], '', array("method" => 'link', "step" => $step - 1, "localfile" => '', "url" => DOCMAN_Utils::safeEncodeURL($url)));
}
$uploaded = DOCMAN_Utils::safeEncodeURL(_DM_DOCUMENT_LINK . $url);
$catid = $update ? 0 : $uid;
$docid = $update ? $uid : 0;
$session = JFactory::getSession();
$session->set('docman.dmfilename', _DM_DOCUMENT_LINK);
$session->set('docman.document_url', $url);
return fetchEditDocumentForm($docid, $uploaded, $catid);
break;
default:
break;
}
return true;
}
示例3: fetchMethodForm
function fetchMethodForm($uid, $step, $update)
{
global $task;
switch ($step) {
case 2:
$lists = array();
$lists['action'] = _taskLink($task, $uid, array('step' => $step + 1), false);
return HTML_DMUploadMethod::uploadFileForm($lists);
break;
case 3:
//upload file
$file = JRequest::getVar('upload', array(), 'files', 'array');
$err = DMUploadMethod::uploadFileProcess($uid, $step, $file);
if ($err['_error']) {
_returnTo($task, $err['_errmsg'], '', array('step' => $step - 1, 'method' => 'http'));
}
$catid = $update ? 0 : $uid;
$docid = $update ? $uid : 0;
$session = JFactory::getSession();
$session->set('docman.dmfilename', $file->name);
$session->set('docman.document_url', null);
return fetchEditDocumentForm($docid, $file->name, $catid);
break;
default:
break;
}
return true;
}
示例4: fetchMethodForm
function fetchMethodForm($uid, $step, $update)
{
global $task;
switch ($step) {
case 2:
$lists = array();
$lists['action'] = _taskLink($task, $uid, array('step' => $step + 1), false);
return HTML_DMUploadMethod::uploadFileForm($lists);
break;
case 3:
//upload file
//$file = mosGetParam(DOCMAN_Utils::stripslashes($_FILES), 'upload');
$file_upload = mosGetParam($_FILES, 'upload');
$err = DMUploadMethod::uploadFileProcess($uid, $step, $file);
if ($err['_error']) {
_returnTo($task, $err['_errmsg'], '', array('step' => $step - 1, 'method' => 'http'));
}
$catid = $update ? 0 : $uid;
$docid = $update ? $uid : 0;
return fetchEditDocumentForm($docid, $file->name, $catid);
break;
default:
break;
}
return true;
}
示例5: fetchMethodForm
function fetchMethodForm($uid, $step, $update = false)
{
global $task;
switch ($step) {
case 2:
$lists = array();
$lists['action'] = _taskLink($task, $uid, array('step' => $step + 1), false);
$lists['url'] = '';
$lists['localfile'] = '';
return HTML_DMUploadMethod::transferFileForm($lists);
break;
case 3:
$url = stripslashes(mosGetParam($_REQUEST, 'url', 'http://'));
$file = stripslashes(mosGetParam($_REQUEST, 'localfile', ''));
$err = DMUploadMethod::transferFileProcess($uid, $step, $url, $file);
if ($err['_error']) {
_returnTo($task, $err['_errmsg'], '', array("method" => 'transfer', "step" => $step - 1, "localfile" => $file, "url" => DOCMAN_Utils::safeEncodeURL($url)));
}
$catid = $update ? 0 : $uid;
$docid = $update ? $uid : 0;
return fetchEditDocumentForm($docid, $file->name, $catid);
break;
default:
break;
}
return true;
}
示例6: updateDocumentForm
function updateDocumentForm($list, $links, $paths, $data)
{
$action = _taskLink('doc_update_process', $data->id);
ob_start();
?>
<form action="<?php
echo sefRelToAbs($action);
?>
" method="post" enctype="multipart/form-data" id="dm_frmupdate" class="dm_form" >
<fieldset class="input">
<p>
<label for="upload"><?php
echo _DML_SELECTFILE;
?>
</label><br />
<input id="upload" name="upload" type="file" />
</p>
</fieldset>
<fieldset class="dm_button">
<p>
<input name="submit" class="button" value="<?php
echo _DML_UPLOAD;
?>
" type="submit" />
</p>
</fieldset>
<?php
echo DOCMAN_token::render();
?>
</form>
<?php
$html = ob_get_contents();
ob_end_clean();
return $html;
}
示例7: fetchMethodsForm
function fetchMethodsForm($uid, $step, $method)
{
global $task;
// Prompt with a list of upload methods
$lists = array();
$lists['methods'] = dmHTML::uploadSelectList();
$lists['action'] = _taskLink($task, $uid, array('step' => $step + 1), false);
return HTML_DMUpload::uploadMethodsForm($lists);
}
示例8: fetchDocumentList
function fetchDocumentList($catid)
{
global $_DOCMAN, $_DMUSER, $ordering, $direction, $limit, $limitstart;
if (!$catid) {
return;
}
$rows = DOCMAN_Docs::getDocsByUserAccess($catid, $ordering, $direction, $limit, $limitstart);
if (!is_array($rows)) {
$rows = array();
}
$params = array('limit' => $limit, 'limitstart' => $limitstart);
// create orderby object
$links = array();
$links['name'] = _taskLink('cat_view', $catid, array_merge($params, array('order' => 'name', 'dir' => $direction)));
$links['date'] = _taskLink('cat_view', $catid, array_merge($params, array('order' => 'date', 'dir' => $direction)));
$links['hits'] = _taskLink('cat_view', $catid, array_merge($params, array('order' => 'hits', 'dir' => $direction)));
if ($direction == 'ASC') {
$links['dir'] = _taskLink('cat_view', $catid, array_merge($params, array('order' => $ordering, 'dir' => 'DESC')));
} else {
$links['dir'] = _taskLink('cat_view', $catid, array_merge($params, array('order' => $ordering, 'dir' => 'ASC')));
}
//set pathway information
$pathway = new StdClass();
$pathway->links = $links;
//set order information
$order = new StdClass();
$order->links = $links;
$order->direction = $direction;
$order->orderby = $ordering;
$order->limit = $limit;
$order->limitstart = $limitstart;
$items = array();
foreach ($rows as $row) {
// onFetchDocument event, type = list
$bot = new DOCMAN_mambot('onFetchDocument');
$bot->setParm('id', $row->id);
$bot->copyParm('type', 'list');
$bot->trigger();
if ($bot->getError()) {
_returnTo('cat_view', $bot->getErrorMsg());
}
// load doc
$doc =& DOCMAN_Document::getInstance($row->id);
// process content mambots
DOCMAN_Utils::processContentBots($doc, 'dmdescription');
$item = new StdClass();
$item->buttons =& $doc->getLinkObject();
$item->paths =& $doc->getPathObject();
$item->data =& $doc->getDataObject();
$items[] = $item;
}
return HTML_DMDocuments::displayDocumentList($order, $items);
}
示例9: searchForm
function searchForm(&$lists, $search_phrase)
{
global $_DOCMAN;
$action = _taskLink('search_result');
ob_start();
?>
<fieldset class="input">
<table width="100%" class="contentpaneopen">
<form action="<?php
echo JRoute::_($action);
?>
" method="post" name="adminForm" id="dm_frmsearch" class="dm_searchform">
<tr height="30px">
<td nowrap="nowrap" width="150px">
<label for="search_phrase"><?php
echo _DML_PROMPT_KEYWORD;
?>
</label>:
</td>
<td nowrap="nowrap" width="150px">
<input type="text" class="inputbox" id="search_phrase" name="search_phrase" value="<?php
echo htmlspecialchars(stripslashes($search_phrase), ENT_QUOTES);
?>
" />
</td>
<td nowrap="nowrap">
</td>
</tr>
<!-- <tr height="30px">
<td nowrap="nowrap">
<label for="catid"><?php
//echo _DML_SELECCAT;
?>
</label>:
</td>
<td nowrap="nowrap">
<?php
//echo $lists['catid'] ;
?>
</td>
<td nowrap="nowrap">
</td>
</tr> -->
<!--
<tr height="30px">
<td nowrap="nowrap">
<label for="ordering"><?php
//echo _DML_CMN_ORDERING;
?>
</label>:
</td>
<td nowrap="nowrap">
<?php
//echo $lists['ordering'] ;
?>
</td>
<td nowrap="nowrap">
<?php
//echo $lists['reverse_order'] . _DML_SEARCH_REVRS;
?>
</td>
</tr>
<tr height="30px">
<td nowrap="nowrap">
<label for="search_mode"><?php
//echo _DML_SEARCH_MODE;
?>
</label>:
</td>
<td>
<?php
//echo $lists['search_mode']
?>
</td>
<td>
<?php
//echo $lists['invert_search'] . _DML_NOT ;
?>
</td>
</tr>
<tr height="30px">
<td nowrap="nowrap">
<label for="search_where"><?php
//echo _DML_SEARCH_WHERE;
?>
</label>:
</td>
<td>
<?php
//echo $lists['search_where'] ;
?>
</td>
<td nowrap="nowrap">
</td>
</tr>
<tr height="30px">
<td nowrap="nowrap">
</td>
<td>
<input type="submit" class="button" value="<?php
//.........这里部分代码省略.........
示例10: moveDocumentForm
function moveDocumentForm($lists, $links, $paths, $data)
{
$action = _taskLink('doc_move_process', $data->id);
ob_start();
?>
<form action="<?php
echo DOCMAN_Compat::sefRelToAbs($action);
?>
" method="post" id="dm_frmmove" class="dm_form" >
<fieldset class="dm_adminform">
<table class="dm_admintable">
<tr>
<td class="dm_key">
<label for="name"><?php
echo _DML_DOC;
?>
</label>
</td>
<td>
<span id="name"><?php
echo $data->dmname;
?>
(<?php
echo $data->filename;
?>
)</span>
</td>
</tr>
<tr>
<td class="dm_key">
<label for="catid"><?php
echo _DML_MOVETO;
?>
</label>
</td>
<td>
<?php
echo $lists['categories'];
?>
</td>
</tr>
</table>
</fieldset>
<fieldset class="dm_button">
<p>
<input name="submit" class="button" value="<?php
echo _DML_MOVETHEFILES;
?>
" type="submit" />
</p>
</fieldset>
<?php
echo DOCMAN_token::render();
?>
</form>
<?php
$html = ob_get_contents();
ob_end_clean();
return $html;
}
示例11: fetchMenu
function fetchMenu($gid = 0)
{
global $_DOCMAN, $_DMUSER;
$task = JRequest::getCmd('task');
if ($gid && in_array($task, array('doc_details', 'doc_edit'))) {
$gid = 0;
}
// create links
$links = new StdClass();
$links->home = _taskLink(null);
$links->search = _taskLink('search_form');
$links->upload = _taskLink('upload', $gid);
// create perms
$perms = new StdClass();
$perms->view = DM_TPL_AUTHORIZED;
$perms->search = DM_TPL_AUTHORIZED;
$perms->upload = DM_TPL_NOT_AUTHORIZED;
if ($_DMUSER->canUpload()) {
$perms->upload = DM_TPL_AUTHORIZED;
} else {
if ($_DMUSER->userid == 0 && $_DOCMAN->getCfg('user_upload') != -1) {
$perms->upload = DM_TPL_NOT_LOGGED_IN;
}
}
return HTML_docman::fetchMenu($links, $perms);
}
示例12: fetchMenu
function fetchMenu($gid = 0)
{
global $_DOCMAN, $_DMUSER;
// create links
$links = new StdClass();
$links->home = _taskLink(null);
$links->search = _taskLink('search_form');
$links->upload = _taskLink('upload', $gid);
// create perms
$perms = new StdClass();
$perms->view = DM_TPL_AUTHORIZED;
$perms->search = DM_TPL_AUTHORIZED;
$perms->upload = DM_TPL_NOT_AUTHORIZED;
if ($_DMUSER->canUpload()) {
$perms->upload = DM_TPL_AUTHORIZED;
} else {
if ($_DMUSER->userid == 0 && $_DOCMAN->getCfg('user_upload') != -1) {
$perms->upload = DM_TPL_NOT_LOGGED_IN;
}
}
return HTML_docman::fetchMenu($links, $perms);
}
示例13: searchForm
function searchForm(&$lists, $search_phrase)
{
global $_DOCMAN;
$action = _taskLink('search_result');
ob_start();
?>
<form action="<?php
echo $action;
?>
" method="post" name="adminForm" id="dm_frmsearch" class="dm_form">
<fieldset class="input">
<p>
<label for="catid"><?php
echo _DML_SELECCAT;
?>
</label><br />
<?php
echo $lists['catid'];
?>
</p>
<p>
<label for="search_phrase"><?php
echo _DML_PROMPT_KEYWORD;
?>
</label><br />
<input type="text" class="inputbox" id="search_phrase" name="search_phrase" value="<?php
echo htmlspecialchars(stripslashes($search_phrase), ENT_QUOTES);
?>
" />
</p>
<p>
<label for="search_mode"><?php
echo _DML_SEARCH_MODE;
?>
</label><br />
<?php
echo $lists['invert_search'] . _DML_NOT;
echo ' ' . $lists['search_mode'];
?>
</p>
<p>
<label for="ordering"><?php
echo _DML_CMN_ORDERING;
?>
</label><br />
<?php
echo $lists['ordering'];
echo " " . _DML_SEARCH_REVRS . ":" . $lists['reverse_order'];
?>
</p>
<p>
<label for="search_where"><?php
echo _DML_SEARCH_WHERE;
?>
</label><br />
<?php
echo $lists['search_where'];
?>
</p>
</fieldset>
<fieldset class="dm_button">
<p>
<input type="submit" class="button" value="<?php
echo _DML_SEARCH;
?>
" />
</p>
</fieldset>
</form>
<?php
$html = ob_get_contents();
ob_end_clean();
return $html;
}