• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP user_realname函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: portal_incident_table

function portal_incident_table($sql)
{
    global $CONFIG, $showclosed;
    $result = mysql_query($sql);
    if (mysql_error()) {
        trigger_error(mysql_error(), E_USER_WARNING);
    }
    $numincidents = mysql_num_rows($result);
    if ($numincidents >= 1) {
        $shade = 'shade1';
        $html .= "<table align='center' width='70%'>";
        $html .= "<tr>";
        $html .= colheader('id', $GLOBALS['strID']);
        $html .= colheader('title', $GLOBALS['strTitle']);
        $html .= colheader('owner', $GLOBALS['strOwner']);
        $html .= colheader('lastupdated', $GLOBALS['strLastUpdated']);
        $html .= colheader('contact', $GLOBALS['strContact']);
        $html .= colheader('status', $GLOBALS['strStatus']);
        if ($showclosed != "true") {
            $html .= colheader('actions', $GLOBALS['strOperation']);
        }
        $html .= "</tr>\n";
        while ($incident = mysql_fetch_object($result)) {
            $html .= "<tr class='{$shade}'><td align='center'>";
            $html .= "<a href='incident.php?id={$incident->id}'>{$incident->id}</a></td>";
            $html .= "<td>";
            if (!empty($incident->softwareid)) {
                $html .= software_name($incident->softwareid) . "<br />";
            }
            $html .= "<strong><a href='incident.php?id={$incident->id}'>{$incident->title}</a></strong></td>";
            $html .= "<td align='center'>" . user_realname($incident->owner) . "</td>";
            $html .= "<td align='center'>" . ldate($CONFIG['dateformat_datetime'], $incident->lastupdated) . "</td>";
            $html .= "<td align='center'><a href='contactdetails.php?id={$incident->contactid}'>";
            $html .= "{$incident->forenames} {$incident->surname}</a></td>";
            $html .= "<td align='center'>" . incidentstatus_name($incident->status, external) . "</td>";
            if ($showclosed != "true") {
                $html .= "<td align='center'><a href='update.php?id={$incident->id}'>{$GLOBALS['strUpdate']}</a> | ";
                //check if the customer has requested a closure
                $lastupdate = list($update_userid, $update_type, $update_currentowner, $update_currentstatus, $update_body, $update_timestamp, $update_nextaction, $update_id) = incident_lastupdate($incident->id);
                if ($lastupdate[1] == "customerclosurerequest") {
                    $html .= "{$GLOBALS['strClosureRequested']}</td>";
                } else {
                    $html .= "<a href='close.php?id={$incident->id}'>{$GLOBALS['strRequestClosure']}</a></td>";
                }
            }
            $html .= "</tr>";
            if ($shade == 'shade1') {
                $shade = 'shade2';
            } else {
                $shade = 'shade1';
            }
        }
        $html .= "</table>";
    } else {
        $html .= "<p class='info'>{$GLOBALS['strNoIncidents']}</p>";
    }
    return $html;
}
开发者ID:sitracker,项目名称:sitracker_old,代码行数:58,代码来源:index.php


示例2: preg_replace

 $quotereplace[4] = "<span class='quoteirrel'>\\1</span>";
 $quotereplace[5] = "<span class='quoteirrel'>\\1</span>";
 $quotereplace[6] = "<span class='quoteirrel'>\\1</span>";
 $quotereplace[7] = "<span class='quote1'>\\1</span>";
 $quotereplace[8] = "<span class='quote2'>\\1</span>";
 $quotereplace[9] = "<span class='quote3'>\\1</span>";
 $updatebody = preg_replace($quote, $quotereplace, $updatebody);
 $updatebody = bbcode($updatebody);
 //$updatebody = emotion($updatebody);
 //"!(http:/{2}[\w\.]{2,}[/\w\-\.\?\&\=\#]*)!e"
 // [\n\t ]+
 $updatebody = preg_replace("!([\n\t ]+)(http[s]?:/{2}[\\w\\.]{2,}[/\\w\\-\\.\\?\\&\\=\\#\$\\%|;|\\[|\\]~:]*)!e", "'\\1<a href=\"\\2\" title=\"\\2\">'.(strlen('\\2')>=70 ? substr('\\2',0,70).'...':'\\2').'</a>'", $updatebody);
 // Lookup some extra data
 $updateuser = user_realname($update->userid, TRUE);
 $updatetime = readable_date($update->timestamp);
 $currentowner = user_realname($update->currentowner, TRUE);
 $currentstatus = incident_status($update->currentstatus);
 echo "<div class='detailhead' align='center'>";
 //show update type icon
 if (array_key_exists($update->type, $updatetypes)) {
     if (!empty($update->sla) and $update->type == 'slamet') {
         echo icon($slatypes[$update->sla]['icon'], 16, $update->type);
     }
     echo icon($updatetypes[$update->type]['icon'], 16, $update->type);
 } else {
     echo icon($updatetypes['research']['icon'], 16, $strResearch);
     if ($update->sla != '') {
         echo icon($slatypes[$update->sla]['icon'], 16, $update->type);
     }
 }
 echo " {$updatetime}</div>";
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:incident.php


