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


PHP haveRight函数代码示例

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


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

示例1: defineTabs

 function defineTabs($options = array())
 {
     global $LANG;
     $tabs[1] = $LANG['title'][26];
     $tabs[2] = $LANG['setup'][6];
     if (haveRight('search_config', 'w')) {
         $tabs[3] = $LANG['central'][12];
     }
     $tabs['no_all_tab'] = true;
     return $tabs;
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:11,代码来源:preference.class.php

示例2: showForItem

 /**
  * Print the HTML array for device on link
  *
  * Print the HTML array for device on link for link $instID
  *
  *@param $links_id array : Link identifier.
  *
  *@return Nothing (display)
  *
  **/
 static function showForItem($links_id)
 {
     global $DB, $CFG_GLPI, $LANG;
     $link = new Link();
     if ($links_id > 0) {
         $link->check($links_id, 'r');
     } else {
         // Create item
         $link->check(-1, 'w');
         $link->getEmpty();
     }
     $canedit = $link->can($links_id, 'w');
     $canrecu = $link->can($links_id, 'recursive');
     if (!haveRight("link", "r")) {
         return false;
     }
     //$canedit= haveRight("link","w");
     $query = "SELECT *\n                FROM `glpi_links_itemtypes`\n                WHERE `links_id`='{$links_id}'\n                ORDER BY `itemtype`";
     $result = $DB->query($query);
     $number = $DB->numrows($result);
     $i = 0;
     $used = array();
     echo "<form method='post' action=\"" . $CFG_GLPI["root_doc"] . "/front/link_itemtype.form.php\">";
     echo "<div class='center'><table class='tab_cadre_fixe'>";
     echo "<tr><th colspan='2'>" . $LANG['links'][4] . "&nbsp;:</th></tr>";
     echo "<tr><th>" . $LANG['common'][17] . "</th>";
     echo "<th>&nbsp;</th></tr>";
     while ($i < $number) {
         $ID = $DB->result($result, $i, "id");
         $itemtype = $DB->result($result, $i, "itemtype");
         $typename = NOT_AVAILABLE;
         if (class_exists($itemtype)) {
             $item = new $itemtype();
             $typename = $item->getTypeName();
         }
         echo "<tr class='tab_bg_1'>";
         echo "<td class='center'>{$typename}</td>";
         echo "<td class='center'>";
         echo "<a href='" . $CFG_GLPI["root_doc"] . "/front/link_itemtype.form.php?delete=deletedevice&amp;id={$ID}&amp;links_id={$links_id}'>\n               <strong>" . $LANG['buttons'][6] . "</strong></a></td></tr>";
         $used[$itemtype] = $itemtype;
         $i++;
     }
     if ($canedit) {
         echo "<tr class='tab_bg_1'><td>&nbsp;</td><td class='center'>";
         echo "<input type='hidden' name='links_id' value='{$links_id}'>";
         Dropdown::dropdownTypes("itemtype", '', $CFG_GLPI["link_types"], $used);
         echo "&nbsp;&nbsp;<input type='submit' name='add' value=\"" . $LANG['buttons'][8] . "\" class='submit'>";
         echo "</td></tr>";
     }
     echo "</table></div></form>";
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:61,代码来源:link_itemtype.class.php

示例3: showForComputer

 /** Display registry values for a computer
  * 
  * @param $ID integer : computer ID
  * 
  */
 static function showForComputer($ID)
 {
     global $DB, $LANG;
     if (!haveRight("computer", "r")) {
         return false;
     }
     //REGISTRY HIVE
     $REGISTRY_HIVE = array("HKEY_CLASSES_ROOT", "HKEY_CURRENT_USER", "HKEY_LOCAL_MACHINE", "HKEY_USERS", "HKEY_CURRENT_CONFIG", "HKEY_DYN_DATA");
     $query = "SELECT *\n                FROM `glpi_registrykeys`\n                WHERE `computers_id` = '{$ID}'";
     if ($result = $DB->query($query)) {
         if ($DB->numrows($result) != 0) {
             echo "<div class='center'><table class='tab_cadre_fixe'>";
             echo "<tr><th colspan='4'>" . $DB->numrows($result) . " " . $LANG['registry'][4] . "</th></tr>\n";
             echo "<tr><th>" . $LANG['registry'][6] . "</th>";
             echo "<th>" . $LANG['registry'][1] . "</th>";
             echo "<th>" . $LANG['registry'][2] . "</th>";
             echo "<th>" . $LANG['registry'][3] . "</th></tr>\n";
             while ($data = $DB->fetch_assoc($result)) {
                 echo "<tr class='tab_bg_1'>";
                 echo "<td>" . $data["ocs_name"] . "</td>";
                 if (isset($REGISTRY_HIVE[$data["hive"]])) {
                     echo "<td>" . $REGISTRY_HIVE[$data["hive"]] . "</td>";
                 } else {
                     echo "<td>(" . $data["hive"] . ")</td>";
                 }
                 echo "<td>" . $data["path"] . "</td>";
                 echo "<td>" . $data["value"] . "</td>";
                 echo "</tr>";
             }
             echo "</table></div>\n\n";
         } else {
             echo "<div class='center'><table class='tab_cadre_fixe'>";
             echo "<tr class='tab_bg_2'><th>" . $LANG['ocsconfig'][41] . "</th></tr>";
             echo "<tr class='tab_bg_2'><td class='center b'>" . $LANG['registry'][5] . "</td></tr>";
             echo "</table></div>";
         }
     }
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:43,代码来源:registrykey.class.php

示例4: showForm

 function showForm($ID, $options = array())
 {
     global $LANG, $CFG_GLPI;
     if (!haveRight("config", "w")) {
         return false;
     }
     $spotted = false;
     if (empty($ID)) {
         if ($this->getEmpty()) {
             $spotted = true;
         }
     } else {
         if ($this->getFromDB($ID)) {
             $spotted = true;
         }
     }
     $this->showTabs($options);
     $this->showFormHeader($options);
     echo "<tr class='tab_bg_1'><td>" . $LANG['common'][16] . "&nbsp;:</td>";
     echo "<td colspan='3'>";
     autocompletionTextField($this, "name");
     echo "</td></tr>";
     echo "<tr class='tab_bg_1'><td>" . $LANG['common'][17] . "&nbsp;:</td><td colspan='3'>";
     Dropdown::dropdownTypes("itemtype", $this->fields['itemtype'] ? $this->fields['itemtype'] : 'Ticket', $CFG_GLPI["notificationtemplates_types"]);
     echo "</td></tr>";
     echo "<tr class='tab_bg_1'><td>" . $LANG['common'][25] . "&nbsp;: </td>";
     echo "<td colspan='3'>";
     echo "<textarea cols='60' rows='5' name='comment' >" . $this->fields["comment"] . "</textarea>";
     echo "</td></tr>";
     echo "<tr class='tab_bg_1'><td>" . $LANG['mailing'][6] . "&nbsp;: </td>";
     echo "<td colspan='3'>";
     echo "<textarea cols='60' rows='5' name='css' >" . $this->fields["css"] . "</textarea></td></tr>";
     $this->showFormButtons($options);
     $this->addDivForTabs();
     return true;
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:36,代码来源:notificationtemplate.class.php

示例5: showForm

 function showForm($target, $ID)
 {
     global $LANG;
     if (!haveRight("profile", "r")) {
         return false;
     }
     $canedit = haveRight("profile", "w");
     if ($ID) {
         $this->getFromDB($ID);
     }
     echo "<form action='" . $target . "' method='post'>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<tr>";
     echo "<th colspan='4' align='center'>";
     echo $LANG['plugin_fusioninventory']["profile"][0] . " " . $this->fields["name"];
     echo "</th>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][16] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("snmp_networking", $this->fields["snmp_networking"], 1, 1, 1);
     echo "</td>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][23] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("configuration", $this->fields["configuration"], 1, 1, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][18] . " :</td><td>";
     Profile::dropdownNoneReadWrite("snmp_printers", $this->fields["snmp_printers"], 1, 1, 1);
     echo "</td>";
     echo "<th colspan='2'>";
     echo $LANG['plugin_fusioninventory']["profile"][34] . " :";
     echo "</th>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][19] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("snmp_models", $this->fields["snmp_models"], 1, 1, 1);
     echo "</td>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][29] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("remotecontrol", $this->fields["remotecontrol"], 1, 0, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][20] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("snmp_authentification", $this->fields["snmp_authentification"], 1, 1, 1);
     echo "</td>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][31] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("deviceinventory", $this->fields["deviceinventory"], 1, 0, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][25] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("rangeip", $this->fields["rangeip"], 1, 1, 1);
     echo "</td>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][22] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("netdiscovery", $this->fields["netdiscovery"], 1, 0, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][26] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("agents", $this->fields["agents"], 1, 1, 1);
     echo "</td>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][32] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("snmp_query", $this->fields["snmp_query"], 1, 0, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][27] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("agentsprocesses", $this->fields["agentsprocesses"], 1, 1, 0);
     echo "</td>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][33] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("wol", $this->fields["wol"], 1, 0, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][30] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("unknowndevices", $this->fields["unknowndevices"], 1, 1, 1);
     echo "</td>";
     echo "<td colspan='2'>";
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][28] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("reports", $this->fields["reports"], 1, 1, 0);
     echo "</td>";
     echo "<td colspan='2'>";
     echo "</td>";
//.........这里部分代码省略.........
开发者ID:Hawke,项目名称:fusioninventory-for-glpi,代码行数:101,代码来源:profile.class.php

示例6: canView

 function canView()
 {
     return haveRight('typedoc', 'r');
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:4,代码来源:documenttype.class.php

示例7: showNotesForm

/**
 *  show notes for item
 *
 * @param $target target page to update item
 * @param $itemtype item type of the device to display notes
 * @param $id id of the device to display notes
 *
 * @return nothing
 */
function showNotesForm($target, $itemtype, $id)
{
    global $LANG;
    if (!haveRight("notes", "r")) {
        return false;
    }
    if (!class_exists($itemtype)) {
        return false;
    }
    $item = new $itemtype();
    //getFromDB
    $item->getFromDB($id);
    $canedit = haveRight("notes", "w") && (!$item->isEntityAssign() || haveAccessToEntity($item->getEntityID()));
    if ($canedit) {
        echo "<form name='form' method='post' action='" . $target . "'>";
    }
    echo "<div class='center'>";
    echo "<table class='tab_cadre_fixe' >";
    echo "<tr><th class='center'>" . $LANG['title'][37] . "</th></tr>";
    echo "<tr><td class='tab_bg_1 center middle'>";
    echo "<textarea class='textarea_notes' cols='100' rows='35' name='notepad'>" . $item->getField('notepad') . "</textarea></td></tr>";
    echo "<tr><td class='tab_bg_2 center'>";
    echo "<input type='hidden' name='id' value='" . $item->fields['id'] . "'>";
    // for all objects without id as primary key (like entitydata)
    if ($item->getIndexName() != $id) {
        echo "<input type='hidden' name='" . $item->getIndexName() . "' " . "value='" . $item->fields[$item->getIndexName()] . "'>";
    }
    if ($canedit) {
        echo "<input type='submit' name='update' value=\"" . $LANG['buttons'][7] . "\" class='submit'>";
    }
    echo "</td></tr>";
    echo "</table></div>";
    if ($canedit) {
        echo "</form>";
    }
}
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:45,代码来源:display.function.php

示例8: Config

if (isset($_GET['activate'])) {
    $config = new Config();
    $tmp['id'] = $CFG_GLPI['id'];
    $tmp['use_mailing'] = 1;
    $config->update($tmp);
    glpi_header($_SERVER['HTTP_REFERER']);
}
if (!$CFG_GLPI['use_mailing']) {
    echo "<div align='center'<p>";
    if (haveRight("config", "w")) {
        echo "<a href='setup.notification.php?activate=1' class='icon_consol b'>" . $LANG['setup'][202] . "</a></p></div>";
    }
} else {
    if (!haveRight("config", "r") && haveRight("notification", "r") && $CFG_GLPI['use_mailing']) {
        glpi_header($CFG_GLPI["root_doc"] . '/front/notification.php');
    } else {
        echo "<table class='tab_cadre'>";
        echo "<tr><th>&nbsp;" . $LANG['setup'][704] . "&nbsp;</th></tr>";
        if (haveRight("config", "r")) {
            echo "<tr class='tab_bg_1'><td class='center'><a href='notificationmailsetting.form.php'>" . $LANG['setup'][201] . "</a></td></tr>";
            echo "<tr class='tab_bg_1'><td class='center'><a href='notificationtemplate.php'>" . $LANG['mailing'][113] . "</a></td> </tr>";
        }
        if (haveRight("notification", "r") && $CFG_GLPI['use_mailing']) {
            echo "<tr class='tab_bg_1'><td class='center'><a href='notification.php'>" . $LANG['setup'][704] . "</a></td></tr>";
        } else {
            echo "<tr class='tab_bg_1'><td class='center'>" . $LANG['setup'][661] . "</td></tr>";
        }
        echo "</table>";
    }
}
commonFooter();
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:31,代码来源:setup.notification.php

示例9: PluginTypologyTypology

 https://forge.indepnet.net/projects/typology
 -------------------------------------------------------------------------

 LICENSE

 This file is part of Typology.

 Typology is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 Typology is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with Typology. If not, see <http://www.gnu.org/licenses/>.
 --------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
PluginTypologyProfile::checkRight('typology', 'r');
Html::header(PluginTypologyTypology::getTypeName(2), '', "plugins", "typology");
$typo = new PluginTypologyTypology();
if ($typo->canView() || haveRight("config", "w")) {
    Search::show("PluginTypologyTypology");
} else {
    Html::displayRightError();
}
Html::footer();
开发者ID:geldarr,项目名称:hack-space,代码行数:31,代码来源:typology.php

示例10: showCentral

 /**
  * Show the planning for the central page of a user
  *
  * @param $who ID of the user
  *
  * @return Nothing (display function)
  **/
 static function showCentral($who)
 {
     global $CFG_GLPI, $LANG;
     if (!haveRight("show_planning", "1") || $who <= 0) {
         return false;
     }
     $when = strftime("%Y-%m-%d");
     $debut = $when;
     // Get begin and duration
     $date = explode("-", $when);
     $time = mktime(0, 0, 0, $date[1], $date[2], $date[0]);
     $begin = $time;
     $end = $begin + DAY_TIMESTAMP;
     $begin = date("Y-m-d H:i:s", $begin);
     $end = date("Y-m-d H:i:s", $end);
     // ---------------Tracking
     $interv = TicketPlanning::populatePlanning(array('who' => $who, 'who_group' => 0, 'begin' => $begin, 'end' => $end));
     // ---------------Reminder
     $data = Reminder::populatePlanning(array('who' => $who, 'who_group' => 0, 'begin' => $begin, 'end' => $end));
     $interv = array_merge($interv, $data);
     // ---------------Plugin
     $data = doHookFunction("planning_populate", array("begin" => $begin, "end" => $end, "who" => $who, "who_group" => -1));
     if (isset($data["items"]) && count($data["items"])) {
         $interv = array_merge($data["items"], $interv);
     }
     ksort($interv);
     echo "<table class='tab_cadrehov'><tr><th>";
     echo "<a href='" . $CFG_GLPI["root_doc"] . "/front/planning.php?uID={$who}'>" . $LANG['planning'][15] . "</a>";
     echo "</th></tr>";
     $type = '';
     if (count($interv) > 0) {
         foreach ($interv as $key => $val) {
             echo "<tr class='tab_bg_1'>";
             echo "<td>";
             if ($val["begin"] < $begin) {
                 $val["begin"] = $begin;
             }
             if ($val["end"] > $end) {
                 $val["end"] = $end;
             }
             self::displayPlanningItem($val, $who, 'in');
             echo "</td></tr>\n";
         }
     }
     echo "</table>";
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:53,代码来源:planning.class.php

示例11: commonHeader

    } else {
        commonHeader($LANG['Menu'][5], '', "maintain", "ticket");
    }
    $available_options = array('load_kb_sol');
    $options = array();
    foreach ($available_options as $key) {
        if (isset($_GET[$key])) {
            $options[$key] = $_GET[$key];
        }
    }
    $track->showForm($_GET["id"], $options);
} else {
    commonHeader($LANG['job'][13], '', "maintain", "ticket");
    $users_id_requester = getLoginUserID();
    // No default requester if own ticket right = tech and update_ticket right to update requester
    if (haveRight('own_ticket', 1) && haveRight('update_ticket', 1)) {
        $users_id_requester = 0;
    }
    // Set default value...
    $values = array('_users_id_requester' => $users_id_requester, '_users_id_requester_notif' => array('use_notification' => 1), '_groups_id_requester' => 0, '_users_id_assign' => 0, '_users_id_assign_notif' => array('use_notification' => 1), '_groups_id_assign' => 0, '_users_id_observer' => 0, '_users_id_observer_notif' => array('use_notification' => 1), '_groups_id_observer' => 0, 'suppliers_id_assign' => 0, 'name' => '', 'content' => '', 'ticketcategories_id' => 0, 'urgency' => 3, 'impact' => 3, 'priority' => Ticket::computePriority(3, 3), 'requesttypes_id' => $_SESSION["glpidefault_requesttypes_id"], 'hour' => 0, 'minute' => 0, 'date' => $_SESSION["glpi_currenttime"], 'entities_id' => $_SESSION["glpiactive_entity"], 'status' => 'new', 'followup' => array(), 'itemtype' => '', 'items_id' => 0, 'plan' => array(), 'global_validation' => 'none', 'due_date' => '', 'slas_id' => 0, '_add_validation' => 0, 'type' => -1);
    // Restore saved value or override with page parameter
    foreach ($values as $name => $value) {
        if (isset($_REQUEST[$name])) {
            $values[$name] = $_REQUEST[$name];
        } else {
            if (isset($_SESSION["helpdeskSaved"][$name])) {
                $values[$name] = $_SESSION["helpdeskSaved"]["{$name}"];
            }
        }
    }
    // Clean text fields
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:31,代码来源:ticket.form.php

示例12: array

$rg = 4;
if (haveRight($rg, 2)) {
    $tablefields[$rg] = 'need_desc';
    $tablehead['titles'][$rg] = 'Aprašymas';
    $tablehead['columns'][$rg] = 'left fc-100';
    $sortby[$rg] = 'need_desc';
}
$rg = 5;
if (haveRight($rg, 2)) {
    $tablefields[$rg] = 'need_regdate';
    $tablehead['titles'][$rg] = 'Modifikuotas';
    $tablehead['columns'][$rg] = 'left fc-dates';
    $sortby[$rg] = 'need_regdate';
}
$rg = 6;
if (haveRight($rg, 2)) {
    $tablefields[$rg] = 'need_expires';
    $tablehead['titles'][$rg] = 'Galioja iki';
    $tablehead['columns'][$rg] = 'left fc-dates';
    $sortby[$rg] = 'need_expires';
}
/* Admin specific */
$tablefields[7] = array('converter' => array('need_id', 'getNeedEditLink'));
$tablehead['titles'][7] = '';
$tablehead['columns'][7] = 'left fc-16';
$tablefields[8] = array('action' => array('need_id', 'salinti', '<i title="Šalinti/atnaujinti" class="fa fa-times"></i>', false));
$tablehead['titles'][8] = '';
$tablehead['columns'][8] = 'left fc-16';
/*
$tablefields = array(
		'need_id',
开发者ID:vsi-geros-valios-projektai,项目名称:admin.pagalbadaiktais.lt,代码行数:31,代码来源:need.php

示例13: showStats

 function showStats()
 {
     global $LANG;
     if (!haveRight('observe_ticket', 1) || !isset($this->fields['id'])) {
         return false;
     }
     echo "<div class='center'>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<tr><th colspan='2'>" . $LANG['common'][99] . "</th></tr>";
     echo "<tr class='tab_bg_2'><td>" . $LANG['reports'][60] . "&nbsp;:</td>";
     echo "<td>" . convDateTime($this->fields['date']) . "</td></tr>";
     echo "<tr class='tab_bg_2'><td>" . $LANG['sla'][5] . "&nbsp;:</td>";
     echo "<td>" . convDateTime($this->fields['due_date']) . "</td></tr>";
     if ($this->fields['status'] == 'solved' || $this->fields['status'] == 'closed') {
         echo "<tr class='tab_bg_2'><td>" . $LANG['reports'][64] . "&nbsp;:</td>";
         echo "<td>" . convDateTime($this->fields['solvedate']) . "</td></tr>";
     }
     if ($this->fields['status'] == 'closed') {
         echo "<tr class='tab_bg_2'><td>" . $LANG['reports'][61] . "&nbsp;:</td>";
         echo "<td>" . convDateTime($this->fields['closedate']) . "</td></tr>";
     }
     echo "<tr><th colspan='2'>" . $LANG['common'][100] . "</th></tr>";
     echo "<tr class='tab_bg_2'><td>" . $LANG['stats'][12] . "&nbsp;:</td><td>";
     if ($this->fields['takeintoaccount_delay_stat'] > 0) {
         echo timestampToString($this->fields['takeintoaccount_delay_stat'], 0);
     } else {
         echo '&nbsp;';
     }
     echo "</td></tr>";
     if ($this->fields['status'] == 'solved' || $this->fields['status'] == 'closed') {
         echo "<tr class='tab_bg_2'><td>" . $LANG['stats'][9] . "&nbsp;:</td><td>";
         if ($this->fields['solve_delay_stat'] > 0) {
             echo timestampToString($this->fields['solve_delay_stat'], 0);
         } else {
             echo '&nbsp;';
         }
         echo "</td></tr>";
     }
     if ($this->fields['status'] == 'closed') {
         echo "<tr class='tab_bg_2'><td>" . $LANG['stats'][10] . "&nbsp;:</td><td>";
         if ($this->fields['close_delay_stat'] > 0) {
             echo timestampToString($this->fields['close_delay_stat']);
         } else {
             echo '&nbsp;';
         }
         echo "</td></tr>";
     }
     echo "<tr class='tab_bg_2'><td>" . $LANG['joblist'][26] . "&nbsp;:</td><td>";
     if ($this->fields['ticket_waiting_duration'] > 0) {
         echo timestampToString($this->fields['ticket_waiting_duration'], 0);
     } else {
         echo '&nbsp;';
     }
     echo "</td></tr>";
     echo "</table>";
     echo "</div>";
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:57,代码来源:ticket.class.php

示例14: foreach

 foreach ($_POST['items'] as $reservationitems_id) {
     $_POST['reservationitems_id'] = $reservationitems_id;
     $times = $_POST["periodicity_times"];
     $begin = $_POST["begin"];
     list($begin_year, $begin_month, $begin_day) = explode("-", $_POST["begin"]);
     $end = $_POST["end"];
     $to_add = 1;
     if ($_POST["periodicity"] == "week") {
         $to_add = 7;
     }
     $_POST['_target'] = $_SERVER['PHP_SELF'];
     $_POST['_ok'] = true;
     for ($i = 0; $i < $times && $_POST['_ok']; $i++) {
         $_POST["begin"] = date('Y-m-d H:i:s', strtotime($begin) + $i * $to_add * DAY_TIMESTAMP);
         $_POST["end"] = date('Y-m-d H:i:s', strtotime($end) + $i * $to_add * DAY_TIMESTAMP);
         if (haveRight("reservation_central", "w") || getLoginUserID() === $_POST["users_id"]) {
             unset($rr->fields["id"]);
             $_POST['_ok'] = $rr->add($_POST);
         }
     }
     // Positionnement du calendrier au mois de debut
     $_GET["mois_courant"] = $begin_month;
     $_GET["annee_courant"] = $begin_year;
     if ($_POST['_ok']) {
         Event::log($_POST["reservationitems_id"], "reservation", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][20]);
     } else {
         $all_ok = false;
     }
 }
 if ($all_ok) {
     $toadd = "";
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:31,代码来源:reservation.form.php

示例15: define

but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GLPI; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
checkSeveralRightsOr(array("reservation_central" => "r", "reservation_helpdesk" => "1"));
if ($_SESSION["glpiactiveprofile"]["interface"] == "helpdesk") {
    helpHeader($LANG['Menu'][31], $_SERVER['PHP_SELF'], $_SESSION["glpiname"]);
} else {
    commonHeader($LANG['Menu'][17], $_SERVER['PHP_SELF'], "utils", "reservation");
}
if (!haveRight("reservation_central", "r")) {
    ReservationItem::showListSimple();
} else {
    Search::show('ReservationItem');
}
if ($_SESSION["glpiactiveprofile"]["interface"] == "helpdesk") {
    helpFooter();
} else {
    commonFooter();
}
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:31,代码来源:reservationitem.php


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