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


PHP Get::val方法代码示例

本文整理汇总了PHP中Get::val方法的典型用法代码示例。如果您正苦于以下问题:PHP Get::val方法的具体用法?PHP Get::val怎么用?PHP Get::val使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Get的用法示例。


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

示例1: tpl_list_heading

function tpl_list_heading($colname, $format = "<th%s>%s</th>")
{
    global $proj, $page;
    $imgbase = '<img src="%s" alt="%s" />';
    $class = '';
    $html = eL($colname);
    if ($colname == 'comments' || $colname == 'attachments') {
        $html = sprintf($imgbase, $page->get_image(substr($colname, 0, -1)), $html);
    }
    if (Get::val('order') == $colname) {
        $class = ' class="orderby"';
        $sort1 = Get::safe('sort', 'desc') == 'desc' ? 'asc' : 'desc';
        $sort2 = Get::safe('sort2', 'desc');
        $order2 = Get::safe('order2');
        $html .= '&nbsp;&nbsp;' . sprintf($imgbase, $page->get_image(Get::val('sort')), Get::safe('sort'));
    } else {
        $sort1 = 'desc';
        if (in_array($colname, array('project', 'tasktype', 'category', 'openedby', 'assignedto'))) {
            $sort1 = 'asc';
        }
        $sort2 = Get::safe('sort', 'desc');
        $order2 = Get::safe('order');
    }
    $new_order = array('order' => $colname, 'sort' => $sort1, 'order2' => $order2, 'sort2' => $sort2);
    $html = sprintf('<a title="%s" href="%s">%s</a>', eL('sortthiscolumn'), Filters::noXSS(CreateURL('index', $proj->id, null, array_merge($_GET, $new_order))), $html);
    return sprintf($format, $class, $html);
}
开发者ID:xcdam,项目名称:flyspray,代码行数:27,代码来源:index.php

示例2: show

 function show()
 {
     global $page, $db, $user, $fs, $proj;
     $page->setTitle($fs->prefs['page_title'] . L('reports'));
     $events = array(1 => L('taskopened'), 13 => L('taskreopened'), 2 => L('taskclosed'), 3 => L('taskedited'), 14 => L('assignmentchanged'), 29 => L('events.useraddedtoassignees'), 4 => L('commentadded'), 5 => L('commentedited'), 6 => L('commentdeleted'), 7 => L('attachmentadded'), 8 => L('attachmentdeleted'), 11 => L('relatedadded'), 12 => L('relateddeleted'), 9 => L('notificationadded'), 10 => L('notificationdeleted'), 17 => L('reminderadded'), 18 => L('reminderdeleted'));
     $user_events = array(30 => L('created'), 31 => L('deleted'));
     $page->assign('events', $events);
     $page->assign('user_events', $user_events);
     $sort = strtoupper(Get::enum('sort', array('desc', 'asc')));
     $where = array();
     $params = array();
     $orderby = '';
     switch (Get::val('order')) {
         case 'type':
             $orderby = "h.event_type {$sort}, h.event_date {$sort}";
             break;
         case 'user':
             $orderby = "user_id {$sort}, h.event_date {$sort}";
             break;
         case 'date':
         default:
             $orderby = "h.event_date {$sort}, h.event_type {$sort}";
     }
     foreach (Get::val('events', array()) as $eventtype) {
         $where[] = 'h.event_type = ?';
         $params[] = $eventtype;
     }
     $where = '(' . implode(' OR ', $where) . ')';
     if ($proj->id) {
         $where = $where . 'AND (t.project_id = ?  OR h.event_type > 29) ';
         $params[] = $proj->id;
     }
     if (($fromdate = Req::val('fromdate')) || Req::val('todate')) {
         $where .= ' AND ';
         $todate = Req::val('todate');
         if ($fromdate) {
             $where .= ' h.event_date > ?';
             $params[] = Flyspray::strtotime($fromdate) + 0;
         }
         if ($todate && $fromdate) {
             $where .= ' AND h.event_date < ?';
             $params[] = Flyspray::strtotime($todate) + 86400;
         } else {
             if ($todate) {
                 $where .= ' h.event_date < ?';
                 $params[] = Flyspray::strtotime($todate) + 86400;
             }
         }
     }
     $histories = array();
     if (count(Get::val('events'))) {
         if (Get::num('event_number') > 0) {
             $db->setLimit(Get::num('event_number'));
         }
         $histories = $db->x->getAll("SELECT h.*, t.*, p.project_prefix\n                                             FROM {history} h\n                                        LEFT JOIN {tasks} t ON h.task_id = t.task_id\n                                        LEFT JOIN {projects} p ON t.project_id = p.project_id\n                                            WHERE {$where}\n                                         ORDER BY {$orderby}", null, $params);
     }
     $page->assign('histories', $histories);
     $page->assign('sort', $sort);
     $page->pushTpl('reports.tpl');
 }