示例3: trigger_error

        } else {
            trigger_error('User input error: ' . $error_string, E_USER_ERROR);
        }
    }
    include APPLICATION_INCPATH . 'htmlfooter.inc.php';
} elseif ($action == 'reassign') {
    // External variables
    $incidentid = cleanvar($_REQUEST['incidentid']);
    $uid = cleanvar($_REQUEST['userid']);
    $nextaction = cleanvar($_REQUST['nextaction']);
    include APPLICATION_INCPATH . 'htmlheader.inc.php';
    echo "<h2>{$strIncidentAdded} - {$strSummary}</h2>";
    echo "<p align='center'>";
    $incidentnum = "<a href=\"javascript:incident_details_window('{$incidentid}','incident{$incidentid}');\">{$strIncident} {$incidentid}</a>";
    $queuename = "<strong style='color: red'>{$strActionNeeded}</strong>";
    $name = user_realname($uid);
    printf($strHasBeenAutoMovedToX, $incidentnum, $name, $queuename);
    echo help_link('AutoAssignIncidents') . "</p><br /><br />";
    $userphone = user_phone($userid);
    if ($userphone != '') {
        echo "<p align='center'>{$strTelephone}: {$userphone}</p>";
    }
    $sql = "UPDATE `{$dbIncidents}` SET owner='{$uid}', lastupdated='{$now}' WHERE id='{$incidentid}'";
    mysql_query($sql);
    if (mysql_error()) {
        trigger_error("MySQL Query Error " . mysql_error(), E_USER_ERROR);
    }
    trigger('TRIGGER_INCIDENT_ASSIGNED', array('userid' => $uid, 'incidentid' => $incidentid));
    // add update
    $sql = "INSERT INTO `{$dbUpdates}` (incidentid, userid, type, timestamp, currentowner, currentstatus, nextaction) ";
    $sql .= "VALUES ('{$incidentid}', '{$sit[2]}', 'reassigning', '{$now}', '{$uid}', '1', '{$nextaction}')";
开发者ID:nicdev007,项目名称:sitracker,代码行数:31,代码来源:incident_add.php


示例4: switch

switch ($mode) {
    case 'edit':
        $sql = "SELECT bodytext, duration FROM `{$dbUpdates}` WHERE id = {$updateid} AND duration IS NOT NULL AND duration != 0";
        $oldduration = cleanvar($_REQUEST['oldduration']);
        $reason = cleanvar($_REQUEST['reason']);
        $newduration = cleanvar($_REQUEST['newduration']);
        // In minutes
        $result = mysql_query($sql);
        if (mysql_error()) {
            trigger_error(mysql_error(), E_USER_WARNING);
        }
        if (mysql_num_rows($result) == 1) {
            $obj = mysql_fetch_object($result);
            if ($obj->duration == $oldduration) {
                // Double check the oldduration thats been passed is whats in the DB
                $text = "{$obj->bodytext}\n\n[b]Duration adjusted[/b] by " . user_realname($sit[2]) . " on " . ldate($CONFIG['dateformat_datetime'], $now) . " from " . ceil($obj->duration) . "minutes to {$newduration}minutes, reason given:\n---\n{$reason}\n---";
                // FIXME should this be i18n? If so which language
                // $newduration *= 60;
                $usql = "UPDATE `{$dbUpdates}` SET bodytext = '" . mysql_real_escape_string($text) . "', duration = '{$newduration}' WHERE id = '{$updateid}'";
                mysql_query($usql);
                if (mysql_error()) {
                    trigger_error(mysql_error(), E_USER_WARNING);
                }
                // Some error checking
                if (mysql_affected_rows() < 1) {
                    html_redirect("{$CONFIG['application_webpath']}incident_details.php?id={$incidentid}", FALSE, $strFailed);
                } else {
                    html_redirect("{$CONFIG['application_webpath']}incident_details.php?id={$incidentid}", TRUE, $strDurationUpdated);
                }
            } else {
                // The value we've been passed isn't whats in the DB
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:billing_edit_activity_duration.php


示例5: mysql_query

     }
 }
 if ($moved_attachments) {
     // retrieve the update body so that we can insert time headers
     $sql = "SELECT incidentid, bodytext, timestamp FROM `{$dbUpdates}` WHERE id='{$updateid}'";
     $uresult = mysql_query($sql);
     if (mysql_error()) {
         trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING);
     }
     list($oldincidentid, $bodytext, $timestamp) = mysql_fetch_row($uresult);
     if ($oldincidentid == 0) {
         $oldincidentid = 'Inbox';
     }
     $prettydate = ldate('r', $timestamp);
     // prepend 'moved' header to bodytext
     $body = sprintf($SYSLANG['strMovedFromXtoXbyX'], "<b>{$oldincidentid}</b>", "<b>{$incidentid}</b>", "<b>" . user_realname($sit[2]) . "</b>") . "\n";
     $body .= sprintf($SYSLANG['strOriginalMessageReceivedAt'], "<b>{$prettydate}</b>") . "\n";
     $body .= $SYSLANG['strStatus'] . " -&gt; <b>{$SYSLANG['strActive']}</b>\n";
     $bodytext = $body . $bodytext;
     $bodytext = mysql_real_escape_string($bodytext);
     // move the update.
     $sql = "UPDATE `{$dbUpdates}` SET incidentid='{$incidentid}', userid='{$sit[2]}', bodytext='{$bodytext}', timestamp='{$now}' WHERE id='{$updateid}'";
     mysql_query($sql);
     if (mysql_error()) {
         trigger_error("MySQL Query Error " . mysql_error(), E_USER_ERROR);
     }
     //remove from tempincoming to prevent build up
     $sql = "DELETE FROM `{$dbTempIncoming}` WHERE updateid='{$updateid}'";
     mysql_query($sql);
     if (mysql_error()) {
         trigger_error("MySQL Query Error " . mysql_error(), E_USER_ERROR);
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:move_update.php


示例6: sprintf

    echo "<h2>" . sprintf($strIncidentsVerbBetweenDates, $type, $start_str, $end_str) . "</h2>";
}
echo "<table align='center'>";
if (mysql_num_rows($result) > 0) {
    echo "<tr><th>{$strID}</th><th>{$strTitle}</th><th>{$strOpened}</th><th>{$strClosed}</th><th>{$strOwner}</th><th>{$strCustomer}</th><th>{$strSite}</th></tr>";
    while ($row = mysql_fetch_array($result)) {
        echo "<tr>";
        echo "<td><a href=\"javascript:incident_details_window('{$row['id']}','incident{$row['id']}')\" class='info'>{$row['id']}</a></td>";
        echo "<td><a href=\"javascript:incident_details_window('{$row['id']}','incident{$row['id']}')\" class='info'>{$row['title']}</a></td>";
        echo "<td>" . date($CONFIG['dateformat_datetime'], $row['opened']) . "</td>";
        if ($row['status'] != 2) {
            echo "<td>{$strCurrentlyOpen}</td>";
        } else {
            echo "<td>" . date($CONFIG['dateformat_datetime'], $row['closed']) . "</td>";
        }
        echo "<td>" . user_realname($row['owner']) . "</td>";
        $sql = "SELECT c.forenames, c.surname, s.name ";
        $sql .= "FROM `{$dbContacts}` AS c, `{$dbSites}` AS s ";
        $sql .= "WHERE s.id = c.siteid AND c.id = {$row['contact']}";
        $contactResult = mysql_query($sql);
        if (mysql_error()) {
            trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING);
        }
        $contact = mysql_fetch_array($contactResult);
        echo "<td>{$contact['forenames']} {$contact['surname']}</td>";
        echo "<td>{$contact['name']}</td>";
        echo "</tr>\n";
    }
    echo "</table>\n";
} else {
    echo user_alert($strNoRecords, E_USER_WARNING);
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:statistics_breakdown.inc.php


示例7: holiday_approval_status

     echo " {$strMorning}";
 }
 if ($dates['length'] == 'pm') {
     echo " {$strAfternoon}";
 }
 echo "</td>";
 echo "<td>";
 if (empty($dates['approvedby'])) {
     echo " <em>{$strNotRequested}</em>";
 } else {
     echo "<strong>" . holiday_approval_status($dates['approved']) . "</strong>";
 }
 if ($dates['approvedby'] > 0 and $dates['approved'] >= 1) {
     echo " by " . user_realname($dates['approvedby']);
 } elseif ($dates['approvedby'] > 0 and empty($dates['approved'])) {
     echo " of " . user_realname($dates['approvedby']);
 }
 echo "</td>";
 echo "<td>";
 if ($approver == TRUE) {
     echo "<a href='holiday_add.php?hid={$dates['holidayid']}&amp;year=";
     echo substr($dates['date'], 0, 4) . "&amp;month=" . substr($dates['date'], 5, 2);
     echo "&amp;day=" . substr($dates['date'], 8, 2) . "&amp;user={$dates['userid']}";
     echo "&amp;type={$dates['type']}&amp;length=0&amp;return=list' ";
     echo "onclick=\"return window.confirm('{$dates['realname']}: " . ldate('l jS F Y', mysql2date($dates['date']));
     echo ": {$strAreYouSureDelete}');\">{$strDelete}</a>";
 }
 echo "</td></tr>\n";
 if ($shade == 'shade1') {
     $shade = 'shade2';
 } else {
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:list.inc.php


示例8: format_date_friendly

         $temparray['starttime'] = $startdate;
         $temparray['duration'] = $duration;
         $billing[$task->owner][] = $temparray;
     }
     $totalduration += $duration;
     echo "<td>" . format_date_friendly($lastupdated) . "</td>";
 }
 if ($show == 'completed') {
     echo "<td>";
     if ($enddate > 0) {
         echo ldate($CONFIG['dateformat_date'], $enddate);
     }
     echo "</td>";
 }
 if ($mode == 'incident' or $show == 'incidents') {
     echo "<td>" . user_realname($task->owner) . "</td>";
     if ($task->owner == $sit[2] and $enddate == '0') {
         $engineerhasrunnintask = TRUE;
     }
 }
 if ($mode == 'incident' and $enddate == '0') {
     echo "<td><a href='view_task.php?id={$task->id}&amp;mode=incident&amp;incident={$id}' class='info'>";
     echo "{$strViewActivity}</a></td>";
 } elseif ($mode == 'incident') {
     echo "<td></td>";
 }
 echo "</tr>\n";
 if ($shade == 'shade1') {
     $shade = 'shade2';
 } else {
     $shade = 'shade1';
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:tasks.php


示例9: dashboard_tasks

function dashboard_tasks($dashletid)
{
    global $sit, $CONFIG, $iconset, $dbTasks;
    $user = $sit[2];
    if ($CONFIG['tasks_enabled'] == TRUE) {
        $sql = "SELECT * FROM `{$dbTasks}` WHERE owner='{$user}' AND (completion < 100 OR completion='' OR completion IS NULL) AND ";
        $sql .= "(distribution = 'public' OR distribution = 'private') ";
        if (!empty($sort)) {
            if ($sort == 'id') {
                $sql .= "ORDER BY id ";
            } elseif ($sort == 'name') {
                $sql .= "ORDER BY name ";
            } elseif ($sort == 'priority') {
                $sql .= "ORDER BY priority ";
            } elseif ($sort == 'completion') {
                $sql .= "ORDER BY completion ";
            } elseif ($sort == 'startdate') {
                $sql .= "ORDER BY startdate ";
            } elseif ($sort == 'duedate') {
                $sql .= "ORDER BY duedate ";
            } elseif ($sort == 'distribution') {
                $sql .= "ORDER BY distribution ";
            } else {
                $sql = "ORDER BY id ";
            }
            if ($order == 'a' or $order == 'ASC' or $order = '') {
                $sql .= "ASC";
            } else {
                $sql .= "DESC";
            }
        } else {
            $sql .= "ORDER BY IF(duedate,duedate,99999999) ASC, duedate ASC, startdate DESC, priority DESC, completion ASC";
        }
        $result = mysql_query($sql);
        if (mysql_error()) {
            trigger_error(mysql_error(), E_USER_WARNING);
        }
        if (mysql_num_rows($result) >= 1) {
            $content .= "<table align='center' width='100%'>";
            $content .= "<tr>";
            $content .= colheader('id', $GLOBALS['strID']);
            $content .= colheader('name', $GLOBALS['strTask']);
            $content .= colheader('priority', $GLOBALS['strPriority']);
            $content .= colheader('completion', $GLOBALS['strCompletion']);
            $content .= "</tr>\n";
            $shade = 'shade1';
            while ($task = mysql_fetch_object($result)) {
                $duedate = mysql2date($task->duedate);
                $startdate = mysql2date($task->startdate);
                if (empty($task->name)) {
                    $task->name = $GLOBALS['strUntitled'];
                }
                $content .= "<tr class='{$shade}'>";
                $content .= "<td>{$task->id}</td>";
                $content .= "<td><a href='view_task.php?id={$task->id}' class='info'>" . truncate_string($task->name, 23);
                if (!empty($task->description)) {
                    $content .= "<span>" . nl2br($task->description) . "</span>";
                }
                $content .= "</a></td>";
                $content .= "<td>" . priority_icon($task->priority) . priority_name($task->priority) . "</td>";
                $content .= "<td>" . percent_bar($task->completion) . "</td>";
                $content .= "</tr>\n";
                if ($shade == 'shade1') {
                    $shade = 'shade2';
                } else {
                    $shade = 'shade1';
                }
            }
            $content .= "</table>\n";
        } else {
            $content .= "<p align='center'>{$GLOBALS['strNoRecords']}</p>";
        }
    } else {
        $content .= "<p class='warning'>{$GLOBALS['strDisabled']}</p>";
    }
    echo dashlet('tasks', $dashletid, icon('task', 16), sprintf($GLOBALS['strXsTasks'], user_realname($user, TRUE)), 'tasks.php', $content);
}
开发者ID:sitracker,项目名称:sitracker_old,代码行数:77,代码来源:dashboard_tasks.php


示例10: elseif

        } elseif ($rowcount >= 4) {
            echo "Various";
        }
        echo "<br /><a href='kb_view_article.php?id={$kbarticle->docid}' class='info'>{$kbarticle->title}";
        $asql = "SELECT LEFT(content,400) FROM `{$dbKBContent}` WHERE docid='{$kbarticle->docid}' ORDER BY id ASC LIMIT 1";
        $aresult = mysql_query($asql);
        if (mysql_error()) {
            trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING);
        }
        list($content) = mysql_fetch_row($aresult);
        $content = strip_tags(remove_slashes($content));
        echo "<span>{$content}</span>";
        echo "</a>";
        echo "</td>";
        echo "<td>" . ldate($CONFIG['dateformat_date'], mysql2date($kbarticle->published)) . "</td>";
        echo "<td>" . user_realname($kbarticle->author) . "</td>";
        echo "<td>{$kbarticle->keywords}</td>";
        echo "</tr>\n";
        if ($shade == 'shade1') {
            $shade = 'shade2';
        } else {
            $shade = 'shade1';
        }
    }
    echo "</table>\n";
} else {
    echo "<p align='center'>{$strNoResults}</p>";
}
// echo "<!---SQL === $sql --->";
echo "<p align='center'><a href='kb_article.php'>{$strAddNew}</a></p>";
include APPLICATION_INCPATH . 'htmlfooter.inc.php';
开发者ID:kavinmehta,项目名称:sitracker,代码行数:31,代码来源:kb.php


示例11: ldate

     }
     echo "<tr><th>{$strLocation}:</th><td><a href=\"ftp://{$CONFIG['ftp_hostname']}{$ftp_path}{$obj->filename}\"><code>";
     echo "ftp://{$CONFIG['ftp_hostname']}{$ftp_path}{$obj->filename}</code></a></td></tr>\n";
     echo "<tr><th>{$strTitle}:</th><td>";
     echo "<input type='text' size='40' name='shortdescription' value='{$obj->shortdescription}' />";
     echo "</td></tr>\n";
     echo "<tr><th>{$strCategory}:</th><td>";
     echo "<input type='text' size='40' name='webcategory' value='{$obj->webcategory}' />";
     echo "</td></tr>\n";
     echo "<tr><th>{$strDescription}:</th><td>";
     echo "<textarea rows='6' cols='40' name='longdescription'>{$obj->longdescription}</textarea>";
     echo "</td></tr>\n";
     echo "<tr><th>{$strFileVersion}:</th><td>";
     echo "<input type='text' size='40' name='fileversion' value='{$obj->fileversion}' />";
     echo "</td></tr>\n";
     echo "<tr><th>{$strFileDate}:</th><td>" . ldate('D jS M Y @ g:i A', $obj->filedate) . " {$strby} " . user_realname($obj->userid, TRUE) . "</td></tr>\n";
     if ($obj->expiry > 0) {
         echo "<tr><th>{$strExpiryDate}</th><td>" . ldate('D jS M Y @ g:i A', $obj->expiry) . " </td></tr>\n";
     }
     echo "</table>\n\n";
     echo "<input type='hidden' name='id' value='{$id}' />";
     echo "<input type='hidden' name='mode' value='save' />";
     echo "<p align='center'><input type='submit' value='{$strSavePublish}' /></p>";
     echo "</form>";
     include APPLICATION_INCPATH . 'htmlfooter.inc.php';
     break;
 case 'save':
     $shortdescription = mysql_real_escape_string($_REQUEST['shortdescription']);
     $longdescription = mysql_real_escape_string($_REQUEST['longdescription']);
     $fileversion = mysql_real_escape_string($_REQUEST['fileversion']);
     $webcategory = mysql_real_escape_string($_REQUEST['webcategory']);
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:ftp_edit_file.php