开发者ID:negram,项目名称:flyspray,代码行数:60,代码来源:reports.php

示例3: show

 function show()
 {
     global $page, $db, $fs, $proj, $user;
     $page->setTitle($fs->prefs['page_title'] . L('roadmap'));
     // Get milestones
     $list_id = $db->x->GetOne('SELECT list_id FROM {fields} WHERE field_id = ?', null, $proj->prefs['roadmap_field']);
     $milestones = array();
     if ($list_id) {
         $milestones = $db->x->getAll('SELECT list_item_id AS version_id, item_name AS version_name
                                         FROM {list_items} li
                                        WHERE list_id = ? AND version_tense = 3
                                     ORDER BY list_position ASC', null, $list_id);
     }
     $data = array();
     foreach ($milestones as $row) {
         // Get all tasks related to a milestone
         $all_tasks = $db->x->getAll('SELECT  percent_complete, is_closed, t.*
                                    FROM  {tasks} t
                               LEFT JOIN  {field_values} fv ON (fv.task_id = t.task_id AND field_id = ?)
                                   WHERE  field_value = ? AND project_id = ?', null, array($proj->prefs['roadmap_field'], $row['version_id'], $proj->id));
         $all_tasks = array_filter($all_tasks, array($user, 'can_view_task'));
         $percent_complete = 0;
         foreach ($all_tasks as $task) {
             if ($task['is_closed']) {
                 $percent_complete += 100;
             } else {
                 $percent_complete += $task['percent_complete'];
             }
         }
         $percent_complete = round($percent_complete / max(count($all_tasks), 1));
         if (count($all_tasks)) {
             $tasks = $db->x->getAll('SELECT t.task_id, item_summary, detailed_desc, mark_private, fs.field_value AS field' . $fs->prefs['color_field'] . ',
                                           opened_by, content, task_token, t.project_id, prefix_id
                                    FROM {tasks} t
                               LEFT JOIN {cache} ca ON (t.task_id = ca.topic AND ca.type = ? AND t.last_edited_time <= ca.last_updated)
                               LEFT JOIN {field_values} f ON f.task_id = t.task_id
                               LEFT JOIN {field_values} fs ON (fs.task_id = t.task_id AND fs.field_id = ?)
                                   WHERE f.field_value = ? AND f.field_id = ? AND t.project_id = ? AND is_closed = 0', null, array('rota', $fs->prefs['color_field'], $row['version_id'], $proj->prefs['roadmap_field'], $proj->id));
             $count = count($tasks);
             for ($i = 0; $i < $count; $i++) {
                 if (!$user->can_view_task($tasks[$i])) {
                     unset($tasks[$i]);
                 }
             }
         }
         $data[] = array('id' => $row['version_id'], 'open_tasks' => isset($tasks) ? $tasks : array(), 'percent_complete' => $percent_complete, 'all_tasks' => $all_tasks ? $all_tasks : array(), 'name' => $row['version_name']);
         unset($tasks);
     }
     if (Get::val('txt')) {
         $page = new FSTpl();
         header('Content-Type: text/plain; charset=UTF-8');
         $page->assign('data', $data);
         $page->display('roadmap.text.tpl');
         exit;
     } else {
         $page->assign('data', $data);
         $page->pushTpl('roadmap.tpl');
     }
 }
开发者ID:negram,项目名称:flyspray,代码行数:59,代码来源:roadmap.php

示例4: render

 static function render($text, $type = null, $id = null, $instructions = null)
 {
     global $conf, $baseurl, $db;
     // Unfortunately dokuwiki also uses $conf
     $fs_conf = $conf;
     $conf = array();
     // Dokuwiki generates some notices
     error_reporting(E_ALL ^ E_NOTICE);
     if (!$instructions) {
         include_once BASEDIR . '/plugins/dokuwiki/inc/parser/parser.php';
     }
     require_once BASEDIR . '/plugins/dokuwiki/inc/common.php';
     require_once BASEDIR . '/plugins/dokuwiki/inc/parser/xhtml.php';
     // Create a renderer
     $Renderer = new Doku_Renderer_XHTML();
     if (!is_string($instructions) || strlen($instructions) < 1) {
         $modes = p_get_parsermodes();
         $Parser = new Doku_Parser();
         // Add the Handler
         $Parser->Handler = new Doku_Handler();
         // Add modes to parser
         foreach ($modes as $mode) {
             $Parser->addMode($mode['mode'], $mode['obj']);
         }
         $instructions = $Parser->parse($text);
         // Cache the parsed text
         if (!is_null($type) && !is_null($id)) {
             $fields = array('content' => serialize($instructions), 'type' => $type, 'topic' => $id, 'last_updated' => time());
             $keys = array('type', 'topic');
             //autoquote is always true on db class
             $db->Replace('{cache}', $fields, $keys);
         }
     } else {
         $instructions = unserialize($instructions);
     }
     $Renderer->smileys = getSmileys();
     $Renderer->entities = getEntities();
     $Renderer->acronyms = getAcronyms();
     $Renderer->interwiki = getInterwiki();
     $conf = $fs_conf;
     $conf['cachedir'] = FS_CACHE_DIR;
     // for dokuwiki
     $conf['fperm'] = 0600;
     $conf['dperm'] = 0700;
     // Loop through the instructions
     foreach ($instructions as $instruction) {
         // Execute the callback against the Renderer
         call_user_func_array(array(&$Renderer, $instruction[0]), $instruction[1]);
     }
     $return = $Renderer->doc;
     // Display the output
     if (Get::val('histring')) {
         $words = explode(' ', Get::val('histring'));
         foreach ($words as $word) {
             $return = html_hilight($return, $word);
         }
     }
     return $return;
 }
开发者ID:canneverbe,项目名称:flyspray,代码行数:59,代码来源:dokuwiki_formattext.inc.php

示例5: _onsubmit

 function _onsubmit()
 {
     global $proj;
     // only meant for global fields...
     if (!count(Get::val('ids', array()))) {
         return array(ERROR_RECOVER, L('notasksselected'), CreateUrl('index'));
     }
     $proj = new Project(0);
     $return = $this->handle('action', Req::val('action'));
     $proj = new Project(0);
     return $return;
 }
开发者ID:heptalium,项目名称:flyspray,代码行数:12,代码来源:edit.php

示例6: area_notes

 function area_notes()
 {
     global $user, $fs, $page, $db;
     $page->assign('saved_notes', $db->x->getAll('SELECT * FROM {notes} WHERE user_id = ?', null, $user->id));
     if (Req::num('note_id') && Get::val('action') != 'deletenote') {
         $note = $db->x->getRow('SELECT note_id, message_subject, message_body, n.last_updated, content, n.syntax_plugins
                                FROM {notes} n
                           LEFT JOIN {cache} c ON note_id = topic AND type = ? AND n.last_updated < c.last_updated
                               WHERE user_id = ? AND note_id = ?', null, array('note', $user->id, Req::num('note_id')));
         $page->assign('show_note', $note);
     }
 }
开发者ID:negram,项目名称:flyspray,代码行数:12,代码来源:myprofile.php

示例7: show

 function show($area = null)
 {
     global $page, $fs, $db, $proj, $user, $conf;
     $perpage = '20';
     if (isset($user->infos['tasks_perpage'])) {
         $perpage = $user->infos['tasks_perpage'];
     }
     $pagenum = max(1, Get::num('pagenum', 1));
     $offset = $perpage * ($pagenum - 1);
     // Get the visibility state of all columns
     $visible = explode(' ', trim($proj->id ? $proj->prefs['visible_columns'] : $fs->prefs['visible_columns']));
     if (!is_array($visible) || !count($visible) || !$visible[0]) {
         $visible = array('id');
     }
     list($tasks, $id_list) = Backend::get_task_list($_GET, $visible, $offset, $perpage);
     $page->assign('tasks', $tasks);
     $page->assign('offset', $offset);
     $page->assign('perpage', $perpage);
     $page->assign('pagenum', $pagenum);
     $page->assign('visible', $visible);
     // List of task IDs for next/previous links
     $_SESSION['tasklist'] = $id_list;
     $page->assign('total', count($id_list));
     // Javascript replacement
     if (Get::val('toggleadvanced')) {
         $advanced_search = intval(!Req::val('advancedsearch'));
         Flyspray::setCookie('advancedsearch', $advanced_search, time() + 60 * 60 * 24 * 30);
         $_COOKIE['advancedsearch'] = $advanced_search;
     }
     // Update check {{{
     if (Get::has('hideupdatemsg')) {
         unset($_SESSION['latest_version']);
     } else {
         if ($conf['general']['update_check'] && $user->perms('is_admin') && $fs->prefs['last_update_check'] < time() - 60 * 60 * 24 * 3) {
             if (!isset($_SESSION['latest_version'])) {
                 $latest = Flyspray::remote_request('http://flyspray.org/version.txt', GET_CONTENTS);
                 //if for some silly reason we get and empty response, we use the actual version
                 $_SESSION['latest_version'] = empty($latest) ? $fs->version : $latest;
                 $db->x->execParam('UPDATE {prefs} SET pref_value = ? WHERE pref_name = ?', array(time(), 'last_update_check'));
             }
         }
     }
     if (isset($_SESSION['latest_version']) && version_compare($fs->version, $_SESSION['latest_version'], '<')) {
         $page->assign('updatemsg', true);
     }
     // }}}
     $page->setTitle($fs->prefs['page_title'] . $proj->prefs['project_title'] . ': ' . L('tasklist'));
     $page->pushTpl('index.tpl');
 }
开发者ID:negram,项目名称:flyspray,代码行数:49,代码来源:index.php

示例8: show

 function show()
 {
     global $page, $db, $fs, $proj, $user;
     $page->setTitle($fs->prefs['page_title'] . L('changelog'));
     // Get milestones
     $list_id = $db->x->GetOne('SELECT list_id FROM {fields} WHERE field_id = ?', null, $proj->prefs['roadmap_field']);
     if (!$list_id) {
         trigger_error('Roadmap / changelog has not been configured in the project management area.', E_USER_ERROR);
     }
     $milestones = $db->x->getAll('SELECT list_item_id AS version_id, item_name AS version_name
                                 FROM {list_items} li
                                WHERE list_id = ? AND (version_tense = 1 OR version_tense = 2) AND show_in_list = 1
                             ORDER BY list_position ASC', null, $list_id);
     $data = array();
     $reasons = implode(',', explode(' ', $proj->prefs['changelog_reso']));
     while ((list(, $row) = each($milestones)) && $reasons) {
         $tasks = $db->x->getAll('SELECT t.task_id, percent_complete, item_summary, detailed_desc, mark_private, fs.field_value AS field' . $fs->prefs['color_field'] . ',
                                       opened_by, task_token, t.project_id, prefix_id, li.item_name AS res_name, li.list_item_id AS res_id
                                FROM {tasks} t
                           LEFT JOIN {field_values} f ON f.task_id = t.task_id
                           LEFT JOIN {field_values} fs ON (fs.task_id = t.task_id AND fs.field_id = ?)
                           LEFT JOIN {list_items} li ON t.resolution_reason = li.list_item_id
                               WHERE f.field_value = ? AND f.field_id = ? AND t.project_id = ? AND is_closed = 1
                                     AND t.resolution_reason IN (' . $reasons . ')
                            ORDER BY t.resolution_reason DESC', null, array($fs->prefs['color_field'], $row['version_id'], $proj->prefs['roadmap_field'], $proj->id));
         $tasks = array_filter($tasks, array($user, 'can_view_task'));
         if (count($tasks)) {
             $resolutions = array();
             foreach ($tasks as $task) {
                 $resolutions[$task['res_name']] = isset($resolutions[$task['res_name']]) ? $resolutions[$task['res_name']] + 1 : 1;
             }
             $data[] = array('tasks' => $tasks, 'name' => $row['version_name'], 'resolutions' => $resolutions);
         }
     }
     if (Get::val('txt')) {
         $page = new FSTpl();
         header('Content-Type: text/plain; charset=UTF-8');
         $page->assign('data', $data);
         $page->display('changelog.text.tpl');
         exit;
     } else {
         $page->assign('data', $data);
         $page->pushTpl('changelog.tpl');
     }
 }
开发者ID:negram,项目名称:flyspray,代码行数:45,代码来源:changelog.php

示例9: show

 /**
  * show 
  * 
  * @access public
  * @return void
  */
 function show()
 {
     global $proj, $page, $fs;
     // Get the visibility state of all columns
     $visible = explode(' ', trim($proj->id ? $proj->prefs['visible_columns'] : $fs->prefs['visible_columns']));
     list($tasks, $id_list) = Backend::get_task_list($_GET, $visible, 0);
     $page = new FSTpl();
     $page->assign('tasks', $tasks);
     $page->assign('visible', $visible);
     if (Get::val('type') == 'iCal') {
         $datecols = array('dateopened' => 'date_opened', 'lastedit' => 'max_date', 'dateclosed' => 'date_closed');
         header('Content-Type: text/calendar; charset=utf-8');
         header('Content-Disposition: filename="export.ics"');
         $page->assign('datecols', $datecols);
         $page->finish('icalexport.tpl');
     } else {
         header('Content-Type: text/csv; charset=utf-8');
         header('Content-Disposition: filename="export.csv"');
         $page->finish('csvexport.tpl');
     }
 }
开发者ID:negram,项目名称:flyspray,代码行数:27,代码来源:export.php

示例10: MessageListTable

    /**
     * @param PageBuilder $pageBuilder
     * @return MessageListTable
     */
    function MessageListTable(&$pagebuilder)
    {
        $this->_pagebuilder =& $pagebuilder;
        $this->_proc =& $pagebuilder->_proc;
        $this->sortField = Get::val('s_fld', 0);
        $this->sortOrder = Get::val('s_ord', 0);
        $this->page = $this->_proc->sArray[PAGE];
        $this->_proc->account->DefaultOrder = $this->sortField + $this->sortOrder;
        $this->folders =& $this->_proc->GetFolders();
        if (isset($this->_proc->sArray[SEARCH_ARRAY][S_TEXT]) && strlen($this->_proc->sArray[SEARCH_ARRAY][S_TEXT]) > 0) {
            if ($this->_proc->sArray[SEARCH_ARRAY][S_FOLDER] > -2) {
                $this->folder =& $this->folders->GetFolderById((int) $this->_proc->sArray[FOLDER_ID]);
                $this->_proc->processor->GetFolderInfo($this->folder);
                $this->folders =& new FolderCollection();
                $this->folders->Add($this->folder);
            } else {
                $this->folder = null;
            }
            $field = $this->_proc->sArray[SEARCH_ARRAY][S_MODE] == 'onlyheaders';
            $condition = ConvertUtils::ConvertEncoding($this->_proc->sArray[SEARCH_ARRAY][S_TEXT], $this->_proc->account->GetUserCharset(), $this->_proc->account->DbCharset);
            $this->messCount = (int) $this->_proc->processor->SearchMessagesCount($condition, $this->folders, $field);
            $this->messageCollection =& $this->_proc->processor->SearchMessages($this->page, $condition, $this->folders, $field, $this->messCount);
        } else {
            $cfolder =& $this->_proc->GetCurrentFolder();
            if ($cfolder) {
                $this->folder =& $cfolder;
                $this->messCount = (int) $this->folder->MessageCount;
                if ($this->_proc->account->MailsPerPage * ($this->page - 1) >= $this->messCount) {
                    $this->page = (int) ceil($this->messCount / $this->_proc->account->MailsPerPage);
                }
                $this->page = $this->page < 1 ? $this->page = 1 : $this->page;
                $this->messageCollection =& $this->_proc->processor->GetMessageHeaders($this->page, $this->folder);
            } else {
                $this->folder = null;
                $this->messCount = 0;
                $this->page = 1;
                $this->messageCollection =& new WebMailMessageCollection();
            }
        }
        if ($this->folder && $this->folders) {
            $this->folders->InitToFolder($this->folder);
        }
        if ($this->messageCollection === null) {
            $this->folder = null;
            $this->messCount = 0;
            $this->page = 1;
            $this->messageCollection =& new WebMailMessageCollection();
            SetOnlineError(PROC_CANT_GET_MSG_LIST);
        }
        $jsTempString = $this->_proc->currentFolder && $this->_proc->currentFolder->Type == FOLDERTYPE_Drafts ? 'BaseForm.Form.action = "' . BASEFILE . '?' . SCREEN . '=' . SCREEN_NEWOREDIT . '";' : 'BaseForm.Form.action = "' . BASEFILE . '?' . SCREEN . '=' . SCREEN_FULLSCREEN . '";';
        $flagjs = '
		var line = InboxLines.GetLinesById(id);
		if (line.Flagged) {
			InboxLines.SetParams([id], "Flagged", false, false);
		} else {
			InboxLines.SetParams([id], "Flagged", true, false);
		}
		DoFlagOneMessage(line);
';
        if ($this->_proc->account->MailProtocol != MAILPROTOCOL_IMAP4 && $this->_proc->currentFolder && $this->_proc->currentFolder->SyncType == FOLDERSYNC_DirectMode) {
            $flagjs = '';
        }
        $this->_pagebuilder->AddJSText('
		
function CheckThisLine(e, trobj)
{
	var id = trobj.id;

	e = e ? e : window.event;
	if (e.ctrlKey) {
		InboxLines.CheckCtrlLine(id);
	} else if (e.shiftKey) {
		InboxLines.CheckShiftLine(id);
	} else {
		if (Browser.Mozilla) {var elem = e.target;}
		else {var elem = e.srcElement;}
		
		if (!elem || id == "" || elem.id == "none") {
			return false;
		}
		
		var loverTag = elem.tagName.toLowerCase();
		
		if (loverTag == "a") {
			LoadMessageFull(id);
		} else if (loverTag == "input") {
			InboxLines.CheckCBox(id);
		} else if (loverTag == "img") {
			' . $flagjs . '
		} else if (isPreviewPane) {
			InboxLines.CheckLine(id);
			LoadMessage(id);
		}
	}
}		

//.........这里部分代码省略.........
开发者ID:diedsmiling,项目名称:busenika,代码行数:101,代码来源:class_center-box.php

示例11: header

// see http://www.w3.org/TR/html401/present/styles.html#h-14.2.1
header('Content-Style-Type: text/css');
header('Content-type: text/html; charset=utf-8');
if ($conf['general']['output_buffering'] == 'gzip' && extension_loaded('zlib')) {
    // Start Output Buffering and gzip encoding if setting is present.
    ob_start('ob_gzhandler');
} else {
    ob_start();
}
$page = new FSTpl();
// make sure people are not attempting to manually fiddle with projects they are not allowed to play with
if (Req::has('project') && Req::val('project') != 0 && !$user->can_view_project(Req::val('project'))) {
    Flyspray::show_error(L('nopermission'));
    exit;
}
if ($show_task = Get::val('show_task')) {
    // If someone used the 'show task' form, redirect them
    if (is_numeric($show_task)) {
        Flyspray::Redirect(CreateURL('details', $show_task));
    } else {
        Flyspray::Redirect($baseurl . '?string=' . $show_task);
    }
}
if (Flyspray::requestDuplicated()) {
    // Check that this page isn't being submitted twice
    Flyspray::show_error(3);
}
# handle all forms request that modify data
if (Req::has('action')) {
    # enforcing if the form sent the correct anti csrf token
    # only allow token by post
开发者ID:kandran,项目名称:flyspray,代码行数:31,代码来源:index.php

示例12: tpl_list_heading

function tpl_list_heading($colname, $format = "<th%s>%s</th>")
{
    global $proj, $page;
    $imgbase = '<img src="%s" alt="%s" />';
    $class = $colname;
    $html = eL($colname);
    /*
        if ($colname == 'comments' || $colname == 'attachments') {
            $html = sprintf($imgbase, $page->get_image(substr($colname, 0, -1)), $html);
        }
    */
    if ($colname == 'attachments') {
        $html = '<i class="fa fa-paperclip fa-lg" title="' . $html . '"></i>';
    }
    if ($colname == 'comments') {
        $html = '<i class="fa fa-comments fa-lg" title="' . $html . '"></i>';
    }
    if ($colname == 'votes') {
        $html = '<i class="fa fa-star-o fa-lg" title="' . $html . '"></i>';
    }
    if (Get::val('order') == $colname) {
        $class .= ' orderby';
        $sort1 = Get::safe('sort', 'desc') == 'desc' ? 'asc' : 'desc';
        $sort2 = Get::safe('sort2', 'desc');
        $order2 = Get::safe('order2');
        $html .= '&nbsp;&nbsp;' . sprintf($imgbase, $page->get_image(Get::val('sort')), Get::safe('sort'));
    } else {
        $sort1 = 'desc';
        if (in_array($colname, array('project', 'tasktype', 'category', 'openedby', 'assignedto'))) {
            $sort1 = 'asc';
        }
        $sort2 = Get::safe('sort', 'desc');
        $order2 = Get::safe('order');
    }
    $new_order = array('order' => $colname, 'sort' => $sort1, 'order2' => $order2, 'sort2' => $sort2);
    # unneeded params from $_GET for the sort links
    $params = array_merge($_GET, $new_order);
    unset($params['do']);
    unset($params['project']);
    unset($params['switch']);
    $html = sprintf('<a title="%s" href="%s">%s</a>', eL('sortthiscolumn'), Filters::noXSS(CreateURL('tasklist', $proj->id, null, $params)), $html);
    return sprintf($format, ' class="' . $class . '"', $html);
}
开发者ID:jack-reiersen,项目名称:flyspray,代码行数:43,代码来源:index.php

示例13: date_default_timezone_set

<?php

/*
 *  Run me once for every project that uses SVN
 */
# set the timezone
date_default_timezone_set('Europe/Berlin');
set_time_limit(0);
define('IN_FS', true);
require_once '../../header.php';
if (!Get::val('project_id')) {
    die('No project ID specified (use ?project_id=X).');
}
if (!$proj->prefs['svn_url']) {
    die('No URL to SVN repository entered in PM area.');
}
$project_prefixes = $db->x->GetCol('SELECT project_prefix FROM {projects}');
$look = array('FS#', 'bug ');
foreach ($project_prefixes as $prefix) {
    $look[] = preg_quote($prefix . '#', '/');
}
$look = implode('|', $look);
echo '<h2>' . $proj->prefs['project_title'] . '</h2>';
// use backward-compatible column name
$cols = $db->x->getRow('SELECT * FROM {related}');
$col = isset($cols['is_duplicate']) ? 'is_duplicate' : 'related_type';
$revisions = $db->x->GetCol('SELECT topic FROM {cache} WHERE project_id = ? AND type = ?', null, $proj->id, 'svn');
$svninfo = new SVNinfo();
$svninfo->setRepository($proj->prefs['svn_url'], $proj->prefs['svn_user'], $proj->prefs['svn_password']);
$currentRevision = $svninfo->getCurrentRevision();
// retrieve stuff in small portions
开发者ID:heptalium,项目名称:flyspray,代码行数:31,代码来源:svnimport.php

示例14: define

<?php

/*
    This script is the AJAX callback that performs a search
    for users, and returns true if the user_name is not given.
*/
define('IN_FS', true);
header('Content-type: text/html; charset=utf-8');
require_once '../../header.php';
$baseurl = dirname(dirname($baseurl)) . '/';
if (Get::has('name')) {
    $searchterm = strtolower(Get::val('name'));
}
// Get the list of users from the global groups above
$get_users = $db->x->getRow('  SELECT  count(u.user_name) AS anz_u_user, 
                                   count(r.user_name) AS anz_r_user 
                             FROM  {users} u
                        LEFT JOIN  {registrations} r ON u.user_name = r.user_name
                            WHERE  Lower(u.user_name) = ? 
                                   OR
                                   Lower(r.user_name) = ?', null, array($searchterm, $searchterm));
if ($get_users) {
    if ($get_users['anz_u_user'] > '0' || $get_users['anz_r_user'] > '0') {
        $html = 'false|' . eL('usernametaken');
    } else {
        $html = 'true';
    }
}
echo $html;
开发者ID:negram,项目名称:flyspray,代码行数:29,代码来源:searchnames.php

示例15: str_replace

$modes = str_replace('.php', '', array_map('basename', glob_compat(BASEDIR . "/scripts/*.php")));
// yes, we need all of them for now
foreach ($modes as $mode) {
    require_once BASEDIR . '/scripts/' . $mode . '.php';
}
$do = Req::val('do');
// Any "do" mode that accepts a task_id or id field should be added here.
if (Req::num('task_id')) {
    $project_id = $db->x->GetOne('SELECT  project_id
                                 FROM  {tasks}
                                WHERE task_id = ?', null, Req::num('task_id'));
    $do = Filters::enum($do, array('details', 'depends', 'editcomment'));
} else {
    if ($do == 'admin' && Get::has('switch') && Get::val('project') != '0') {
        $do = 'pm';
    } elseif ($do == 'pm' && Get::has('switch') && Get::val('project') == '0') {
        $do = 'admin';
    } elseif (Get::has('switch') && $do == 'details') {
        $do = 'index';
    }
    if ($do && class_exists('FlysprayDo' . ucfirst($do)) && !call_user_func(array('FlysprayDo' . ucfirst($do), 'is_projectlevel'))) {
        $project_id = 0;
    }
}
if (!isset($project_id)) {
    // Determine which project we want to see
    if (($project_id = Cookie::val('flyspray_project')) == '') {
        $project_id = $fs->prefs['default_project'];
    }
    $project_id = Req::val('project', Req::val('project_id', $project_id));
}
开发者ID:heptalium,项目名称:flyspray,代码行数:31,代码来源:header.php


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