示例12: mysql2date

 $startdate = mysql2date($task->startdate);
 $duedate = mysql2date($task->duedate);
 $enddate = mysql2date($task->enddate);
 echo "<table class='vertical' width='100%'>";
 echo "<tr><th>{$strTitle}</th>";
 echo "<td>{$task->name}</td></tr>";
 echo "<tr><th>{$strDescription}</th>";
 echo "<td>" . nl2br($task->description) . "</td></tr>";
 if ($task->distribution == 'public') {
     echo "<tr><th>{$strTags}:</th><td>";
     echo list_tags($taskid, 4);
     echo "</td></tr>";
 }
 if ($task->owner != $sit[2]) {
     echo "<tr><th>{$strOwner}</th>";
     echo "<td>" . user_realname($task->owner, TRUE) . "</td></tr>";
 }
 echo "<tr><th>{$strPriority}</th>";
 echo "<td>" . priority_icon($task->priority) . ' ' . priority_name($task->priority) . "</td></tr>";
 echo "<tr><th>{$strStartDate}</th>";
 echo "<td>";
 if ($startdate > 0) {
     echo ldate($CONFIG['dateformat_datetime'], $startdate);
 }
 echo "</td></tr>";
 echo "<tr><th>{$strDueDate}</th>";
 echo "<td>";
 if ($duedate > 0) {
     echo ldate($CONFIG['dateformat_datetime'], $duedate);
 }
 echo "</td></tr>";
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:task_view.inc.php


示例13: dashboard_user_incidents

function dashboard_user_incidents($dashletid)
{
    $title = sprintf($GLOBALS['strUserIncidents'], user_realname($_SESSION['userid'], TRUE));
    //"({$GLOBALS['strActionNeeded']})";
    echo dashlet('user_incidents', $dashletid, icon('support', 16), $title, 'incidents.php?user=current&amp;queue=1&amp;type=support', $content);
}
开发者ID:sitracker,项目名称:sitracker_old,代码行数:6,代码来源:dashboard_user_incidents.php


示例14: cleanvar

    $user = $sit[2];
} else {
    $user = cleanvar($_REQUEST['user']);
}
$title = $strEditUserSkills;
if (empty($submit)) {
    include APPLICATION_INCPATH . 'htmlheader.inc.php';
    $sql = "SELECT * FROM `{$dbUserSoftware}` AS us, `{$dbSoftware}` AS s WHERE us.softwareid = s.id AND userid = '{$user}' ORDER BY name";
    $result = mysql_query($sql);
    if (mysql_num_rows($result) >= 1) {
        while ($software = mysql_fetch_object($result)) {
            $expertise[] = $software->id;
        }
    }
    echo "<h2>" . icon('skill', 32) . " ";
    echo sprintf($strSkillsFor, user_realname($user, TRUE)) . "</h2>";
    echo "<p align='center'>{$strSelectYourSkills}</p>";
    echo "<form name='softwareform' action='{$_SERVER['PHP_SELF']}' method='post' onsubmit=\"populateHidden(document.softwareform.elements['expertise[]'],document.softwareform.choices)\">";
    echo "<table align='center'>";
    echo "<tr><th>{$strNOSkills}</th><th>&nbsp;</th><th>{$strHAVESkills}</th></tr>";
    echo "<tr><td align='center' width='300' class='shade1'>";
    $sql = "SELECT * FROM `{$dbSoftware}` ORDER BY name";
    $result = mysql_query($sql);
    if (mysql_num_rows($result) >= 1) {
        echo "\n<select name='noskills[]' multiple='multiple' size='20' style='width: 100%; min-width: 200px;'>";
        while ($software = mysql_fetch_object($result)) {
            if (is_array($expertise)) {
                if (!in_array($software->id, $expertise)) {
                    echo "<option value='{$software->id}'>{$software->name}</option>\n";
                }
            } else {
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:edit_user_skills.php


示例15: explode

    $dashboardstr = $obj->dashboard;
    $dashboardcomponents = explode(",", $obj->dashboard);
}
if (empty($dashboardid)) {
    foreach ($dashboardcomponents as $db) {
        $c = explode("-", $db);
        $ondashboard[$c[1]] = $c[1];
    }
    include APPLICATION_INCPATH . 'htmlheader.inc.php';
    $sql = "SELECT * FROM `{$dbDashboard}` WHERE enabled = 'true'";
    $result = mysql_query($sql);
    if (mysql_error()) {
        trigger_error(mysql_error(), E_USER_WARNING);
    }
    echo "<h2>" . icon('dashboard', 32) . " {$strDashboard}: ";
    echo user_realname($sit[2]) . "</h2>\n";
    if (mysql_num_rows($result) > 0) {
        echo "<table align='center'>\n";
        while ($obj = mysql_fetch_object($result)) {
            if (empty($ondashboard[$obj->id])) {
                //not already on dashbaord
                echo "<tr><th>{$strName}:</th><td>{$obj->name}</td><td><a href='{$_SERVER['PHP_SELF']}?action=add&amp;id={$obj->id}'>{$strAdd}</a></td></tr>\n";
            } else {
                echo "<tr><th>{$strName}:</th><td>{$obj->name}</td><td><a href='{$_SERVER['PHP_SELF']}?action=remove&amp;id={$obj->id}'>{$strRemove}</a></td></tr>\n";
            }
        }
        echo "</table>\n";
    } else {
        echo "<p class='info'>{$strNoDashletsInstalled}</p>";
    }
    include APPLICATION_INCPATH . 'htmlfooter.inc.php';
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:manage_user_dashboard.php


示例16: while

 echo "<tr><th>{$strInventoryItems}</th><th>{$strPrivacy}</th>";
 echo "<th>{$strOwner}</th><th>{$strActions}</th></tr>";
 $shade = 'shade1';
 while ($row = mysql_fetch_object($result)) {
     echo "<tr class='{$shade}'><td>" . icon('inventory', 16);
     echo " {$row->name}, {$CONFIG['inventory_types'][$row->type]}";
     if ($row->active != 1) {
         echo " (inactive)";
     }
     echo "</td><td align='center'>";
     if ($row->privacy == 'private') {
         echo icon('private', 16);
     } elseif ($row->privacy == 'adminonly') {
         echo icon('review', 16, $strAdmin);
     }
     echo "</td><td>" . user_realname($row->createdby) . "</td><td>";
     if ($row->privacy == 'private' and $sit[2] != $row->createdby or $row->privacy == 'adminonly' and !user_permission($sit[2], 22)) {
         echo "{$strView}</a> &nbsp; ";
         echo "{$strEdit}</td></tr>";
     } else {
         echo "<a href='inventory_view.php?id={$row->id}'>{$strView}</a> &nbsp; ";
         echo "<a href='inventory_edit.php?id={$row->id}'>{$strEdit}</td></tr>";
     }
     if ($shade == 'shade1') {
         $shade = 'shade2';
     } else {
         $shade = 'shade1';
     }
 }
 echo "</table>";
 echo "<p align='center'>" . icon('add', 16);
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:inventory_site.php


示例17: trigger_error

     trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING);
 }
 $countusers = mysql_num_rows($result);
 echo "<p style='font-size: 18px'>{$strOwner}: <strong>";
 if ($sit[2] == $incident->owner) {
     echo "{$strYou} (" . user_realname($incident->owner, TRUE) . ")";
 } else {
     echo user_realname($incident->owner, TRUE);
 }
 echo "</strong>";
 if ($incident->towner > 0) {
     echo " ({$strTemp}: ";
     if ($sit[2] == $incident->towner) {
         echo "{$strYou} (" . user_realname($incident->towner, TRUE) . ")";
     } else {
         echo user_realname($incident->towner, TRUE);
     }
     echo ")";
 }
 echo "</p>";
 if ($countusers > 0 or $countusers == 0 and $suggested > 0) {
     echo "<div id='reassignlist'>";
     echo "<table align='center'>";
     if ($countusers >= 1 and $suggested > 0) {
         echo "<thead>\n";
     }
     echo "<tr>\n                <th colspan='2'>{$strReassignTo}:</th>\n                <th colspan='5'>{$strIncidentsinQueue}</th>\n                <th>{$strAccepting}</th>\n                </tr>";
     echo "<tr>\n                <th>{$strName}</th>\n                <th>{$strStatus}</th>\n                <th align='center'>{$strActionNeeded} / {$strOther}</th>";
     echo "<th align='center'>" . priority_icon(4) . "</th>";
     echo "<th align='center'>" . priority_icon(3) . "</th>";
     echo "<th align='center'>" . priority_icon(2) . "</th>";
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:incident_reassign.php


示例18: icon

         echo $begin + $resultsperpage . "&amp;sort={$sort}&amp;order={$order}&amp;view={$view}'>{$strNext} ";
         echo icon('rightarrow', 16, $strNext) . "</a> ";
     } else {
         echo "{$strNext}";
     }
     echo "</p>";
     echo "<table align='center' width='80%'>";
     $filter['domain'] = 'kb';
     echo "<tr>" . colheader(id, $strID, $sort, $order, $filter);
     echo colheader(title, $strTitle, $sort, $order, $filter);
     echo colheader(date, $strDate, $sort, $order, $filter);
     echo colheader(author, $strAuthor, $sort, $order, $filter);
     echo colheader(keywords, $strKeywords, $sort, $order, $filter);
     $shade = 'shade1';
     while ($row = mysql_fetch_object($kbresult)) {
         echo "<tr class='{$shade}'>\n                    <td><a href='kb_view_article.php?id={$row->docid}'>\n                        {$CONFIG['kb_id_prefix']}{$row->docid}</a></td>\n                    <td>{$row->title}</td>\n                    <td>{$row->published}</td>\n                    <td>" . user_realname($row->author) . "</td>\n                    <td>{$row->keywords}</td>\n                  </tr>";
         if ($shade == 'shade1') {
             $shade = 'shade2';
         } else {
             $shade = 'shade1';
         }
     }
     echo "</table>";
 }
 $sql = "SELECT * FROM `{$dbTags}` WHERE name LIKE '%{$q}%'";
 $result = mysql_query($sql);
 if (mysql_num_rows($result) > 0) {
     echo "<h3>{$strTags}</h3>";
     echo "<p align='center'>";
     while ($row = mysql_fetch_object($result)) {
         $countsql = "SELECT COUNT(id) AS counted FROM `{$dbSetTags}` ";
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:search.php


示例19: make_incident_billing_array

/**
 * @author Paul Heaney
 * @note  based on periods
*/
function make_incident_billing_array($incidentid, $totals = TRUE)
{
    $billing = get_incident_billing_details($incidentid);
    // echo "<pre>";
    // print_r($billing);
    // echo "</pre><hr />";
    $sql = "SELECT servicelevel, priority FROM `{$GLOBALS['dbIncidents']}` WHERE id = {$incidentid}";
    $result = mysql_query($sql);
    if (mysql_error()) {
        trigger_error(mysql_error(), E_USER_WARNING);
        return FALSE;
    }
    $incident = mysql_fetch_object($result);
    $servicelevel_tag = $incident->servicelevel;
    $priority = $incident->priority;
    if (!empty($billing)) {
        $billingSQL = "SELECT * FROM `{$GLOBALS['dbBillingPeriods']}` WHERE tag='{$servicelevel_tag}' AND priority='{$priority}'";
        /*
        echo "<pre>";
        print_r($billing);
        echo "</pre>";
        
        echo "<pre>";
        print_r(make_billing_array($incidentid));
        echo "</pre>";
        */
        //echo $billingSQL;
        $billingresult = mysql_query($billingSQL);
        // echo $billingSQL;
        if (mysql_error()) {
            trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING);
        }
        $billingObj = mysql_fetch_object($billingresult);
        unset($billingresult);
        $engineerPeriod = $billingObj->engineerperiod * 60;
        //to seconds
        $customerPeriod = $billingObj->customerperiod * 60;
        if (empty($engineerPeriod) or $engineerPeriod == 0) {
            $engineerPeriod = 3600;
        }
        if (empty($customerPeriod) or $customerPeriod == 0) {
            $customerPeriod = 3600;
        }
        /*
        echo "<pre>";
        print_r($billing);
        echo "</pre>";
        */
        $count = array();
        // Loop over each activity that happened during the duration of the incident
        // Grouped by Engineer - and then calculate totals
        foreach ($billing as $engineer) {
            /*
                [eng][starttime]
            */
            if (is_array($engineer)) {
                $owner = "";
                $duration = 0;
                unset($count);
                $count = array();
                $count['engineer'];
                $count['customer'];
                foreach ($engineer as $activity) {
                    $owner = user_realname($activity['owner']);
                    $duration += $activity['duration'];
                    /*
                    echo "<pre>";
                    print_r($count);
                    echo "</pre>";
                    */
                    group_billing_periods($count, 'engineer', $activity, $engineerPeriod);
                    // Optimisation no need to compute again if we already have the details
                    if ($engineerPeriod != $customerPeriod) {
                        group_billing_periods($count, 'customer', $activity, $customerPeriod);
                    } else {
                        $count['customer'] = $count['engineer'];
                    }
                }
                $tduration += $duration;
                $totalengineerperiods += sizeof($count['engineer']);
                $totalcustomerperiods += sizeof($count['customer']);
                /*
                echo "<pre>";
                print_r($count);
                echo "</pre>&qu 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP user_register函数代码示例发布时间:2022-05-23
下一篇:
PHP user_read函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap